Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <50028CAE26D1D3118C7F00A0CC50D6252D1E57@EMWARESERVER> From: Scott Carter To: "'cygwin AT sourceware DOT cygnus DOT com'" Subject: RE: make --win32 incorrectly handles PATH Date: Fri, 21 Jul 2000 16:26:20 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Here's another clue into the PATH problem. I've modified my example makefile to give a fuller view of the subprocess's environment (using set | grep -i path). ==================== D:\testmake>type makefile # Filename: makefile # PATH := $(PATH):c:/added/in/makefile:PATH .PHONY : all all : @echo $$PATH=$(PATH) @echo ----- @echo %PATH=%PATH% @echo ----- @echo %Path=%Path% @echo ----- @path @echo ----- @set | grep -i path # #EOF D:\testmake>path PATH=C:\WINNT\system32;C:\WINNT;c:\bin;c:\cygwin\bin D:\testmake>make --win32 $PATH=/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/bin:/usr/bin: c:/added/in/makefile:PATH ----- %PATH=C:\WINNT\system32;C:\WINNT;c:\bin;c:\cygwin\bin ----- %Path=C:\WINNT\system32;C:\WINNT;c:\bin;c:\cygwin\bin ----- PATH=C:\WINNT\system32;C:\WINNT;c:\bin;c:\cygwin\bin ----- PATH=C:\WINNT\system32;C:\WINNT;c:\bin;c:\cygwin\bin PATH=c:\WINNT\system32;c:\WINNT;c:\bin;C:\cygwin\bin;c;c:\cygwin\added\in\ma kefile;PATH [ extraneous clutter not shown ] ==================== Note that there are TWO environment variables named PATH ! The value of the first one is the same as the %PATH% value before running make. The value of the second one looks a lot like the $PATH value constructed in the makefile. My guess is that make is constructing the environment for the subprocess, and inserting a second PATH (or perhaps Path or even path?) variable, when it should be replacing the previous PATH variable. I think you can have both PATH and Path variables in a unix environment, but in DOS/WIN, that shouldn't be possible. I'm further guessing that when a program (or the OS) read the environment looking for PATH, that it takes the first one it finds. If I change nothing in the makefile, but shorten my PATH, this is the output: ==================== D:\testmake>path PATH=c:\bin;c:\cygwin\bin D:\testmake>make $PATH=/cygdrive/c/bin:/usr/bin:c:/added/in/makefile:PATH ----- %PATH=c:\bin;C:\cygwin\bin;c;c:\cygwin\added\in\makefile;PATH ----- %Path=c:\bin;C:\cygwin\bin;c;c:\cygwin\added\in\makefile;PATH ----- PATH=c:\bin;C:\cygwin\bin;c;c:\cygwin\added\in\makefile;PATH ----- PATH=c:\bin;C:\cygwin\bin;c;c:\cygwin\added\in\makefile;PATH PATH=c:\bin;c:\cygwin\bi@ [ extraneous clutter not shown ] ==================== This looks very different from the first trial. Scott Carter Software Engineer -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com