Hi,
I've noticed a somehow strange behavior of make at least in 6.3 and 6.4
with this simple Makefile:
--------------------------------------
FILEs= Makefile Makefile.inc foo/Makefile.inc foo/src/force-build
DIR= foo/src
# These both do not give me the expected result
FILES= ${FILEs:M${DIR}/force-*}
FILES1= ${FILEs:M${DIR}}
# Only this variant works
FILES2= ${FILEs:Mfoo/src/force-*}
debug:
.for var in FILEs DIR FILES FILES1 FILES2
@echo ${var} = '${${var}}'
.endfor
----------------------------------
$ make debug
FILEs = Makefile Makefile.inc foo/Makefile.inc foo/src/force-build
DIR = foo/src
FILES = /force-*}
FILES1 = }
FILES2 = foo/src/force-build
-----------------------------------
Only the variant without the variable in the :M pattern gives the
expected result.
Is this expected behavior?
Am I making some mistake?
Thanks,
Matthias