bugmake - Bugs: bug #2404, make -j multiple targets schedules...

 
 

bug #2404: make -j multiple targets schedules same rule twice in parallel

Submitted by:  None
Submitted on:  Mon 27 Jan 2003 12:24:33 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.79.1Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 31 Jan 2003 08:19:25 AM UTC, comment #3:

Paul.

Thanks for your reply.

"Oh dear."

Of course without parallel building, make presumably (re-)checks target fooB before trying to fire its rule. Certainly, the rule only gets run once.

My first response was (please ignore it): I cannot see the expected behaviour (with -j) being useful under any circumstances. [snip]

Anyway, I found this in the manual (Multiple Targets):

bigoutput littleoutput : text.g
generate text.g -$(subst output,,$@) > $@

I suppose it is a bit much to ask Make to work out that this can be run in parallel, but my example cannot.

Is there a FAQ that covers this sort of thing? Something like this perhaps.

realtarget1 realtarget2: dummytarget

dummytarget: realdep1 realdep2
rule to make realtargets
touch dummytarget

It this works, would it be worth adding to the manual page?

Giuliano.

Giuliano Procida <myxie>
Tue 28 Jan 2003 05:57:13 PM UTC, comment #2:

This is not a bug: it is expected behavior. The definition:

fooA fooB : bar

does NOT mean that both fooA and fooB are created by a single execution of the target rule. The above syntax is identical to this:

fooA : bar

fooB : bar

or in other words, you can create a fooA by running this command, and a fooB by running this command again. In parallel, make does exactly that.

Paul D. Smith <psmith>
Project Administrator
Tue 28 Jan 2003 05:40:20 PM UTC, comment #1:

Please contact me if you need any more information.

Giuliano Procida <myxie>
Mon 27 Jan 2003 12:24:33 PM UTC, original submission:

# this exhibits the problem:
# touch bar; make -j -d fooA fooB
# tested with GNU make version 3.77 and 3.79.1
fooA fooB: bar
[tabhere]touch foo; cp foo fooA; cp foo fooB; rm foo

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 28 Jan 2003 05:57:13 PM UTCpsmithStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1