help-make
[Top][All Lists]
Advanced

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

Re: changing MAKEFLAGS to affect current makefile


From: Boris Kolpackov
Subject: Re: changing MAKEFLAGS to affect current makefile
Date: Tue, 27 Apr 2004 13:00:04 -0500
User-agent: Mutt/1.5.4i

Paul D. Smith <address@hidden> writes:

> %% Regarding Re: changing MAKEFLAGS to affect current makefile; you wrote:
> 
>   >> Actually, not.  The MAKEFLAGS+=-r is not doing anything here.
> 
>   bk> I disagree. Built-in pattern rules are installed only after makefile
>   bk> is read (main.c:1624). Before that (main.c:1491) flags are re-evaluated
>   bk> in case they were (re)set in the makefile. I even put debug print in 
>   bk> install_default_implicit_rules to make sure ;-).
> 
> That may be true, but it doesn't matter because the setting of the
> MAKEFLAGS variable inside the makefile doesn't actually set the
> internal variables make uses to decide whether or not -r was given.

Sure it does. Look at main.c:1491; what makes you think it won't change
no_builtin_rules_flag?

> I ran your makefile with "make -pq" and compared the output to what I
> get when I use "make -rpq", and the output is very different...

The difference between "make -r" and setting those two in the makefile
is that in the first case make sets .SUFFIXES to "" and does not add
any suffix rules. In the second case make does set .SUFFIXES and does
add suffix rules before makefile is read but, since I set .SUFFIXES 
to "", make does not convert_to_pattern. I think that's why you see 
different output. The 'logical' result is the same however.


-boris

Attachment: pgpgbO_0FB7yW.pgp
Description: PGP signature


reply via email to

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