bug-make
[Top][All Lists]
Advanced

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

append assignment operator in target specific variable


From: Hyunho Cho
Subject: append assignment operator in target specific variable
Date: Mon, 20 May 2019 00:52:31 +0900

GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


1. "foo" is simple variable.
   so result have to be 100 but is 200

foo :=
val := 100

all : foo += $(val)
all :
        @echo foo : $(foo)

val := 200

result is : 200
-------------------------------------------------------

2. If i change '+=' operator to ':=' then result is 100

foo :=
val := 100

all : foo := $(val)
all :
        @echo foo : $(foo)

val := 200

result is : 100
----------------------------------

foo :=  
val := 100
foo += $(val)
val := 200
$(info $(foo))

result is : 100 

reply via email to

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