bug-make
[Top][All Lists]
Advanced

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

Re: [bug #50823] MAKEFILE_LIST contains wrong file name if file name con


From: Edward Welbourne
Subject: Re: [bug #50823] MAKEFILE_LIST contains wrong file name if file name contains dollar character
Date: Tue, 18 Apr 2017 12:13:59 +0000

> To reproduce:
>
> $ echo -e 'all:\n\techo $(value MAKEFILE_LIST)' > /tmp/foo\$bar.mk
> $ ./make -f '/tmp/foo$bar.mk'
> echo  /tmp/fooar.mk
> /tmp/fooar.mk
>
> I think this is inconsistent and contradicts the documentation, which states
> "MAKEFILE_LIST Contains the name of each makefile that is parsed by make, in
> the order in which it was parsed."

The $(value ...) is needless; $(MAKEFILE_LIST) exhibits the same.

The problem is that, where make adds a file-name to MAKEFILE_LIST, it needs
to escape any special characters in the file-name, in this case
s/\$/$$/g.

I wonder whether it handles spaces in file-names ?
I'll hazard a guess that a double-space shall end up single ...

        Eddy.



reply via email to

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