bug-make
[Top][All Lists]
Advanced

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

[bug #51972] target-specific assignments and target definitions in multi


From: J. Hart
Subject: [bug #51972] target-specific assignments and target definitions in multi-line variable definitions not handled correctly
Date: Sat, 9 Sep 2017 17:33:33 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #1, bug #51972 (project make):

as mentioned in but 51972 by another poster, I had neglected to account for
the initial expansion of $(OBJ1) in the definition of EXELNK

here is a corrected version with that (hopefully) taken into account:

case 1 :
Makefile:

define EXELNK
#$(1): OBJ1=xOBJ1
$(1):;@echo "jfh1:pt1:$$(OBJ1):"
endef
$(call EXELNK,utl1)
#utl1:;@echo "jfh1:pt1:$(OBJ1):"

result of "make" :
make: *** No targets. Stop.

case 2 :
Makefile :

define EXELNK
$(1): OBJ1=xOBJ1
$(1):;@echo "jfh1:pt1:$$(OBJ1):"
endef
$(call EXELNK,utl1)
#utl1:;@echo "jfh1:pt1:$(OBJ1):"

result of "make" :
make: *** No targets. Stop.

case 3 :
Makefile :

define EXELNK
$(1):;@echo "jfh1:pt1:$$(OBJ1):"
endef
$(call EXELNK,utl1)
#utl1:;@echo "jfh1:pt1:$(OBJ1):"

result of "make" :
works as expected

case 4 :
Makefile :

define EXELNK
$(1): OBJ1=xOBJ1
#$(1):;@echo "jfh1:pt1:$$(OBJ1):"
endef
$(call EXELNK,utl1)
utl1:;@echo "jfh1:pt1:$(OBJ1):"

result of "make" :
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [Makefile:7: utl1] Error 2

case 5 :
Makefile :

define EXELNK
$(1): OBJ1=xOBJ1
endef
$(call EXELNK,utl1)
utl1:;@echo "jfh1:pt1:$(OBJ1):"

result of "make" :
works as expected 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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