make-rules/prep-patch.mk
changeset 4251 2bf7e2c1ca74
parent 4196 d697072a92f5
child 4252 891a844655c4
equal deleted inserted replaced
4250:80b910c051fc 4251:2bf7e2c1ca74
    52 PATCHES =	$(shell find $(PATCH_DIR) $(PARFAIT_PATCH_DIR) -type f \
    52 PATCHES =	$(shell find $(PATCH_DIR) $(PARFAIT_PATCH_DIR) -type f \
    53 			 -name '$(PATCH_PATTERN)' 2>/dev/null | \
    53 			 -name '$(PATCH_PATTERN)' 2>/dev/null | \
    54 				LC_COLLATE=C sort)
    54 				LC_COLLATE=C sort)
    55 PATHCES +=	$(EXTRA_PATCHES)
    55 PATHCES +=	$(EXTRA_PATCHES)
    56 
    56 
    57 TMP_SUFFIXES = $(patsubst .patch_%,%, $(filter-out .patch,$(suffix $(PATCHES))))
    57 PCH_SUFFIXES = $(patsubst .patch_%,%, $(filter-out .patch,$(suffix $(PATCHES))))
    58 
    58 
    59 define patch-rule
    59 define patch-rule
    60 
    60 
    61 ifeq ($(1),_0)
    61 ifeq ($(1),_0)
    62 PATCH_PATTERN$(1) ?=	%.patch
    62 PATCH_PATTERN$(1) ?=	%.patch
    85 
    85 
    86 #
    86 #
    87 # Define the rules required to download any source archives and augment any
    87 # Define the rules required to download any source archives and augment any
    88 # cleanup macros.
    88 # cleanup macros.
    89 #
    89 #
    90 $(foreach suffix, $(TMP_SUFFIXES), $(eval $(call patch-rule,_$(suffix))))
    90 $(foreach suffix, $(PCH_SUFFIXES), $(eval $(call patch-rule,_$(suffix))))
    91 $(eval $(call patch-rule,))	# this must be last so we don't drop *.patch_%.
    91 $(eval $(call patch-rule,))	# this must be last so we don't drop *.patch_%.