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

 
 

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

Submitted by:  J. Hart <oss542>
Submitted on:  Sat 09 Sep 2017 07:09:29 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 4.2.1Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 10 Sep 2017 01:39:55 PM UTCpsmithStatusNone=>Not A Bug
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1