bug-make
[Top][All Lists]
Advanced

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

[bug #65359] submake might will lose variable values if their names cont


From: Howard
Subject: [bug #65359] submake might will lose variable values if their names contain special char
Date: Sat, 24 Feb 2024 06:24:22 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65359>

                 Summary: submake might will lose variable values if their
names contain special char
                   Group: make
               Submitter: news_howardz
               Submitted: Sat 24 Feb 2024 11:24:22 AM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.2.1
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 24 Feb 2024 11:24:22 AM UTC By: Howard <news_howardz>
If the submake cmd line contains any separated char (e.g., ';', '&', '|', ...)
at the end of the make cmd, export var will lose values in the submake process
if these var contain special char (e.g., '+', '-').

Makefile:
-----------------
ifeq ($(LOOP),1)
LOOP = 2
else
export C++ = test1
export C-- = test2
export C__ = test3
export LOOP = 1
endif

$(info C++=$(C++))
$(info C--=$(C--))
$(info C__=$(C__))

ifeq ($(LOOP),2)
all:;
else
all:
        $(MAKE);
endif
------------

$ make
C++=test1
C--=test2
C__=test3
make;
make[1]: Entering directory '/mnt/d/temp'
C++=
C--=
C__=test3
make[1]: 'all' is up to date.
make[1]: Leaving directory '/mnt/d/temp'

If change "$(MAKE);" to "$(MAKE)", we can get the correct result:

$ make
C++=test1
C--=test2
C__=test3
make
make[1]: Entering directory '/mnt/d/temp'
C++=test1
C--=test2
C__=test3
make[1]: 'all' is up to date.
make[1]: Leaving directory '/mnt/d/temp'









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65359>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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