]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
make sql_foo tests depend on rlm_sql.la, too
authorAlan T. DeKok <aland@freeradius.org>
Sat, 10 Apr 2021 13:14:00 +0000 (09:14 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 10 Apr 2021 13:14:00 +0000 (09:14 -0400)
src/tests/modules/all.mk

index c9166f0f1596eb4a81e34a2c04ca6e332969228d..4736c50666c44a7f7c0e8ee26b46fbc5174e6a65 100644 (file)
@@ -41,9 +41,6 @@ else ifeq "$(wildcard src/tests/modules/${1}/all.mk)" ""
   FILES_SKIP += ${2}
 
 else
-  # the output file depends on the library, too.
-  $(BUILD_DIR)/tests/modules/${2}.out: rlm_${1}.la
-
   -include src/tests/modules/${1}/all.mk
 
   ifdef ${1}_require_test_server
@@ -73,6 +70,11 @@ $(eval $(call TEST_BOOTSTRAP))
 #
 $(foreach x, $(FILES), $(eval $$(OUTPUT.$(TEST))/$x: $(patsubst %,$(BUILD_DIR)/lib/rlm_%.la,$(patsubst %/,%,$(firstword $(subst /, ,$(dir $x)))))))
 
+#
+#  sql_foo depends on rlm_sql, too.
+#
+$(foreach x, $(filter sql_%,$(FILES)), $(eval $$(OUTPUT.$(TEST))/$x: $(patsubst %,$(BUILD_DIR)/lib/rlm_sql.la,$(patsubst %/,%,$(firstword $(subst /, ,$(dir $x)))))))
+
 
 #
 #  Files in the output dir depend on the unit tests