/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1441 by jpye, Mon May 21 10:05:00 2007 UTC revision 1442 by jpye, Sat May 26 07:31:34 2007 UTC
# Line 139  opts.Add(ListOption( Line 139  opts.Add(ListOption(
139  ))  ))
140    
141  # Where will the local copy of the help files be kept?  # Where will the local copy of the help files be kept?
142  opts.Add(PackageOption(  opts.Add(BoolOption(
143      'WITH_LOCAL_HELP'      'WITH_DOC'
144      , "Directory containing the local copy of the help files (optional)"      , "Should help files be built and installed? If not, ASCEND will access online help files"
145      , "no"      , True
146  ))  ))
147    
148    opts.Add(
149        'HELP_ROOT'
150        , "Location of the main help file"
151        , "$INSTALL_DOC/book.pdf"
152    )
153    
154  # Will bintoken support be enabled?  # Will bintoken support be enabled?
155  opts.Add(BoolOption(  opts.Add(BoolOption(
156      'WITH_BINTOKEN'      'WITH_BINTOKEN'
# Line 439  opts.Add( Line 445  opts.Add(
445  )  )
446    
447  opts.Add(  opts.Add(
448        'INSTALL_DOC'
449        ,"Location of ASCEND documentation files"
450        ,"$INSTALL_SHARE/doc/ascend-"+version
451    )
452    
453    opts.Add(
454      'INSTALL_INCLUDE'      'INSTALL_INCLUDE'
455      ,'Location to put header files during installation'      ,'Location to put header files during installation'
456      ,"$INSTALL_PREFIX/include"      ,"$INSTALL_PREFIX/include"
# Line 688  without_mmio_reason = "disabled by optio Line 700  without_mmio_reason = "disabled by optio
700  with_signals = env.get('WITH_SIGNALS')  with_signals = env.get('WITH_SIGNALS')
701  without_signals_reason = "disabled by options/config.py"  without_signals_reason = "disabled by options/config.py"
702    
703    with_doc = env.get('WITH_DOC')
704    without_doc_reason = "disabled by options/config.py"
705    
706    with_latex2html = False
707    
708  if platform.system()=="Windows":  if platform.system()=="Windows":
709      with_installer=1      with_installer=1
710  else:  else:
# Line 1523  def CheckSigReset(context): Line 1540  def CheckSigReset(context):
1540      return is_ok      return is_ok
1541    
1542  #----------------  #----------------
1543    # LyX on this system?
1544    
1545    def CheckLyx(context):
1546        context.Message("Checking for LyX... ")
1547        r = context.env.WhereIs("lyx")
1548        context.Result(r)
1549        return r
1550    
1551    #----------------
1552    # Latex2HTML on this system?
1553    
1554    def CheckLatex2HTML(context):
1555        context.Message("Checking for latex2html...")
1556        if context.env.WhereIs("latex2html"):
1557            r = True
1558        else:
1559            r = False
1560        context.Result(r)
1561        return r
1562    
1563    #----------------
1564  # GCC Version sniffing  # GCC Version sniffing
1565    
1566  # TODO FIXME  # TODO FIXME
# Line 1539  conf = Configure(env Line 1577  conf = Configure(env
1577          , 'CheckPythonLib' : CheckPythonLib          , 'CheckPythonLib' : CheckPythonLib
1578          , 'CheckCUnit' : CheckCUnit          , 'CheckCUnit' : CheckCUnit
1579          , 'CheckDMalloc' : CheckDMalloc          , 'CheckDMalloc' : CheckDMalloc
1580            , 'CheckLyx' : CheckLyx
1581            , 'CheckLatex2HTML' : CheckLatex2HTML
1582          , 'CheckMFGraph' : CheckMFGraph          , 'CheckMFGraph' : CheckMFGraph
1583          , 'CheckUFSparse' : CheckUFSparse          , 'CheckUFSparse' : CheckUFSparse
1584          , 'CheckTcl' : CheckTcl          , 'CheckTcl' : CheckTcl
# Line 1819  if with_scrollkeeper: Line 1859  if with_scrollkeeper:
1859          with_scrollkeeper=False          with_scrollkeeper=False
1860          without_scrollkeeper_reason="unable to detect scrollkeeper-config"          without_scrollkeeper_reason="unable to detect scrollkeeper-config"
1861    
1862    # lyx
1863    
1864    if with_doc:
1865        if not conf.CheckLyx():
1866            with_doc = False
1867            without_doc_reason="unable to locate lyx"
1868    
1869        with_latext2html = conf.CheckLatex2HTML()
1870    
1871  # TODO: -D_HPUX_SOURCE is needed  # TODO: -D_HPUX_SOURCE is needed
1872    
1873  # TODO: check size of void*  # TODO: check size of void*
# Line 1875  subst_dict = { Line 1924  subst_dict = {
1924      , '@SOURCE_ROOT@':c_escape(os.path.abspath(str(env.Dir("#"))))      , '@SOURCE_ROOT@':c_escape(os.path.abspath(str(env.Dir("#"))))
1925  }  }
1926    
1927  if env.get('WITH_LOCAL_HELP'):  if env.get('WITH_DOC'):
1928      print "WITH_LOCAL_HELP:",env['WITH_LOCAL_HELP']      print "WITH_DOC:",env['WITH_DOC']
1929      subst_dict['@HELP_ROOT@']=env['WITH_LOCAL_HELP']      subst_dict['@HELP_ROOT@']=env['HELP_ROOT']
1930    
1931  # bool options...  # bool options...
1932  for k,v in {  for k,v in {
# Line 1903  if with_python: Line 1952  if with_python:
1952      subst_dict['@ASCXX_USE_PYTHON@']="1"      subst_dict['@ASCXX_USE_PYTHON@']="1"
1953      env['WITH_PYTHON']=1;      env['WITH_PYTHON']=1;
1954    
1955    if with_latex2html:
1956        env['WITH_LATEX2HTML']=1
1957    
1958  if env.has_key('HAVE_GCCVISIBILITY'):  if env.has_key('HAVE_GCCVISIBILITY'):
1959      subst_dict['@HAVE_GCCVISIBILITY@'] = "1"      subst_dict['@HAVE_GCCVISIBILITY@'] = "1"
1960    
# Line 2153  ascendconfig = env.SubstInFile('ascend-c Line 2205  ascendconfig = env.SubstInFile('ascend-c
2205    
2206  if env.get('CAN_INSTALL'):  if env.get('CAN_INSTALL'):
2207    
2208      dirs = ['INSTALL_BIN','INSTALL_ASCDATA','INSTALL_LIB', 'INSTALL_INCLUDE']      dirs = ['INSTALL_BIN','INSTALL_ASCDATA','INSTALL_LIB', 'INSTALL_INCLUDE','INSTALL_DOC']
2209      install_dirs = [Dir(env.subst("$INSTALL_ROOT$"+d)) for d in dirs]      install_dirs = [Dir(env.subst("$INSTALL_ROOT$"+d)) for d in dirs]
2210      install_dirs += modeldirs      install_dirs += modeldirs
2211        for d in install_dirs:
2212            print d
2213    
2214      # TODO: add install options      # TODO: add install options
2215      env.Alias('install',install_dirs)      env.Alias('install',install_dirs)
# Line 2187  if platform.system()=="Linux": Line 2241  if platform.system()=="Linux":
2241  #------------------------------------------------------  #------------------------------------------------------
2242  # CREATE OMF FILE FOR USE WITH SCROLLKEEPER  # CREATE OMF FILE FOR USE WITH SCROLLKEEPER
2243    
2244  if with_scrollkeeper:  #if with_scrollkeeper:
2245      env.SubstInFile('#/pygtk/gnome/ascend.omf.in')  #   #env.SubstInFile('#/pygtk/gnome/ascend.omf.in')
2246      env.InstallShared(env['INSTALL_ROOT']+env['OMFDIR'],"#/pygtk/gnome/ascend.omf")  #   #env.InstallShared(env['INSTALL_ROOT']+env['OMFDIR'],"#/pygtk/gnome/ascend.omf")
2247    
2248  #------------------------------------------------------  #------------------------------------------------------
2249  # DISTRIBUTION TAR FILE  # DISTRIBUTION TAR FILE
# Line 2205  tar = env.DistTar("dist/"+env['DISTTAR_N Line 2259  tar = env.DistTar("dist/"+env['DISTTAR_N
2259  )  )
2260    
2261  env.Depends(tar,'ascend.spec')  env.Depends(tar,'ascend.spec')
2262    env.Depends(tar,'#doc/book.pdf')
2263    
2264  Alias('dist',tar)  Alias('dist',tar)
2265    
# Line 2213  Alias('dist',tar) Line 2268  Alias('dist',tar)
2268    
2269  env.SConscript('doc/SConscript',['env'])  env.SConscript('doc/SConscript',['env'])
2270    
2271    
2272  #------------------------------------------------------  #------------------------------------------------------
2273  # LIBASCEND DOXYGEN DOCUMENTATION  # LIBASCEND DOXYGEN DOCUMENTATION
2274    
# Line 2236  if with_installer: Line 2292  if with_installer:
2292      default_targets.append('installer')      default_targets.append('installer')
2293  if with_extfns:  if with_extfns:
2294      default_targets.append('extfns')      default_targets.append('extfns')
2295    if with_doc:
2296        default_targets.append('doc')
2297    
2298  env.Default(default_targets)  env.Default(default_targets)
2299    

Legend:
Removed from v.1441  
changed lines
  Added in v.1442

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22