Benjamin Cama (2 August 2017 12:19) > I may be doing something wrong, but the following Makefile gives me > strange results: the target-specific variable does not apply when used > for a target in a subdirectory. > > test-%: FOO = BAR > test-%: > echo $(FOO) > > E.g.: > > $ make test-stem > echo BAR > BAR > $ make subdir/test-stem > echo > > What am I doing wrong?
the target test-% doesn't match subdir/test-% It only matches a name starting "test-" (with arbitrary suffix as %). Contrast with %-stem, which matches test-stem as well as subdir/test-stem, since % can stand for arbitrary things. > PS: please Cc me, I'm not subscribed. Thanks. Eddy. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make