[Scons-users] scons 'Install' builder could not recognize file changed

Dirk Bächle tshortik at gmx.de
Fri Jul 4 12:58:25 EDT 2014


Ronex,

On 04.07.2014 05:20, Ronex Dicapriyo wrote:
> [...]
>
> 1) Is there any way that I can add explicit dependency on alias_target 
> of sum (i.e. 'install', [copy_file_1, copy_file_2, sum_lib]). This 
> will make sure to copy file. Allowing execution of Default targets of 
> SConscript sum and mul using main target in the command line explicitly.
>
I'm sorry, but I don't understand what you're trying to accomplish here. 
In general: Your SConstructs/SConscripts get read and parsed to collect 
the tree of targets and source Nodes, without executing any Builders and 
independent of the order they appear in the build description files 
(remember that the SCons scripts are basically written in a declarative 
style).
Then the build phase starts, and creates the targets you selected.

1.) If you don't specify a target on the command-line this will be ".", 
or all the targets you marked with the Default() method instead.
2.) If you explicitly specify one, or several, targets on the 
command-line, only this/these get built (and its/their children, if 
required).
3.) You can build a set of targets and give it a new name, via the Alias 
method. An Alias is a target, too.

And that's about it, this is the basic toolbox that you can choose from. 
So, have your pick...

> 2) I noticed in documents for Default function it uses directly, 
> without any object.
>     Which is the right way to use : Default() or env.Default() ?
In this case there is no difference, both methods are wrappers that 
collect the Default in the same "global variable".

>> Because you're using the VariantDir option with duplicate=0, SCons 
>> includes the variant dirs as well as the source folders. The actual 
>> library file could exist in either one of them, or both.
> Is there any way to avoid this, using the VariantDir in a way I have 
> used, rather then using it in SConscript funcion call ?

I don't think so. Why do you want to avoid it?

Best regards,

Dirk

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


More information about the Scons-users mailing list