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

 
 

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

Submitted by:  Invalid User ID <Invalid User ID>
Submitted on:  Sat 19 Oct 2002 07:43:46 AM UTC  
 
Severity: 1 - WishItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: NoneOperating System: Any
Fixed Release: 3.81Triage 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 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 8 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Apr 2006 07:02:30 AM UTCpsmithFixed Release4.0=>3.81
Sat 25 Jun 2005 09:32:10 PM UTCpsmithOpen/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.0
Sat 25 Jun 2005 09:32:09 PM UTCpsmithStatusNone=>Fixed
Fri 25 Oct 2002 08:38:01 PM UTCpsmithSeverity3 - 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.1-cleanup1