[Scons-users] how to find dependencies of a given Node?

Managan, Rob managan1 at llnl.gov
Mon Sep 9 11:53:58 EDT 2013


No they would not be. The latex command just requires the top level file and then includes others.

One routine that may help is ScanFiles in Scons/Tool/tex.py
That routine looks for commands that will produce side effect files an may be helpful since it also finds included files…

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Rob Managan email managan at llnl.gov
LLNL phone: 925-423-0903
P.O. Box 808, L-095 FAX: 925-422-3389
Livermore, CA 94551-0808


On 9/6/13 7:33 PM, "William Deegan" <bill at baddogconsulting.com<mailto:bill at baddogconsulting.com>> wrote:

David,

Are the files you want listed on the command line to latex when it's run?

-Bill
On Sep 6, 2013, at 6:27 PM, David Roundy <roundyd at physics.oregonstate.edu<mailto:roundyd at physics.oregonstate.edu>> wrote:

What I really was hopping was that there would be a way to directly access the output of the pdflatex Scanner. I know how to write a Scanner by creating a function that reads the file and outputs a bunch of strings, and was hoping I could just run that function on the latex file. It's not an generated file, and thus is available at the beginning of the scons run when my code is run. I'm not wanting the full dependency tree, just the files that are directly listed in the latex file, which lacks \input{}, and thus does not require any recursive reading.

How would a custom builder access the dependency information? I haven't seen anything that would do that.

In a pinch I could just write my own scanner, but that seems like a waste when scons has a perfectly good latex scanner (except when using beamer, which I'm not for these latex files).

David


On Fri, Sep 6, 2013 at 3:40 PM, David Roundy <roundyd at physics.oregonstate.edu<mailto: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<mailto:Scons-users at scons.org>
http://four.pairlist.net/mailman/listinfo/scons-users



_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
http://four.pairlist.net/mailman/listinfo/scons-users




--
David Roundy
_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto: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/20130909/35f747e9/attachment.htm


More information about the Scons-users mailing list