bugmake - Bugs: bug #12078, Failure to recognise updated file...

 
 

bug #12078: Failure to recognise updated file from pattern rule with multiple targets

Submitted by:  None
Submitted on:  Mon 21 Feb 2005 04:56:58 PM UTC  
 
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  3.80 Operating System:  Any
Fixed Release:  None Triage Status:  None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 24 Sep 2010 06:29:17 PM UTC, comment #2:

Hi folks, thanks for all the hard work.

Any chance of this one being fixed any time soon? After all, pattern rules are the only way of telling make about a program that produces two or more output files. This bug means that it is necessary to run make twice or more when lex (say) is present during a build.

I have a build where many targets are built by a single invocation of a custom tool. I haven't really found a nice work around for this bug.

Anonymous
Tue 01 Mar 2005 05:27:07 PM UTC, comment #1:

Hm. Ouch. The problem is that by the time make notices that b.1st needs to be rebuilt, it's already examined a.2nd and a.1st and determined they DIDN'T need to be rebuilt. So, it never notices that after b.1st, a.2nd is now out of date.

To fix this, make should check ALL of the co-targets for update when it checks the FIRST co-target.

I'm not sure this change will make it into the next release though.

Paul D. Smith <psmith>
Project Administrator
Mon 21 Feb 2005 04:56:58 PM UTC, original submission:

Consider this:

$ cat Makefile
1st := a.1st b.1st c.1st
2nd := ${1st:.1st=.2nd}

.PHONY: all
all: ${2nd}

a.% b.% c.%: # All the *.1st files are created by a single invocation
touch ${1st}

${2nd}: %.2nd: %.1st
cat $< >$@

$ make
touch a.1st b.1st c.1st
cat a.1st >a.2nd
cat b.1st >b.2nd
cat c.1st >c.2nd
$ make
make: Nothing to be done for `all'.

Fine. All files are up to date.

$ rm b.1st
$ make
touch a.1st b.1st c.1st
cat b.1st >b.2nd
cat c.1st >c.2nd

Urk! a.2nd is out of date with respect to a.1st. We need to run make again.

$ make
cat a.1st >a.2nd

Hmmm.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #2603:  Makefile added by None (335B - application/octet-stream - After a sucessful make invocation, things are still not up to date)

 

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 add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-02-21 bobbogo Carbon-Copy- => Added bobbogo
2005-02-21 None Attached File- => Added Makefile, #2225

Back to the top


Powered by Savane 3.3