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

                 Summary: target specific make variables are incorrectly
accumulated
                 Project: make
            Submitted by: None
            Submitted on: Sun 14 Jul 2013 08:22:00 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: Any
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

$ cat Makefile
V=
t1: t2
t1: V+=v1
t2: V+=v2
%:
        @echo target=$@ V=$(V)

$ make t1
target=t2 V=v1 v2
target=t1 V=v1
$ make t2
target=t2 V=v2
$ make t2 t1
target=t2 V=v2
target=t1 V=v1
$ make t1 t2
target=t2 V=v1 v2
target=t1 V=v1
make: `t2' is up to date.

i expected V to be consistently v2 for target t2,
the fact that t2 is a dependency of t1 should not
change the variable setting for t2 because that
makes the result unpredictable





    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to