Revert "Move dependency checks to one-time build"
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 10 Jan 2014 11:26:49 +0000 (11:26 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 10 Jan 2014 11:26:49 +0000 (11:26 +0000)
This reverts commit fe77ef86428a31db3088ec7435440a31e37c685c.

src/tests/auth/all.mk
src/tests/keywords/all.mk

index 463f9b6..91b2d24 100644 (file)
 AUTH_FILES := $(filter-out %.conf %.md %.attrs %.mk %~,$(subst $(DIR)/,,$(wildcard $(DIR)/*)))
 
 #
+#  For each file, look for precursor test.
+#  Ensure that each test depends on its precursors.
+#
+$(foreach x,$(AUTH_FILES),$(eval $(BUILD_DIR)/tests/auth/$(x): $(shell grep 'PRE: ' $(DIR)/$(x) | sed 's/.*://;s/  / /g;s, , $(BUILD_DIR)/tests/auth/,g')))
+
+#
 #  Create the output directory
 #
 .PHONY: $(BUILD_DIR)/tests/auth
@@ -29,19 +35,6 @@ AUTH_HAS      := $(filter $(wildcard $(AUTH_EXISTS)),$(AUTH_EXISTS))
 AUTH_COPY       := $(subst $(DIR),$(BUILD_DIR)/tests/auth,$(AUTH_NEEDS))
 
 #
-#  For each file, look for precursor test.
-#  Ensure that each test depends on its precursors.
-#
--include $(BUILD_DIR)/tests/auth/depends.mk
-
-$(BUILD_DIR)/tests/auth/depends.mk: $(addprefix $(DIR)/,$(AUTH_FILES)) | $(BUILD_DIR)/tests/auth
-       @rm -f $@
-       @for x in $^; do \
-               y=`grep 'PRE: ' $$x | sed 's/.*://;s/  / /g;s, , $(BUILD_DIR)/tests/auth/,g'`; \
-               echo "$$x: $$y" >> $@; \
-               echo "" >> $@; \
-       done
-#
 #  These ones get copied over from the default input
 #
 $(AUTH): $(DIR)/default-input.attrs | $(BUILD_DIR)/tests/auth
index eecdd3d..a7a93e3 100644 (file)
 FILES := $(filter-out %.conf %.md %.attrs %.mk %~,$(subst $(DIR)/,,$(wildcard $(DIR)/*)))
 
 #
+#  For each file, look for precursor test.
+#  Ensure that each test depends on its precursors.
+#
+$(foreach x,$(FILES),$(eval $(BUILD_DIR)/tests/keywords/$(x): $(shell grep 'PRE: ' $(DIR)/$(x) | sed 's/.*://;s/  / /g;s, , $(BUILD_DIR)/tests/keywords/,g')))
+
+#
 #  Create the output directory
 #
 .PHONY: $(BUILD_DIR)/tests/keywords
@@ -29,20 +35,6 @@ BOOTSTRAP_HAS         := $(filter $(wildcard $(BOOTSTRAP_EXISTS)),$(BOOTSTRAP_EXISTS))
 BOOTSTRAP_COPY  := $(subst $(DIR),$(BUILD_DIR)/tests/keywords,$(BOOTSTRAP_NEEDS))
 
 #
-#  For each file, look for precursor test.
-#  Ensure that each test depends on its precursors.
-#
--include $(BUILD_DIR)/tests/keywords/depends.mk
-
-$(BUILD_DIR)/tests/keywords/depends.mk: $(addprefix $(DIR)/,$(FILES)) | $(BUILD_DIR)/tests/keywords
-       @rm -f $@
-       @for x in $^; do \
-               y=`grep 'PRE: ' $$x | sed 's/.*://;s/  / /g;s, , $(BUILD_DIR)/tests/keywords/,g'`; \
-               echo "$$x: $$y" >> $@; \
-               echo "" >> $@; \
-       done
-
-#
 #  These ones get copied over from the default input
 #
 $(BOOTSTRAP): $(DIR)/default-input.attrs | $(BUILD_DIR)/tests/keywords