helpmake - Support: sr #104348, Commands that update more than one...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

sr #104348: Commands that update more than one target

Submitter:  None
Submitted:  Tue 21 Jun 2005 11:02:48 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Wed 21 Jun 2006 08:39:49 PM UTC, comment #1: 

Completely agree.

Oddly enough, you can do this already for pattern rules.  Consider the following:

all : a.foo a.bar b.foo b.bar
%.foo %.bar :
@echo rule 1: $@
b.foo b.bar :
@echo rule 2: $@

This produces the following output:
  rule 1: a.foo
  rule 2: b.foo
  rule 2: b.bar

Note that the pattern rule is executed only once (to update two files!), but the second rule is executed twice (once for each target).

Ian Prest <ijprest>
Tue 21 Jun 2005 11:02:48 PM UTC, original submission:  

In GNU Make, it is possible to write a rule with more than one target.  However, the meaning of this is the same as writing multiple rules that are identical except each has only one target.  So if more than one of the targets is out-of-date, the command part of the rule will be executed more than one time.

There are programs that can create more than one output file when run.  For example, "gcc -c foo.c bar.c" produces both foo.o and bar.o.  For gcc, the only reason to use this feature would be to speed up compilation.  Another example is "link.exe /pdb:bin/foo.pdb /out:bin/foo.exe src/foo.obj".  In this example, both foo.pdb and foo.exe must be created by a single execution of link.exe.

GNU Make should have a syntax to support this concept:  that a single command can update more than one target.  There should be enough flexibility in the syntax to support both types of use.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

 

 

 

No changes have been made to this item

Back to the top


Powered by Savane 3.9