/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 815 by johnpye, Thu Aug 10 17:08:16 2006 UTC revision 816 by johnpye, Tue Aug 15 14:40:33 2006 UTC
# Line 40  if platform.system()=="Windows": Line 40  if platform.system()=="Windows":
40                    
41      need_libm = False      need_libm = False
42      python_exe = "c:\\Python24\\python.exe"      python_exe = "c:\\Python24\\python.exe"
43        default_with_scrollkeeper=False
44  else:  else:
45      default_tcl_lib = "tcl8.4"      default_tcl_lib = "tcl8.4"
46      default_tk_lib = "tk8.4"      default_tk_lib = "tk8.4"
# Line 61  else: Line 62  else:
62      if not os.path.isdir(default_tcl):      if not os.path.isdir(default_tcl):
63          default_tcl = '/usr'          default_tcl = '/usr'
64      python_exe = distutils.sysconfig.EXEC_PREFIX+"/bin/python"      python_exe = distutils.sysconfig.EXEC_PREFIX+"/bin/python"
65        default_with_scrollkeeper=False
66    
67  opts.Add(  opts.Add(
68      'CC'      'CC'
# Line 367  opts.Add( Line 369  opts.Add(
369      ,"$INSTALL_PREFIX/share"      ,"$INSTALL_PREFIX/share"
370  )  )
371    
372    opts.Add(
373        'INSTALL_DOC'
374        ,'Location to install documentation files'
375        ,"$INSTALL_SHARE/doc/ascend"
376    )
377    
378  opts.Add(  opts.Add(
379      'INSTALL_ASCDATA'      'INSTALL_ASCDATA'
# Line 441  opts.Add(BoolOption( Line 448  opts.Add(BoolOption(
448      ,True      ,True
449  ))  ))
450    
451    opts.Add(BoolOption(
452        'WITH_SCROLLKEEPER'
453        ,"Set to to 1 if you want to install an OMF file that can be read by scrollkeeper (eg Yelp on GNOME)"
454        ,default_with_scrollkeeper
455    ))
456    
457  if platform.system()!="Windows":  if platform.system()!="Windows":
458      opts.Add(BoolOption(      opts.Add(BoolOption(
459          'WITH_GCCVISIBILITY'          'WITH_GCCVISIBILITY'
# Line 501  without_cunit_reason = "not requested" Line 514  without_cunit_reason = "not requested"
514  with_extfns = env.get('WITH_EXTFNS')  with_extfns = env.get('WITH_EXTFNS')
515  without_extfn_reason = "disabled by options/config.py"  without_extfn_reason = "disabled by options/config.py"
516    
517    with_scrollkeeper = env.get('WITH_SCROLLKEEPER')
518    without_scrollkeeper_reason = "disabled by options/config.py"
519    
520  if platform.system()=="Windows":  if platform.system()=="Windows":
521      with_installer=1      with_installer=1
522  else:  else:
# Line 596  def CheckSwigVersion(context): Line 612  def CheckSwigVersion(context):
612          return 0;          return 0;
613    
614  #----------------  #----------------
615    # Scrollkeeper (Linux documentation system)
616    
617    def get_scrollkeeper_omfdir(env):
618        cmd = 'scrollkeeper-config --omfdir'
619        (cin,coutcerr) = os.popen4(cmd)
620        output = coutcerr.read()
621        return output.strip()
622    
623    def CheckScrollkeeperConfig(context):
624        try:
625            context.Message("Checking for scrollkeeper...")
626            dir=get_scrollkeeper_omfdir(context.env)
627        except:
628            context.Result("Failed to run 'scrollkeeper-config'")
629            return 0
630        context.env['OMFDIR']=dir
631        context.Result("OK, %s" % dir)
632        return 1
633    
634    #----------------
635  # General purpose library-and-header test  # General purpose library-and-header test
636    
637  class KeepContext:  class KeepContext:
# Line 997  conf = Configure(env Line 1033  conf = Configure(env
1033          , 'CheckX11' : CheckX11          , 'CheckX11' : CheckX11
1034          , 'CheckIDA' : CheckIDA          , 'CheckIDA' : CheckIDA
1035          , 'CheckCONOPT' : CheckCONOPT          , 'CheckCONOPT' : CheckCONOPT
1036            , 'CheckScrollkeeperConfig' : CheckScrollkeeperConfig
1037  #       , 'CheckIsNan' : CheckIsNan  #       , 'CheckIsNan' : CheckIsNan
1038  #       , 'CheckCppUnitConfig' : CheckCppUnitConfig  #       , 'CheckCppUnitConfig' : CheckCppUnitConfig
1039      }      }
# Line 1162  if need_fortran: Line 1199  if need_fortran:
1199      if platform.system()=="Windows":      if platform.system()=="Windows":
1200          conf.env.Append(LIBPATH='c:\mingw\lib')          conf.env.Append(LIBPATH='c:\mingw\lib')
1201    
1202    # scrollkeeper
1203    
1204    if with_scrollkeeper:
1205        if not conf.CheckScrollkeeperConfig():
1206            with_scrollkeeper=False
1207            without_scrollkeeper_reason="unable to detect scrollkeeper-config"
1208    
1209  # TODO: -D_HPUX_SOURCE is needed  # TODO: -D_HPUX_SOURCE is needed
1210    
# Line 1511  if platform.system()=="Linux": Line 1554  if platform.system()=="Linux":
1554      env.SubstInFile('ascend.spec.in')      env.SubstInFile('ascend.spec.in')
1555    
1556  #------------------------------------------------------  #------------------------------------------------------
1557    # CREATE OMF FILE FOR USE WITH SCROLLKEEPER
1558    
1559    if with_scrollkeeper:
1560        env.SubstInFile('#/pygtk/gnome/ascend.omf.in')
1561        env.InstallShared(env['INSTALL_ROOT']+env['OMFDIR'],"#/pygtk/gnome/ascend.omf")
1562    
1563    #------------------------------------------------------
1564  # DISTRIBUTION TAR FILE  # DISTRIBUTION TAR FILE
1565    
1566  env['DISTTAR_FORMAT']='bz2'  env['DISTTAR_FORMAT']='bz2'
# Line 1526  tar = env.DistTar("dist/"+env['DISTTAR_N Line 1576  tar = env.DistTar("dist/"+env['DISTTAR_N
1576  env.Depends(tar,'ascend.spec')  env.Depends(tar,'ascend.spec')
1577    
1578  #------------------------------------------------------  #------------------------------------------------------
1579    # USER'S MANUAL
1580    
1581    env.SConscript('doc/SConscript',['env'])
1582    
1583    #------------------------------------------------------
1584  # LIBASCEND DOXYGEN DOCUMENTATION  # LIBASCEND DOXYGEN DOCUMENTATION
1585    
1586  env.SConscript('base/doc/SConscript',['env'])  env.SConscript('base/doc/SConscript',['env'])

Legend:
Removed from v.815  
changed lines
  Added in v.816

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