bug-make
[Top][All Lists]
Advanced

[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:1.9.0.6) Gecko/2009020911 Ubuntu/8.04 (hardy) Firefox/3.0.6

URL:
  <http://savannah.gnu.org/bugs/?25780>

                 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

    _______________________________________________________

Details:

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





    _______________________________________________________

File Attachments:


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

<http://savannah.gnu.org/bugs/download.php?file_id=17602>
-------------------------------------------------------
Date: Fri 06 Mar 2009 07:04:38 PM UTC  Name: Makefile.2  Size: 364B   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=17603>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?25780>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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