help-make
[Top][All Lists]
Advanced

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

Re: irregularities with --no-builtin-variables


From: Kaz Kylheku (gmake)
Subject: Re: irregularities with --no-builtin-variables
Date: Thu, 30 Dec 2021 12:13:33 -0800
User-agent: Roundcube Webmail/0.9.2

On 2021-12-27 19:30, Paul Smith wrote:
On Sun, 2021-12-26 at 04:46 +0100, Reto wrote:
Is this a bug or am I missing something from the docs?

The -r and -R options don't take effect until the makefiles are all
parsed.

By the way, how is that to be understood?

Because if I, say, expand RM using $(info $(RM)) right in top-level
syntax outside of any rule, I get the expected behavior:
it expands to blank with "make -R", otherwise "rm -f".

$ make
rm -f
make: *** No targets.  Stop.
$ make -R

make: *** No targets.  Stop.
$ cat Makefile
$(info $(RM))

So if that effect is not until makefiles are parsed, that would
mean that make is parsing the entire file without expanding variables,
then putting the -R into effect, and then doing a second pass over
the parsed file to expand variables in $(info ...) and execute its
effect.





reply via email to

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