bugmake - Bugs: bug #14334, Double colon :: dependencies...

 
 

bug #14334: Double colon :: dependencies behave differently from previous versions and other make's

Submitted by:  Patrick W Daly <pwdaly>
Submitted on:  Tue 30 Aug 2005 08:27:29 AM UTC  
 
Severity: 5 - BlockerItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Boris Kolpackov <bosk>Open/Closed: Closed
Component Version: 3.80Operating System: Any
Fixed Release: 3.81Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 07 Dec 2005 11:41:10 AM UTC, comment #2:

Committed the fix to the repository.

Boris Kolpackov <bosk>
Project MemberIn charge of this item.
Tue 06 Dec 2005 03:45:30 PM UTC, comment #1:

Commenting the loop around remake.c:876 out resulted in a regression that shows this loop is there for a reason. Consider the following makefile:

all: foo; @touch $@

foo:: bar; @touch $@

foo:: baz; @touch $@

If we run this makefile (with the look commented out) when bar being older than foo and baz newer then foo then all won't be updated because the decision is made based on "foo:: bar"'s timestamp. The loop ensures that all individual rules in a double-colon family end up with the "latest" timestamp.

The fix that I came up with postpones this timestamp propagation until after all individual rules have been updated (file->updated != 0). It also computes max_mtime among the entries and assigned that to each entry's last_mtime. With this approach there are not regressions in the test suite.

I am going to commit the fix shortly.

Boris Kolpackov <bosk>
Project MemberIn charge of this item.
Tue 30 Aug 2005 08:27:29 AM UTC, original submission:

I am providing a software project with over 250 modules in Fortran and C to colleagues using different platforms, from Suns, Linux, WIN32, and portability is important to me. The software is portable, but recently I discovered that the makefile no longer works as expected under Linux with gnu make 3.80. It works with make 3.79.1 and with the Sun and Microsoft make programs. The problem is with the :: multiple dependencies. I created a simple makefile to demonstrate the problem. (In the original, I am creating a library from Fortran and C modules separately.)

test.tmp :: one.tmp
echo Dependence One>>test.tmp

test.tmp :: two.tmp
echo Dependence Two>>test.tmp

If test.tmp does not exist, both commands are to be executed. With 3.80, test.tmp is created with the first command, then tested against two.tmp, which is obviously older, and so the second is skipped. All other make's, including gnu make 3.79.1, test both conditions at the start and execute both commands, as I want.

So I tried replacing the :: with a single : with the result that 3.80 ignores the first block, telling me that the second has overwritten the first. The other make's behave as though I put everything into a single block. This is what I finally did to get portability, but then everything is reprocessed even when only one block is necessary. Rather too much than too little, but it does take longer.

Consistency with other make programs, as well as with earlier versions of the gnu program, should be paramount for something that is so fundamental. I do not want a special makefile just for gnu make 3.80 and later.

Regards, Patrick

Patrick W Daly <pwdaly>

 

(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 6 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Apr 2006 07:17:35 AM UTCpsmithFixed Release4.0=>3.81
Wed 07 Dec 2005 11:41:10 AM UTCboskStatusNone=>Fixed
  Open/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.0
Mon 05 Dec 2005 02:35:48 PM UTCboskAssigned toNone=>bosk
Fri 28 Oct 2005 03:25:07 PM UTCpsmithSeverity3 - Normal=>5 - Blocker

Back to the top


Powered by Savane 3.1-cleanup1