[Scons-users] scons 'Install' builder could not recognize file changed
Ronex Dicapriyo
ronex_89 at yahoo.in
Sat Jul 5 09:20:33 EDT 2014
Hello Dirk,
Previously As you have mentionoed before the reason for the file didn't get copied as below:
"you are calling SCons with the explicit target "main", so the Default() targets don't get selected"
In my example I want the file(any file used in Install builder for copy) get copied in the common directory, even when I call with main target. (If it's modified)
But I think I am asking for the wrong behaviour.
On Saturday, 5 July 2014 1:42 AM, Dirk Bächle <tshortik at gmx.de> wrote:
On 04.07.2014 21:10, Ronex Dicapriyo wrote:
On Friday, 4 July 2014 10:28 PM, Dirk Bächle <tshortik at gmx.de> wrote:
>
>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.
>>
My quetion is related to the example I have attached in this thread. Let me try to paraphrase the same:
>install = env.Alias('install', [copy_file_1,
copy_file_2, sum_lib])
>env.Default(install)
>
>By this I am giving three target a same name, or
maybe in Makefile it can e represented as
>install : copy_file_1, copy_file_2, sum_lib (first
two are for copy another to create library)
>
>So, Calling Scons with no argument, it will excute
all the three target specified in list.
>
>But in the example I wan to build only main target,
and the targets whose associated contents are
changed/modified. So, if I am changing a file, so it
need to be copied even though it's target is not
used.
>
That's the default behaviour of SCons, so I still wonder what you're missing. How do you want to call the "scons" script, and which targets do you want to get built then?
[...]
>
>
>2) If you explicitly specify one, or several, targets on the command-line, only this/these get built (and its/their children, if required).
what about Dependencies here ?
>I mean to say for Program builder some libs are
specified that are not build,
>env.Program(target = 'prog', SRC= sr_list,
LIBS=['a', 'b', 'c'], LIBPATH=[<path for all
lib>], CPPPATH=inc_list).
>
>SConscript('<dir_a>/SConscript')
>then here if liba.a is not present , But sconscript
call is present which creates library, Here it would
build liba.a first then execute Program builder. Or
Am I wrong ?
>
>So along with children, the kind of dependencies I
mentioned would also get handle, Am I right ?
>
The dependencies of a target (or any other intermediate node that gets built in some way), are its children in the dependency graph. So both are the same thing. And yes, the "liba.a" would be built first if it didn't exist yet, or one of its children (=dependencies) would have changed.
I don't think so. Why do you want to avoid it?
>>
Because if no library is present in src, And I am not using that directory for library at all, using it in the LIBPATH doesn't makes any sense.
>
>
But you are using the "src" directory by specifying it in the VariantDir call. This defines that if a file can't be found in the "build" dir, it's looked up in the "src" dir as fallback. You don't need this in your examples, but other users do...and rely on the right things to happen, which includes setting the LIBPATH properly such that the required libraries get found one way or the other. That's why it does make sense...
Dirk
_______________________________________________
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/20140705/cceed75f/attachment-0003.html>
More information about the Scons-users
mailing list