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

Diff of /trunk/doc/install/SConscript

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

revision 3276 by jfenwick, Mon Oct 11 01:48:14 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  latexmode='-interaction=nonstopmode'  tex_src = Glob('*.tex')+Glob('*.bib')+Glob('*.sty')+Glob('*.cfg')+Glob('*.cls')
19  tex_dir = local_env.Dir('.').srcnode().abspath  #fig_src = Glob('figures/*.png') no figures yet
 dir_cmd = "cd "+tex_dir+" && "  
 tex= [ env.File(x) for x in os.listdir(tex_dir) if not x.startswith('.') and not os.path.isdir(tex_dir+os.path.sep+x) and os.path.splitext(x)[1] in ['.tex', '.bib', '.sty', '.cfg', '.cls'] ] + \  
      [ env.File('figures'+os.path.sep+x) for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') ]  
   
 latexcmd=dir_cmd+"pdflatex %s \\\\newcommand{\\\\RepVersion}{`svnversion`\\\\xspace}\\\\input{install.tex}"%latexmode  
   
 local_env.Command(env['prefix']+'/doc/install/install.pdf', tex,  
             [ latexcmd, \  
               dir_cmd+"makeindex install", \  
               latexcmd, \  
               latexcmd ] \  
 )  
20    
21  tmp=local_env.InstallAs(target=env['prefix']+'/release/doc/install/install.pdf', source=env['prefix']+'/doc/install/install.pdf')  if 'PDF' in dir(local_env):
22        if local_env['verbose']:
23  env.Alias('install_pdf', tmp)          interaction='-interaction=nonstopmode'
24        else:
25            interaction='-interaction=batchmode'
26    
27        # Define command to include SVN revision
28        local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{install.tex}'%(local_env['svn_revision'])])
29        pdf=local_env.PDF(target='install.pdf', source='install.tex')
30        Depends(pdf, tex_src)
31    
32        pdf_path=os.path.join(release_dir, 'install', 'install.pdf')
33        pdf_inst=local_env.InstallAs(target=pdf_path, source=pdf)
34        env.Alias('install_pdf', pdf_inst)
35    else:
36        env.Alias('install_pdf', '', 'echo "PDF output not supported!"')
37        env.AlwaysBuild('install_pdf')
38    

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

  ViewVC Help
Powered by ViewVC 1.1.26