[Scons-users] changing the build directory

Bill Deegan bill at baddogconsulting.com
Mon Mar 11 13:52:12 EDT 2013


On Mon, Mar 11, 2013 at 8:19 AM, Sean Ochoa <sean.m.ochoa at gmail.com> wrote:


> Hey guys. Thanks for this direction. Dirk's advice seems to have

> resolved my issue.

>

> See the github repository for the full source tree.

> https://github.com/seanochoa/IeiuniumTela/tree/develop

>

> I've also added an empty build directory to the repo for completeness.

>

> I find it interesteding that:

>

> a. SCons' version of Glob isn't recursive, in the context of this build

> tool for discovering source. I would expect that a recursive discovery

> option is preferred. :(

>


OS Glob's are rarely recursive, Glob is modelled after that.
That said a recursive find mechanism would often come in handy.



> b. I _need_ to put the scons file in the same directory as the source

> file (which is annoying).

>


You don't need to do this, but when dealing with VariantDir's it is much
easier to do it this way.
Otherwise you need to make sure that your logic is requesting the files in
each variant dir properly.
By placing the SConscript in the variantDir, SCons takes care of that for
you.



> c. Print statements apparently work, but sys.stdout.write doesn't (from

> the python module).

>


Can you reproduce this in a simple SConstruct?
Any reason to use sys.stdout.write over print?

-Bill



>

>

>

>

> On Mon, Mar 11, 2013 at 7:08 AM, Evan Driscoll <driscoll at cs.wisc.edu>wrote:

>

>> On 03/11/2013 03:13 AM, Dirk Bächle wrote:

>> > 2.) use Glob within your SConscript to find all source files like this

>> >

>> > |Program(target = 'main.bin', source = Glob('*.cpp'))|

>> >

>> > This will, in contrast to your approach, also find files that don't

>> > exist yet (because they get created during the build itself).

>>

>> However, it won't find files in subdirectories. Again, SCons's Glob's

>> lack of a recursive option rears its head.

>>

>> (I could be wrong, but my guess is that's why os.walk was being used in

>> the first place instead of just os.listdir or something.)

>>

>> Evan

>>

>>

>> _______________________________________________

>> Scons-users mailing list

>> Scons-users at scons.org

>> http://four.pairlist.net/mailman/listinfo/scons-users

>>

>>

>

>

> --

> Sean | (206) 962-7954

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130311/d532121c/attachment.htm>


More information about the Scons-users mailing list