bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

False positive "doesn't match the target pattern" error


From: Masahiro Yamada
Subject: False positive "doesn't match the target pattern" error
Date: Sat, 20 Aug 2022 18:50:50 +0900

Hi.


[Sample Makefile]

./foo.x: %/foo.x: %/foo.z
        cp $< $@

./foo.z:
        touch $@


[Test result]

$ make
Makefile:2: target 'foo.x' doesn't match the target pattern
cp  foo.x
cp: missing destination file operand after 'foo.x'
Try 'cp --help' for more information.
make: *** [Makefile:3: foo.x] Error 1



I believe "./foo.x" matches the target pattern "%/foo.x"
Am I wrong?


I appreciate GNU Make normalize the path
by removing "./"

This is helpful in some cases, but I think it is a bad side-effect
in this case.


If this is a bug, I can file for it.
Or, any workaround exists?



--
Best Regards
Masahiro Yamada



reply via email to

[Prev in Thread] Current Thread [Next in Thread]