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 ${@} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 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-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make