/[escript]/trunk/doc/cookbook/SConscript
ViewVC logotype

Diff of /trunk/doc/cookbook/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3276 by caltinay, Thu Oct 14 04:02:06 2010 UTC revision 3277 by caltinay, Fri Oct 15 01:06:24 2010 UTC
# Line 13  Line 13 
13    
14  import os  import os
15  Import('*')  Import('*')
16  local_env = env.Clone()  local_env = env.Clone(tools=['pdflatex'])
17    
18  tex_src = Glob('*.tex')+Glob('*.bib')+Glob('*.sty')+Glob('*.cfg')+Glob('*.cls')  tex_src = Glob('*.tex')+Glob('*.bib')+Glob('*.sty')+Glob('*.cfg')+Glob('*.cls')
19  fig_src = Glob('figures/*.png')  fig_src = Glob('figures/*.png')
20    
21  if local_env['verbose']:  if 'PDF' in dir(local_env):
22      interaction='-interaction=nonstopmode'      if local_env['verbose']:
23  else:          interaction='-interaction=nonstopmode'
24      interaction='-interaction=batchmode'      else:
25            interaction='-interaction=batchmode'
26  # Define command to include SVN revision  
27  local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{cookbook.tex}'%(local_env['svn_revision'])])      # Define command to include SVN revision
28  pdf=local_env.PDF(target='cookbook.pdf', source='cookbook.tex')      local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{cookbook.tex}'%(local_env['svn_revision'])])
29  Depends(pdf, fig_src+tex_src)      pdf=local_env.PDF(target='cookbook.pdf', source='cookbook.tex')
30        Depends(pdf, fig_src+tex_src)
31    
32  pdf_inst=local_env.InstallAs(target=env['prefix']+'/release/doc/cookbook/cookbook.pdf', source=pdf)      pdf_inst=local_env.InstallAs(target=env['prefix']+'/release/doc/cookbook/cookbook.pdf', source=pdf)
33    
34  env.Alias('cookbook_pdf', pdf_inst)      env.Alias('cookbook_pdf', pdf_inst)
35    else:
36        env.Alias('cookbook_pdf', '', 'echo "PDF output not supported!"')
37        env.AlwaysBuild('cookbook_pdf')
38    

Legend:
Removed from v.3276  
changed lines
  Added in v.3277

  ViewVC Help
Powered by ViewVC 1.1.26