bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19236] Imported variable with trailing backslash messes up make's


From: Christoph Schulz
Subject: [bug #19236] Imported variable with trailing backslash messes up make's line parsing in nested evaluations
Date: Thu, 08 Mar 2007 07:44:15 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]