Summary: the PATH environment variable seems to get modified
when a makefile is remade
                 Project: make
               Submitter: None
               Submitted: Mon 09 Jan 2023 10:01:07 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.4
        Operating System: MS Windows
           Fixed Release: None
           Triage Status: None


Follow-up Comments:

Date: Mon 09 Jan 2023 10:01:07 PM UTC By: Anonymous
Consider the following minimal example:

# ---

# show the content of the environment variable PATH

$(info PATH = $(shell echo %PATH%))

# the first time the makefile is made, we delete the (empty) file we're
including below.
# this ensures that its rule gets executed and that the makefile gets remade.

ifeq ($(MAKE_RESTARTS),)
$(shell del missing_at_first.mk)

# the first time the makefile is made, this file doesn't exist, but we have a
rule to create it, so we are going to get remade

include missing_at_first.mk

# rule to create an empty file

        @type nul > missing_at_first.mk

# ---

with make 4.4-2, i get the following result:

PATH = C:\msys64-make-4.4-2\mingw64\bin
PATH = C;\msys64-make-4.4-2\mingw64\bin

please notice how the first colon turned to a semicolon on the second pass.

with make 4.3, i get the expected result:

PATH = C:\msys64-make-4.4-2\mingw64\bin
PATH = C:\msys64-make-4.4-2\mingw64\bin


Reply to this item at:


Message sent via Savannah

Reply via email to