make-rules/prep.mk
changeset 115 c360825c3a3f
parent 59 7500d63edb42
child 142 6f1cb90a0ef3
--- a/make-rules/prep.mk	Tue Mar 01 11:29:05 2011 -0800
+++ b/make-rules/prep.mk	Tue Mar 01 14:19:15 2011 -0800
@@ -28,11 +28,13 @@
 CLEAN_PATHS += $(SOURCE_DIR)
 CLOBBER_PATHS += $(COMPONENT_ARCHIVE)
 
-PATCHES =	$(shell find . -type f -name '*.patch' | \
-			 sed -e 's;^\./;;' | grep -v $(SOURCE_DIR) | sort)
-STAMPS =	$(PATCHES:%=$(SOURCE_DIR)/.%ed)
+PATCH_DIR =	patches
+PATCH_PATTERN =	*.patch
+PATCHES =	$(shell find $(PATCH_DIR) -type f -name '$(PATCH_PATTERN)' \
+				2>/dev/null | sort)
+STAMPS =	$(PATCHES:$(PATCH_DIR)/%=$(SOURCE_DIR)/.%ed)
 
-$(SOURCE_DIR)/.%ed:	%
+$(SOURCE_DIR)/.%ed:	$(PATCH_DIR)/%
 	$(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $<
 	$(TOUCH) [email protected]