bugmake - Bugs: bug #25780, .SECONDEXPANSION: of $$+ harmed by...

 
 

bug #25780: .SECONDEXPANSION: of $$+ harmed by set_file_variables() side effect

Submitter:  None
Submitted:  Fri 06 Mar 2009 07:04:38 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  bosk Open/Closed:  Closed
Component Version:  3.81 Operating System:  Any
Fixed Release:  3.82 Triage Status:  Verified
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 06 Oct 2009 12:38:32 PM UTC, comment #2: 

Fix is in CVS.

Boris Kolpackov <bosk>
Group Member
Mon 03 Aug 2009 02:52:07 AM UTC, comment #1: 

I still see this in the latest CVS.

Paul D. Smith <psmith>
Group administrator
Fri 06 Mar 2009 07:04:38 PM UTC, original submission:  

The following command line session describes and demonstrates
the issue.  It is from Ubuntu x86_64, but probably the behavior
is platform-independent.

-- John Carey


> cat /etc/issue
Ubuntu 8.04.2 \n \l

> make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
> ls -1
Makefile.1
Makefile.2
> cat Makefile.1

# The output should have 4 "foo"s, but instead we see 3.
# It appears that second expansion calls set_file_variables()
# repeatedly for the same target, but set_file_variables()
# eliminates redundant dependencies just after computing "$+".

all : foo foo
.SECONDEXPANSION:
all : $$+ ; @echo '$+'
foo : ;

> make -f Makefile.1
foo foo foo
> cat Makefile.2

# The output should be "q1x bar bar q2x bar bar",
# but instead we see "q1x bar q2x bar".
# Once again second expansion results in multiple calls to
# set_file_variables() for the same target, with bad side effects,
# but here the effect appears to be amplified by pattern matching.

all : bar bar
bar : ;
q%x : ;
.SECONDEXPANSION:
a%l: q1x $$+ q2x ; @echo '$+'

> make -f Makefile.2
q1x bar q2x bar


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #17602:  Makefile.1 added by None (307B - application/octet-stream)
file #17603:  Makefile.2 added by None (364B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bosk (Posted a comment)
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    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.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-28 psmith Fixed Release4.0 3.82
    2009-10-06 bosk StatusNone Fixed
        Assigned toNone bosk
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0
    2009-08-03 psmith Triage StatusNone Verified
    2009-03-06 None Attached File- Added Makefile.1, #17602
        Attached File- Added Makefile.2, #17603

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code