[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dependency chain problem
From: |
John Graham-Cumming |
Subject: |
Re: Dependency chain problem |
Date: |
Wed, 18 May 2005 10:01:51 -0400 |
On Tue, 2005-05-17 at 23:06 +0100, Rick Thompson wrote:
> # use a pattern rule with multiple targets (10.5.1) to ensure that
> # $(ANTLR) is run only once to produce all 5 output files
> X.$pp Y.$pp Z.$pp : $(GRAMMAR)
> $(ANTLR) $<
>
> then everything goes to worms, and nothing works (make complains that
> there's no rule to make X.cpp; it doesn't seem to see the new rule).
Did you really mean X.$pp? The $ looks a little odd there and what this
rule defines will depend on the value of the variable p (since $p will
be expanded to its value before the rule is defined). Most likely $p is
empty and hence this rule is actually defining:
X.p Y.p Z.p : $(GRAMMAR) ; $(ANTLR) $<
which is not what you were looking for. I think you actually wanted to write:
X.%pp Y.%pp Z.%pp : $(GRAMMAR) ; $(ANTLR) $<
John.
--
John Graham-Cumming
Home: http://www.jgc.org/
Work: http://www.electric-cloud.com/
POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/