From 55e1c16c98e10d1ef3332a587e8bc175dd852549 Mon Sep 17 00:00:00 2001
From: Stefan Kalkowski <stefan.kalkowski@genode-labs.com>
Date: Tue, 13 Aug 2013 15:40:51 +0200
Subject: [PATCH] ports: enable re-preparation of contrib code

Avoid warnings of missing patches directory

Fixes #832
---
 ports/ports/etc.mk | 8 +-------
 ports/ports/gdb.mk | 5 ++++-
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/ports/ports/etc.mk b/ports/ports/etc.mk
index 3a0e88fe19..0fa08fbc9d 100644
--- a/ports/ports/etc.mk
+++ b/ports/ports/etc.mk
@@ -19,13 +19,7 @@ $(CONTRIB_DIR)/$(ETC):
 	$(ECHO) "checking out 'etc' to '$@'"
 	$(VERBOSE)svn export $(ETC_SVN_BASE)/etc $@
 
-checkout-etc: $(CONTRIB_DIR)/$(ETC)
-
-apply_patches-etc: checkout-etc
-	$(VERBOSE)find ./src/noux-pkg/etc/patches/ -name "*.patch" |\
-		xargs -ixxx sh -c "patch -p0 -r - -N -d $(CONTRIB_DIR)/$(ETC) < xxx" || true
-
-prepare:: apply_patches-etc
+prepare:: $(CONTRIB_DIR)/$(ETC)
 
 clean-etc:
 	$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(ETC)
diff --git a/ports/ports/gdb.mk b/ports/ports/gdb.mk
index 87c93ad718..8f7cc7250c 100644
--- a/ports/ports/gdb.mk
+++ b/ports/ports/gdb.mk
@@ -45,7 +45,10 @@ GDB_CONTENT := gdb/regformats/regdat.sh \
 #
 PORTS += $(GDB)
 
-prepare:: $(CONTRIB_DIR)/$(GDB)/configure generated_files
+prepare:: clean-gdb $(CONTRIB_DIR)/$(GDB)/configure generated_files
+
+clean-gdb:
+	$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(GDB)
 
 #
 # Port-specific local rules