[Top][All Lists]

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

Re: Dependency chain problem

From: Rick Thompson
Subject: Re: Dependency chain problem
Date: Wed, 18 May 2005 19:48:43 +0100
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

John Graham-Cumming wrote:
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) $<

Boy. I can't believe I was so dumb.... D'oh.

Ta -


reply via email to

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