Browse Source

improve patch dependency rules

approach in commit 8a92c5230c3808ae5baa76977823e717255bd506 only
worked for the "current version" of the packages configured with
GCC_VER, etc. now, all versions have proper dependencies so that it's
possible to test applicability of new patches just by running make
with the directory name.
Rich Felker 5 năm trước cách đây
mục cha
commit
59d9dff00c
1 tập tin đã thay đổi với 3 bổ sung8 xóa
  1. 3 8
      Makefile

+ 3 - 8
Makefile

@@ -139,14 +139,9 @@ musl-git-%:
 	rm -rf $@
 	mv $@.tmp $@
 
-binutils-$(BINUTILS_VER): $(wildcard patches/binutils-$(BINUTILS_VER) patches/binutils-$(BINUTILS_VER)/*)
-gcc-$(GCC_VER):           $(wildcard patches/gcc-$(GCC_VER)           patches/gcc-$(GCC_VER)/*)
-musl-$(MUSL_VER):         $(wildcard patches/musl-$(MUSL_VER)         patches/musl-$(MUSL_VER)/*)
-gmp-$(GMP_VER):           $(wildcard patches/gmp-$(GMP_VER)           patches/gmp-$(GMP_VER)/*)
-mpfr-$(MPFR_VER):         $(wildcard patches/mpfr-$(MPFR_VER)         patches/mpfr-$(MPFR_VER)/*)
-mpc-$(MPC_VER):           $(wildcard patches/mpc-$(MPC_VER)           patches/mpc-$(MPC_VER)/*)
-ils-$(ISL_VER):           $(wildcard patches/isl-$(ISL_VER)           patches/isl-$(ISL_VER)/*)
-linux-$(LINUX_VER):       $(wildcard patches/linux-$(LINUX_VER)       patches/linux-$(LINUX_VER)/*)
+
+# Add deps for all patched source dirs on their patchsets
+$(foreach dir,$(notdir $(basename $(basename $(basename $(wildcard hashes/*))))),$(eval $(dir): $$(wildcard patches/$(dir) patches/$(dir)/*)))
 
 extract_all: | $(SRC_DIRS)