From 9a4da6ea502f253678f3442d89f22a5463633fde Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 8 Feb 2024 13:12:30 -0500 Subject: [PATCH] MT#55283 don't use automatic variable in prereq MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As per [1], quote: It’s very important that you recognize the limited scope in which automatic variable values are available: they only have values within the recipe. In particular, you cannot use them anywhere within the target list of a rule; they have no value there and will expand to the empty string. Also, they cannot be accessed directly within the prerequisite list of a rule. A common mistake is attempting to use $@ within the prerequisites list; this will not work. Based on the patch by S-P Chan [1] https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html closes #1754 Thanks: S-P Chan Change-Id: Ia5f9d7a75f04d9533afaace8ed49cc222e4307a8 Ref: https://github.com/sipwise/rtpengine/issues/1754 --- lib/common.Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.Makefile b/lib/common.Makefile index b62530dae..187753857 100644 --- a/lib/common.Makefile +++ b/lib/common.Makefile @@ -53,7 +53,7 @@ t38.c: spandsp_logging.h %.strhash.c: %.c ../utils/const_str_hash ../utils/const_str_hash "$<" < "$<" > "$@" -$(BUILD_TEST_ALTS): ../lib/$(@:.h=-*) +$(BUILD_TEST_ALTS): $(wildcard ../lib/$(subst .h,-*,$(BUILD_TEST_ALTS))) ../utils/build_test_wrapper "$@" 2> /dev/null .PHONY: all debug clean install