[Top][All Lists]

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

Re: Wording in GNU Make manual regarding phony targets

From: Johan Bezem
Subject: Re: Wording in GNU Make manual regarding phony targets
Date: Tue, 20 Dec 2005 21:59:51 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)


Dave Hylands wrote:
I would amend that slightly. Certainly for "normal" makefiles this is
the case. But if you have targets which you want remade everytime you
run make, then this is the way to do it.

For example, I typically have a rule like:



%.pp : %.c FORCE compiler to produce preprocessor output into .pp file...

I normally use this for debugging macros and other oddities. The %.pp
is never a normal target, but always used explicitly on the command
line ...

... and using 'recursive make', I use the same FORCE target to enforce 
recursion like in:

.PHONY: FORCE $(subdirs) clean

clean: FORCE
<tab>{Commands to clean this level...}

FORCE : $(subdirs)

<tab>$(MAKE) --directory=$@ ...

At least in part thanks to Paul's hints on his website!


JB Enterprises - Johan Bezem         Tel:   +49 172 5463210
Software Architect - Project Manager Fax:   +49 172 50 5463210
Realtime / Embedded Consultant       Email: address@hidden
Design - Development - Test - QA     Web:

reply via email to

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