[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #35135] $() constructs that span multiple lines may add un-intended
From: |
anonymous |
Subject: |
[bug #35135] $() constructs that span multiple lines may add un-intended newlines |
Date: |
Tue, 20 Dec 2011 22:28:42 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2 |
URL:
<http://savannah.gnu.org/bugs/?35135>
Summary: $() constructs that span multiple lines may add
un-intended newlines
Project: make
Submitted by: None
Submitted on: Tue 20 Dec 2011 10:28:41 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.82
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
Example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
define SOME_MACRO =
$(if ${SOMETHING}
, RESULT1
, RESULT2
)
endef
%.o : %.cc
${CC} ${FLAGS} ${SOME_MACRO} ${MORE_FLAGS} ${<} -o address@hidden
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
In 3.81 this won't work at all -- $(if ...) statements won't span multiple
lines correctly in that version. In 3.82, it parses correctly but inserts
newlines. The net behavior is ${CC} gets executed with ${FLAGS}, and may or
may not include either RESULT1 or RESULT2, but ${MORE_FLAGS} and everything
past it gets executed separately within the sub-shell.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35135>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #35135] $() constructs that span multiple lines may add un-intended newlines,
anonymous <=