[Scons-users] VariantDir not working

Dirk Bächle tshortik at gmx.de
Sun Jun 29 05:49:12 EDT 2014


Ronex,

On 29.06.2014 05:09, Ronex Dicapriyo wrote:
>
> On Sunday, 29 June 2014 12:26 AM, Dirk Bächle <tshortik at gmx.de> wrote:
> [...]
>> Suppose module_1 depends on module_2 and module_3 libraries:
>> Then in module_1/SConscript I need to bring/run first the library 
>> target of module_2 and module_3:
>>
>> module_1/SConscript:
>> SConscript(['module_2/SConscript', 'module_3/SConscript'], export='env')
>> module_1_lib = env.StaticLibrary(target='module_1', source=src_files)
>> env.Depend(module_1_lib, module_2_lib)
>> env.Depend(module_1_lib, module_3_lib)
>>
>> I think above implementaton of module_1/SConscript make sure to 
>> execute the
>> module_2_lib and module_3_lib targets and then build library for 
>> module_1.
> Sorry, I am too abstract in terms of explaining details. Here I am 
> using this dependencies because when I build module_2_lib and 
> module_3_lib it copies some headers and other things into common 
> directory, from the common directory location module_1_lib uses them. 
> FOr that I have defined CPPPATH accordingly :
>
> module_1_lib = env.StaticLibrary(target='module_1', source=src_files, 
> CPPPATH=<inc_list>)
>
> So, I need them to be built before, because libraries created for 
> modle_2 and module_3 also gets copied into common location, and 
> further in the script module_1_lib, module_2_lib and module_3_lib gets 
> used to build ".so" with some addition object(".o") files.
>
I kind of understand what you're trying to do here. Your project seems 
to be big enough to bring a lot of junk with it...and whose project 
doesn't ;) .

> [...]
> Using target as 'build/hello' it generated executable in build but 
> objects are still generated into src directory ?
>
> Do I need to create objects separately and then used them into Program 
> builder ?
>
> src_list = Glob(os.path.join('src', '*.cpp')

No, just apply the same basic pattern for the executable to the 
source/object files, and use:

   scr_list = Glob(os.path.join('build','*.cpp'))


instead.

Regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140629/ef0b7cdd/attachment.html>


More information about the Scons-users mailing list