[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #25780] .SECONDEXPANSION: of $$+ harmed by set_file_variables() sid

From: anonymous
Subject: [bug #25780] .SECONDEXPANSION: of $$+ harmed by set_file_variables() side effect
Date: Fri, 06 Mar 2009 19:04:40 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/2009020911 Ubuntu/8.04 (hardy) Firefox/3.0.6


                 Summary: .SECONDEXPANSION: of $$+ harmed by
set_file_variables() side effect
                 Project: make
            Submitted by: None
            Submitted on: Fri 06 Mar 2009 07:04:38 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: Any
           Fixed Release: None



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

This program built for x86_64-pc-linux-gnu
> ls -1
> 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
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 : ;
a%l: q1x $$+ q2x ; @echo '$+'

> make -f Makefile.2
q1x bar q2x bar


File Attachments:

Date: Fri 06 Mar 2009 07:04:38 PM UTC  Name: Makefile.1  Size: 307B   By:

Date: Fri 06 Mar 2009 07:04:38 PM UTC  Name: Makefile.2  Size: 364B   By:



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]