bug-make
[Top][All Lists]
Advanced

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

[bug #35133] Pattern rules used as dependencies for .PRECIOUS don't actu


From: anonymous
Subject: [bug #35133] Pattern rules used as dependencies for .PRECIOUS don't actually do pattern matching
Date: Tue, 20 Dec 2011 22:17:47 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2

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

                 Summary: Pattern rules used as dependencies for .PRECIOUS
don't actually do pattern matching
                 Project: make
            Submitted by: None
            Submitted on: Tue 20 Dec 2011 10:17:46 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.82
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Simple example:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
all: some_target_blah.o stuff.o
  @echo $@, $<

%.y:
  @echo $@

some_target%.cc : %.y
  @echo $@, ${TEST}

%.cc:
  @echo $@, ${TEST}

%.o : %.cc
  @echo $@, $<

#1
%.cc : TEST := stuff

#2
.PRECIOUS: %.cc
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

In the above example, pattern-matching is used in a few different ways; the
two I'm drawing attention to in this bug report are #1 and #2.

#1 causes *EVERY* .cc file to have TEST set.  However, in #2, the pattern
specified as a dependency of .PRECIOUS only applies to files built using a
rule of the form:

%.cc : whatever

Since 'some_target_blah.o' is built using a different pattern, the .PRECIOUS
directive doesn't apply to it; thus, make will still try to remove that file
when it is finished running.





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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