URL: <http://savannah.gnu.org/bugs/?19236>
Summary: Imported variable with trailing backslash messes up make's line parsing in nested evaluations Project: make Submitted by: kristovschulz Submitted on: Donnerstag 08.03.2007 um 08:44 Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.81 Operating System: Any Fixed Release: None _______________________________________________________ Details: Consider following Makefile: backslash := $(strip \) A := X$(backslash) define Y ifeq (1,1) B := $(A) endif endef $(eval $(Y)) If B contains a value with a trailing backslash then make aborts with the following error: Makefile:8: *** missing `endif'. Stop. Somehow the trailing backslash of the variable A is considered a line continuation character within the nested evaluation, such that make misses the terminating "endif". Background: The original problem was a PATH with a trailing backslash imported from the environment. Within an "eval"uated "define" statement I used something like: define $(COMP)_CUSTOM_WX_TARGET ifneq ($(filter bcb%,$(TOOLSET)),) $(1): export PATH := $(BCCDIR)bin;$(PATH) endif endef This did not work and bailed out with the error mentioned above, as my PATH had a trailing backslash (this happened under MS Windows, but the problem with the trailing backslash can be reproduced on any platform). _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Donnerstag 08.03.2007 um 08:44 Name: Makefile Size: 106B By: kristovschulz The makefile that exhibits the bug <http://savannah.gnu.org/bugs/download.php?file_id=12147> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?19236> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make