bugmake - Bugs: bug #51972, target-specific assignments and...

 
 

bug #51972: target-specific assignments and target definitions in multi-line variable definitions not handled correctly

Submitter:  J. Hart <oss542>
Submitted:  Sat 09 Sep 2017 07:09:29 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.2.1 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 09 Sep 2017 11:54:44 PM UTC, comment #2: 

As a posted pointed out in #51972, $(eval) was required to parse the result of the $(call) reference.  This resolves this issue.

J. Hart <oss542>
Sat 09 Sep 2017 09:33:33 PM UTC, comment #1: 

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

J. Hart <oss542>
Sat 09 Sep 2017 07:09:29 PM UTC, original submission:  

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

J. Hart <oss542>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Updated the item)
  • -email is unavailable- added by oss542 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-09-10 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code