Hello,

Please ignore this question, I found the answer in the documentation:

"Pattern rules may have more than one target. Unlike normal rules, this does 
not act as many different rules with the same prerequisites and recipe. If a 
pattern rule has multiple targets, make knows that the rule's recipe is 
responsible for making all of the targets. The recipe is executed only once to 
make all the targets. When searching for a pattern rule to match a target, the 
target patterns of a rule other than the one that matches the target in need of 
a rule are incidental: make worries only about giving a recipe and 
prerequisites to the file presently in question. However, when this file's 
recipe is run, the other targets are marked as having been updated themselves."

Sorry.
Greetings
Michael Bos

From: Michael Bos
Sent: Dienstag, 18. Juni 2013 01:24
To: '[email protected]'
Subject: Implicit rule with multiple targets "forgets" to build a target

Hello,

When running "make -f Makefile.bad" (attached) I get the following output:

Generate 'E.1'
Creating 'A1B/C' from 'E.1' with stem '1'
Generate 'E.2'
Creating 'A2B/C' from 'E.2' with stem '

As you can see the targets A1B/D and A2B/D are not generated (I do not have any 
files with such names in my directory).

When splitting the multi-target rule into two implicit rules the missing 
targets are generated ("make -f Makefile.ok", attached):

Generate 'E.1'
Creating 'A1B/C' from 'E.1' with stem '1'
Creating 'A1B/D' from 'E.1' with stem '1'
Generate 'E.2'
Creating 'A2B/C' from 'E.2' with stem '2'
Creating 'A2B/D' from 'E.2' with stem '2'

According to the documentation there should be no difference:
"4.10 Multiple Targets in a Rule: A rule with multiple targets is equivalent to 
writing many rules, each with one target, and all identical aside from that."

What's wrong with my argumentation?

I am using GNU Make 3.81 under RedHat5.

Thanks in advance.
Greetings
Michael

___________________________________________________________________

Michael Bos
Principal Physical Verification Engineer (CAD)

Direct Dial: +49 (0)7021 805-255 | Fax: +49 (0)7021 805-100
[email protected]<mailto:[email protected]> |  
www.diasemi.com<http://www.diasemi.com/>

Dialog Semiconductor GmbH, Neue Strasse 95, D-73230 Kirchheim/Teck-Nabern, 
Germany
___________________________________________________________________



________________________________

Dialog Semiconductor GmbH
Neue Str. 95
D-73230 Kirchheim
Managing Directors: Dr. Jalal Bagherli, Jean-Michel Richard
Chairman of the Supervisory Board: Gregorio Reyes
Commercial register: Amtsgericht Stuttgart: HRB 231181
UST-ID-Nr. DE 811121668

Legal Disclaimer: This e-mail communication (and any attachment/s) is 
confidential and contains proprietary information, some or all of which may be 
legally privileged. It is intended solely for the use of the individual or 
entity to which it is addressed. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any disclosure, copying, 
distribution or any action taken or omitted to be taken in reliance on it, is 
prohibited and may be unlawful.

Please consider the environment before printing this e-mail


_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to