bugmake - Bugs: bug #13093, "missing separator" with...

 
 

bug #13093: "missing separator" with ${value...} and ${call...}

Submitted by:  None
Submitted on:  Mon 16 May 2005 05:44:04 AM UTC  
 
Severity: 3 - NormalItem Group: None
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: NoneOperating System: None
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.

 

Mon 16 May 2005 11:36:30 AM UTC, comment #1:

This is not a bug. Remember that eval evaluates its argument (after expansion) as if it were a makefile. The call function you've written expands to "arg", which is not a valid makefile fragment; if you write a makefile containing nothing but "arg" and run make you'll get the same error about "missing separator", so in the first case the error is correct.

In the second case, you are hiding the comma behind a variable. This causes make to not see it when parsing up the function and arguments, and when the call function is run it thinks you're trying to call the function "b,arg" with no arguments. There is no variable "b,arg" in your makefile, so it expands to the empty string, and when you eval the empty string you get no error.

Just remember that eval parses its argument after expansion as if it were a makefile. If you think about shell syntax (if you know shell), eval is NOT like `...`: it doesn't expand to any value. So putting it on the right-hand side of an assignment doesn't do anything. Eval is more like the "source" (or ".") operation in shell.

Paul D. Smith <psmith>
Project Administrator
Mon 16 May 2005 05:44:04 AM UTC, original submission:

In make 3.81beta3, the following makefile lines:

a = ${call b,arg}
b = $1

c := ${value a}
d := ${eval $c}

produce a "missing separator" error. The following does not:

define comma
,
endef

a = ${call b${comma}arg}
b = $1

c := ${value a}
d := ${eval $c}

It seems like neither one should produce an error.

Anonymous

 

(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

 

CC list is empty

 

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
Mon 16 May 2005 11:36:30 AM UTCpsmithStatusNone=>Not A Bug
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1