double_quoted_string_re = re.compile(r'"([^"]*)"', re.M)
+# SCons' LaTeX scanner doesn't understand \asyfig{}, so keep track of
+# all Asymptote graphics under a single phony target.
+asyfigs = SCons.Script.Alias('asymptote-figures')
+
def asymptote_scan(node, env, path, arg=None):
"""
>>> class node (object):
target.extend(['%s-comp.%s' % (filebase, ext)
for ext in ['idx', 'log', 'nlo', 'pdf']])
source.append(SCons.Script.Alias('asytools'))
+ # side effect, keep track of all asymptote graphics.
+ env.Depends(asyfigs, target)
return target, source
AsymptoteAction = None
# Alias the thesis' base latex, which is used by asyprocess when
# building the Asymptote graphics.
-Alias('latex-base', [Glob('*.tex'), Alias('extra-packages')])
+env.Alias('latex-base', [Glob('*.tex'), env.Alias('extra-packages')])
# Add a rule for the thesis itself.
thesis = env.PDF('root.tex')
-Depends(thesis, Alias('extra-packages'))
+env.Depends(thesis, env.Alias('extra-packages'))
+env.Depends(thesis, env.Alias('asymptote-figures'))
Return('thesis')
Import('env')
asy = env.Alias('asytools', ['asyprocess', 'wtk_graph.asy'])
-Depends(asy, Alias('latex-base'))
+env.Depends(asy, Alias('latex-base'))
# Pass back the modified environment.
Return('env')
from site_cons.site_init import link_wtk_graph
-FIGURES = ['v-dep', 'i-dep'] #'loading-rate', 'i-dep']
+FIGURES = ['v-dep', 'loading-rate', 'i-dep']
# Get the passed in environment.
Import('env')