help-make
[Top][All Lists]
Advanced

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

Re: Using .PHONY to suppress rebuilds of included makefile fragments


From: J.T. Conklin
Subject: Re: Using .PHONY to suppress rebuilds of included makefile fragments
Date: Tue, 25 May 2010 14:29:48 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, berkeley-unix)

address@hidden (J.T. Conklin) writes:
> I've never seen .PHONY used in this way, but from the gmake -d output
> I see it indeed does what he claims.  Are there any reason why not to
> use .PHONY this way?  Is there a better idiom to use to avoid rebuilds
> of Makefile fragments.

To answer my own question, I found that using .PHONY like this will
cause include to act like -include if the Makefile fragment doesn't
exist.  I also found the suggestion to use an Empty Command in the
Remaking Makefiles section of the documentation that I overlooked
earlier this morning.

    --jtc

-- 
J.T. Conklin



reply via email to

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