[Top][All Lists]

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

Re: simple pattern rules

From: Paul Smith
Subject: Re: simple pattern rules
Date: Tue, 6 Apr 2010 14:01:17 -0400

On Tue, 2010-04-06 at 10:35 -0700, Payal wrote:
> On Tue, Apr 06, 2010 at 11:05:21AM -0400, Paul Smith wrote:
> > On Tue, 2010-04-06 at 13:00 +0000, Greg Chicares wrote:
> > > # What to build (if outdated).
> > > .PHONY: all
> > > all: a.tcp b.tcp
> > 
> > You want to have "all: a.cdb b.cdb" here, not the above.
> But I have many of these files. Do I need to use the "wildcard" function
> here?

You must have an explicit list of targets that you want make to build,
yes, that's what we're saying.

Whether you generate that explicit list by using a function like
$(wildcard ...) or by having someone actually add the list of targets
(or sources) to the makefile by hand, is up to you.

Personally in all my build systems I _always_ require the developers to
explicitly list the things they want to be built and I never allow
$(wildcard ...) or whatever to just "find everything matching this
pattern".  I find that leads to many problems with things being built
that weren't intended, and the amount of effort keeping the list of
sources to be built is minimal.

However, other people have very different beliefs in this area: it's a
personal preference and style thing.

reply via email to

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