make-w32
[Top][All Lists]
Advanced

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

Re: Why gmake create two path environment variables


From: freeman . liu
Subject: Re: Why gmake create two path environment variables
Date: Mon, 20 Oct 2008 18:09:13 +0800


Hi, Eli,

Thanks for your answer !


>>
>> Is there any real-life situation where this dual Path/PATH arrangement
>> causes trouble?  If so, please describe that situation in detail.

Yes. One analysing tool need to change the path so that I can get invoked before
the cmd of the same name. It is in written in perl and it works fine in dos shell.
But it refuse to work when the exact same command is issue from within gmake makefile.
nmake does not have that problem.

I have minimize the detail way to reproduce the issue here.

This is a question about how to set path environment variable in windows from with in a gmake makefile. I use active perl but I dont think this matters.

The perl script that cause problem is copied here:

*******************************************************************************************
$ENV{'Path'}="ABC" .  ";" . $ENV{'Path'};
system("set path") == 0 or die "fail : $?: $!:"
*******************************************************************************************

And when it is executed, the output is this:
*******************************************************************************************
PATH=ABC;C:\Program Files\CSL Arm Toolchain\bin;C:\Perl10\site\bin;C:\Perl10\bin
;C:\Apps\ARM\RVCT\Programs\2.2\349\win_32-pentium;C:\Apps\ARM\bin\win_32-pentium
;C:\Perl\bin;N:\epoc32\tools;N:\epoc32\gcc\bin;N:\epoc32\gcc_mingw\bin;C:\Symbia
n\SITK\stat\bin;C:\Symbian\SITK;C:\Symbian\SITK\edgd\bin\;C:\Symbian\SITK\cbr;C:
\Symbian\SITK\ucc\bin;C:\Symbian\SITK\ucc\SyncService\bin;C:\Symbian\SITK\ucc\Te
stDriverService\bin;C:\Symbian\SITK\sqlite-db-creator;C:\Symbian\SITK\testdriver
;C:\Symbian\SITK\imgcheck;C:\Symbian\SITK\SystemModelGenerator;;C:\Apps\Reltools
;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\i386;c:\Prog
ram Files\Novell\ZENworks\;C:\Program Files\QuickTime\QTSystem\;C:\APPS\Nokia\Ca
rbide.c++ v1.3\x86Build\Symbian_Tools\Command_Line_Tools;C:\Apps\Perforce;C:\App
s\Perforce\;C:\Program Files\Common Files\Symbian\Tools;c:\apps\Coverity\bin;C:\
Apps\Coverity\bin;C:\Apps\ARM\Utilities\FLEXlm\9.2\release\win_32-pentium;C:\Pro
gram Files\Rational\TestRealTime\bin\intel\win32;C:\Program Files\Rational\commo
n;C:\Program Files\Vim\vim71\;\epoc32\tools\perllib;\test\common\runtest;C:\Symb
ian\P4\EPOC\DV4\personal\2008\kunxu\test\common\runtest;C:\Symbian\9.5\epoc32\to
ols\perllib;C:\ECloud\i686_win32\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
*******************************************************************************************

But if it is execuated insdie gmake makefile like this;
*******************************************************************************************
all:
        perl t.pl
*******************************************************************************************

