[Scons-users] how to find dependencies of a given Node?
Bill Deegan
bill at baddogconsulting.com
Fri Sep 6 19:55:58 EDT 2013
David,
It doesn't work that way..
Take a read through this.
http://scons.org/wiki/SconsProcessOverview
A SCons Beginner will often think that the actions listed in the
SConstruct/SConscript are executed right away, and that the full dependency
tree is available at that point. It's not. The SConstruct/SConscripts tell
SCons what to do and with what files, and then SCons builds the dependency
tree and processes it.
That said, a custom builder may be able to do what you want.
-Bill
On Fri, Sep 6, 2013 at 3:40 PM, David Roundy <
roundyd at physics.oregonstate.edu> wrote:
> Hi all,
>
> I want to create a tarball for a latex file that includes both the file,
> and all of its direct dependencies (i.e. the image files included in the
> latex, but not the source for those image files). I've been considering
> how to implement this, and my best guess is to try something like:
>
> t = PDF('file.tex')
> deps = RunSconsScanner(t)??? # or 'file.tex'?
>
> # Set TARFLAGS to create a gzip-filtered archive.
> env = Environment(TARFLAGS = '-c -z')
> for node in [t]+deps:
> a = Command(target='archive/'+str(node), source = node,
> action=Copy('$TARGET', '$SOURCE'))
> env.Tar('file.tar.gz', a)
>
> The missing bit here is how to ask scons for the dependencies of
> 'file.pdf'. Any suggestions?
> --
> David Roundy
>
> _______________________________________________
> 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/20130906/66e20f2b/attachment.html
More information about the Scons-users
mailing list