help-make
[Top][All Lists]
Advanced

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

Re: Wording in GNU Make manual regarding phony targets


From: Dave Hylands
Subject: Re: Wording in GNU Make manual regarding phony targets
Date: Wed, 21 Dec 2005 13:21:58 -0800

Hi Johan,


> >>FORCE : $(subdirs)
> >
> > Is this a typo? I could understand
> >
> > $(subdirs) : FORCE
> >
> > but not the other way around.
>
> ... I need to execute my recursive make.
> I have declared my subdirectory names to be .PHONY targets, so they get 
> executed as soon as they are given as targets. But I want them executed on 
> targets like 'all' or 'clean'. Now, the $(subdirs) I illustrated in my 
> previous post is some simplification, since I use one make-include to produce 
> either -just objects -executables -static libraries -dynamic libraries or 
> -nothing from the set of sources in every single directory, depending on a 
> directory-specific makefile.

Ahhh. I understand now.

The only disadvantage I see is that all targets that depend on FORCE
are now executed recursively (which isn't necessarily wrong).

I haven't seen it done that way before. I've been using the trailing
'/' convention that the 2.6 linux kernel uses to specify directories
and having a clean-dirs target descends and performs the clean
operation.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




reply via email to

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