[Scons-users] Changing working directory
Kenny, Jason L
jason.l.kenny at intel.com
Mon Apr 22 10:55:13 EDT 2013
I remember a few years ago I had made a similar argument that the a cd <directory> should be added to the command line actions with a chdir was added to the builder. I believe this is a good improvements. I don't recall why this was not done. I believe it was something that SCons should fix some code that handles loading a sconstruct/sconscript to have it not change directories at all. ( as it currently will try to change the directory to the source area or build variant area depending on if the build variant directory exists or not).
In short however I am for such as change. I know I have to for some of the work I do in Parts or for my local product builds, so a similar "cd <some directory>" to allow it to work correct and with -J based builds. Have a more formal hook would be nice.
Jason
-----Original Message-----
From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of Pawel Tomulik
Sent: Saturday, April 20, 2013 8:41 AM
To: scons-users at scons.org
Subject: Re: [Scons-users] Changing working directory
Maybe it could be good point to provide something like '$CDCOM'
construction variable by default? Initially it could be defined in a way similar to what the 'tex' tool does:
https://bitbucket.org/scons/scons/src/672a2af57804/src/engine/SCons/Tool/tex.py#cl-926
W dniu 19.04.2013 20:28, Gary Oberbrunner pisze:
> It is better NOT to use the chdir keyword param -- that won't work
> with -j because a process can have only one current working dir. The
> 'cd ...' method works better, but of course is not as cross-platform.
>
>
> On Fri, Apr 19, 2013 at 2:25 PM, Pawel Tomulik
> <ptomulik at meil.pw.edu.pl <mailto:ptomulik at meil.pw.edu.pl>> wrote:
>
> What is actually preferred method for changing working directory by
> tools when using external programs? Some of the tools I've seen use
> construction such as 'cd $TARGET.dir && dosomething $TARGET -o $SOURCE'.
> Is there some reason for this? Is this portable, or maybe it is better
> to use chdir keyword parameter of SCons.Builder.Builder?
>
> Regards?
> --
> Paweł Tomulik
>
> _________________________________________________
> Scons-users mailing list
> Scons-users at scons.org <mailto:Scons-users at scons.org>
> http://four.pairlist.net/__mailman/listinfo/scons-users
> <http://four.pairlist.net/mailman/listinfo/scons-users>
>
>
>
>
> --
> Gary
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
--
Paweł Tomulik
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list