bugmake - Bugs: bug #1454, $(if ) cannot parse semi-colons...

 
 

bug #1454: $(if ) cannot parse semi-colons inside arguments

Submitted by:  Invalid User ID <#11708>
Submitted on:  Sat 19 Oct 2002 07:43:46 AM UTC  
 
Severity:  1 - Wish Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Open/Closed:  Closed
Component Version:  None Operating System:  Any
Fixed Release:  3.81 Triage Status:  None

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Sat 25 Jun 2005 09:32:10 PM UTC, comment #3: 

OK, this is fixed for the next version of GNU make.  When a variable or function reference appears on a target definition line, no semicolons (or comment chars, #) inside the reference will be treated specially.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Tue 11 Mar 2003 09:11:46 AM UTC, comment #2: 

It works in an assignment though:

 a:=$(if true,$(shell echo hi; echo bye))

Robert Bogomip <bobbogo>
Fri 25 Oct 2002 08:38:01 PM UTC, comment #1: 

The real issue here is that make sees the semicolon as a part of a target definition, like this:

  all: ; @echo hi

Instead of noticing that the semicolon is contained within a variable reference, if it appears on the context where it could be a target definition make treats it as the end of the target definition.

Note this won't happen in other contexts, like variable assignement, where make doesn't treat ";" as a special character.  Since $(shell ...) is almost always used in a variable assignment context (the above makefile, even if it didn't cause this error, would still result in a syntax error) this hasn't been noticed before.

A workaround would be to hide the semicolon in a variable reference:

  SEMI = ;
  $(if true, $(shell echo hi $(SEMI) echo bye))

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.

 

(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

 

CC list is empty

 

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

Only logged-in users can vote.

 

 

 

Follow 8 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-04-01 psmith Fixed Release4.0 => 3.81
2005-06-25 psmith Open/ClosedOpen => Closed
    Fixed ReleaseNone => 4.0
2005-06-25 psmith StatusNone => Fixed
2002-10-25 psmith Severity3 - Normal => (Error - Not Found)
    Item GroupNone => (Error - Not Found)
    Assigned toNone => NA
    Operating SystemNone => (Error - Not Found)

Back to the top


Powered by Savane 3.5