[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU make 3.80/3.79.1: Pattern rule broken?
From: |
Paul D. Smith |
Subject: |
Re: GNU make 3.80/3.79.1: Pattern rule broken? |
Date: |
16 Sep 2005 08:41:56 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
%% amontse@gmail.com writes:
a> XX_%ExGw_mt : XX_%ExGw
a> XX_%Gateway : XX_%ExGw
a> XX_%ExGw :
a> touch foo.c
a> If you try make XX_ABCExGw_mt, GNU make correctly derives the rule
a> and execution the touch statement.
No it doesn't... not given the makefile you have above.
a> If you try make XX_Gateway, GNU make fails with the message "No
a> rule to make target XX_ABCGateway".
This is correct.
a> Is the GNU make broken on pattern rule or is there any syntax error in
a> my makefile?
GNU make is not broken and there's no syntax error in your makefile.
But, there is a semantic error.
A pattern rule with no command script is NOT the same as an explicit
rule with no command script: the former DELETES an existing pattern rule
with the same target/prerequisite. It does not create a new pattern
rule.
Check out the docs for pattern rules in the GNU make manual.
Cheers!
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist