MT#55283 don't use automatic variable in prereq

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 <shihping.chan@gmail.com>

[1] https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html

closes #1754

Thanks: S-P Chan <shihping.chan@gmail.com>
Change-Id: Ia5f9d7a75f04d9533afaace8ed49cc222e4307a8
Ref: https://github.com/sipwise/rtpengine/issues/1754
(cherry picked from commit 9a4da6ea50)
pull/1887/head
Richard Fuchs 2 years ago
parent e84d017f86
commit 113ef1381e

@ -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

Loading…
Cancel
Save