The output of make is like this:
*******************************************************************************************
perl t.pl
Path=ABC;c:\symbian\9.5\epoc32\tools\;c:\symbian\9.5\epoc32\gcc\bin\;C:\Program
Files\CSL Arm Toolchain\bin;C:\Perl10\site\bin;C:\Perl10\bin;C:\Apps\ARM\RVCT\Pr
ograms\2.2\349\win_32-pentium;C:\Apps\ARM\bin\win_32-pentium;C:\Perl\bin;N:\epoc
32\tools;N:\epoc32\gcc\bin;N:\epoc32\gcc_mingw\bin;C:\Symbian\SITK\stat\bin;C:\S
ymbian\SITK;C:\Symbian\SITK\edgd\bin\;C:\Symbian\SITK\cbr;C:\Symbian\SITK\ucc\bi
n;C:\Symbian\SITK\ucc\SyncService\bin;C:\Symbian\SITK\ucc\TestDriverService\bin;
C:\Symbian\SITK\sqlite-db-creator;C:\Symbian\SITK\testdriver;C:\Symbian\SITK\img
check;C:\Symbian\SITK\SystemModelGenerator;;C:\Apps\Reltools;C:\WINDOWS\system32
;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\i386;c:\Program Files\Novell\ZEN
works\;C:\Program Files\QuickTime\QTSystem\;C:\APPS\Nokia\Carbide.c++ v1.3\x86Bu
ild\Symbian_Tools\Command_Line_Tools;C:\Apps\Perforce;C:\Apps\Perforce\;C:\Progr
am Files\Common Files\Symbian\Tools;c:\apps\Coverity\bin;C:\Apps\Coverity\bin;C:
\Apps\ARM\Utilities\FLEXlm\9.2\release\win_32-pentium;C:\Program Files\Rational\
TestRealTime\bin\intel\win32;C:\Program Files\Rational\common;C:\Program Files\V
im\vim71\;\epoc32\tools\perllib;\test\common\runtest;C:\Symbian\P4\EPOC\DV4\pers
onal\2008\kunxu\test\common\runtest;C:\Symbian\9.5\epoc32\tools\perllib;C:\EClou
d\i686_win32\bin;
Path=c:\symbian\9.5\epoc32\tools\;c:\symbian\9.5\epoc32\gcc\bin\;C:\Program File
s\CSL Arm Toolchain\bin;C:\Perl10\site\bin;C:\Perl10\bin;C:\Apps\ARM\RVCT\Progra
ms\2.2\349\win_32-pentium;C:\Apps\ARM\bin\win_32-pentium;C:\Perl\bin;N:\epoc32\t
ools;N:\epoc32\gcc\bin;N:\epoc32\gcc_mingw\bin;C:\Symbian\SITK\stat\bin;C:\Symbi
an\SITK;C:\Symbian\SITK\edgd\bin\;C:\Symbian\SITK\cbr;C:\Symbian\SITK\ucc\bin;C:
\Symbian\SITK\ucc\SyncService\bin;C:\Symbian\SITK\ucc\TestDriverService\bin;C:\S
ymbian\SITK\sqlite-db-creator;C:\Symbian\SITK\testdriver;C:\Symbian\SITK\imgchec
k;C:\Symbian\SITK\SystemModelGenerator;;C:\Apps\Reltools;C:\WINDOWS\system32;C:\
WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\i386;c:\Program Files\Novell\ZENwork
s\;C:\Program Files\QuickTime\QTSystem\;C:\APPS\Nokia\Carbide.c++ v1.3\x86Build\
Symbian_Tools\Command_Line_Tools;C:\Apps\Perforce;C:\Apps\Perforce\;C:\Program F
iles\Common Files\Symbian\Tools;c:\apps\Coverity\bin;C:\Apps\Coverity\bin;C:\App
s\ARM\Utilities\FLEXlm\9.2\release\win_32-pentium;C:\Program Files\Rational\Test
RealTime\bin\intel\win32;C:\Program Files\Rational\common;C:\Program Files\Vim\v
im71\;\epoc32\tools\perllib;\test\common\runtest;C:\Symbian\P4\EPOC\DV4\personal
\2008\kunxu\test\common\runtest;C:\Symbian\9.5\epoc32\tools\perllib;C:\ECloud\i6
86_win32\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
*******************************************************************************************
There are one PATH modified and one Path untouched. How can I change both ?
And why there are two ?

Experience innovation in action - visit the Smartphone Show, 21-22 October 2008, Earls Court 2, London



**********************************************************************
Symbian Software Ltd is a company registered in England and Wales with registered number 4190020 and registered office at 2-6 Boundary Row, Southwark, London, SE1 8HP, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify address@hidden and delete the message and any attachments accompanying it immediately. Neither Symbian nor any of its Affiliates accepts liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy.
**********************************************************************


reply via email to

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