How to stop GNU from expanding dollar signs in MAKEFILE_LIST?
Running
echo -e "all:\n\techo '\$(value MAKEFILE_LIST)'" > /tmp/foo\$bar.mk
make -f /tmp/foo\$bar.mk
will print
echo ' /tmp/fooar.mk'
/tmp/fooar.mk
From this we can see what MAKEFILE_LIST
contains the extended filenames.
How can I get the correct Makefile name (including dollar signs)?
My version is GNU Make 4.2.1.
My motivation: The dollar signs are actually part of the path to my Makefile. I cannot rename this path because it comes from the Samba share that people who will run make should use.
Update
Filed upstream as http://savannah.gnu.org/bugs/?50823 .
Update
The proposed patch is available at https://savannah.gnu.org/bugs/?50823#comment1 .
+3
source to share
1 answer