/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2024 by jpye, Wed Apr 29 09:29:27 2009 UTC revision 2025 by jpye, Thu Apr 30 02:15:05 2009 UTC
# Line 41  if platform.system()=="Windows": Line 41  if platform.system()=="Windows":
41    
42      # on Windows, we build ASCEND such that it finds it support files      # on Windows, we build ASCEND such that it finds it support files
43      # using paths relative to the location of the executable      # using paths relative to the location of the executable
     default_rel_distdir = '.'  
44      default_absolute_paths = False      default_absolute_paths = False
45        default_dist_rel_bin = '.'
46        default_tk_rel_dist = 'tcltk'
47        default_library_rel_dist = 'models'
48        default_solvers_rel_dist = 'solvers'
49            
50      # where to look for IDA solver libraries, headers, etc.      # where to look for IDA solver libraries, headers, etc.
51      default_ida_prefix = "c:\\MinGW"      default_ida_prefix = "c:\\MinGW"
# Line 111  else: Line 114  else:
114                  default_tcl_cpppath = "/usr/include/tcl8.5"                  default_tcl_cpppath = "/usr/include/tcl8.5"
115                            
116    
     default_rel_distdir = '..'  
117      default_absolute_paths = True      default_absolute_paths = True
118        default_dist_rel_bin = '..'
119        default_tk_rel_dist = 'share/ascend/tcltk'
120        default_library_rel_dist = 'lib/ascend/models'
121        default_solvers_rel_dist = 'lib/ascend/solvers'
122    
123      default_ida_prefix="/usr"      default_ida_prefix="/usr"
124      default_conopt_prefix="/usr"      default_conopt_prefix="/usr"
125      default_conopt_libpath="$CONOPT_PREFIX/lib"      default_conopt_libpath="$CONOPT_PREFIX/lib"
# Line 596  opts.Add( Line 603  opts.Add(
603  )  )
604    
605  opts.Add(  opts.Add(
606        'INSTALL_ASCDATA'
607        ,"Location of ASCEND shared data (TK, python, models etc)"
608        ,"$INSTALL_SHARE/ascend"
609    )
610    
611    opts.Add(
612      'INSTALL_PYTHON'      'INSTALL_PYTHON'
613      ,'Common shared-file location on this system'      ,'Common shared-file location on this system'
614      ,os.path.join(default_python,"ascend")      ,os.path.join(default_python,"ascend")
615  )  )
616    
617  opts.Add(  opts.Add(
618      'INSTALL_ASCDATA'      'INSTALL_TK'
619      ,"Location of ASCEND shared data (TK, python, models etc)"      ,'Location for Tcl/Tk files used by ASCEND Tk GUI'
620      ,"$INSTALL_SHARE/ascend"      ,"$INSTALL_ASCDATA/tcltk"
621  )  )
622    
623  opts.Add(  opts.Add(
# Line 2450  subst_dict = { Line 2463  subst_dict = {
2463      , '@EXTLIB_SUFFIX@':env['EXTLIB_SUFFIX']      , '@EXTLIB_SUFFIX@':env['EXTLIB_SUFFIX']
2464      , '@EXTLIB_PREFIX@':env['EXTLIB_PREFIX']      , '@EXTLIB_PREFIX@':env['EXTLIB_PREFIX']
2465      , '@ASC_ENV_TK_DEFAULT@' : '$$ASCENDDIST/tcltk'      , '@ASC_ENV_TK_DEFAULT@' : '$$ASCENDDIST/tcltk'
     , '@ASC_DISTDIR_REL_BIN@' : default_rel_distdir  
2466      , '@PYTHON@' : python_exe      , '@PYTHON@' : python_exe
2467      , '@PYVERSION@' : pyversion      , '@PYVERSION@' : pyversion
2468      , '@SOURCE_ROOT@':c_escape(os.path.abspath(str(env.Dir("#"))))      , '@SOURCE_ROOT@':c_escape(os.path.abspath(str(env.Dir("#"))))
2469      , '@WITH_GRAPHVIZ@': str(int(env.get('WITH_GRAPHVIZ')))      , '@WITH_GRAPHVIZ@': str(int(env.get('WITH_GRAPHVIZ')))
2470    #define ASC_ABSOLUTE_PATHS @ASC_ABSOLUTE_PATHS@
2471    #if ASC_ABSOLUTE_PATHS
2472    # define ASCENDDIST_DEFAULT "@ASCENDDIST_DEFAULT@"
2473    # define ASCENDTK_DEAFULT "@ASCENDTK_DEFAULT@"
2474    # define ASCENDLIBRARY_DEFAULT "@ASCENDLIBRARY_DEFAULT@"
2475    # define ASCENDSOLVERS_DEFAULT "@ASCENDSOLVERS_DEFAULT@"
2476    #else
2477    # define ASC_DIST_REL_BIN "@ASC_DIST_REL_BIN@"
2478    # define ASC_TK_REL_DIST "@ASC_TK_REL_DIST@"
2479    # define ASC_LIBRARY_REL_DIST "@ASC_LIBRARY_REL_DIST@"
2480    # define ASC_SOLVERS_REL_DIST "@ASC_SOLVERS_REL_DIST@"
2481    #endif
2482        , '@ASC_ABSOLUTE_PATHS@': str(int(env.get('ABSOLUTE_PATHS')))
2483        , '@ASCENDDIST_DEFAULT@': c_escape(env['INSTALL_PREFIX'])
2484        , '@ASCENDTK_DEFAULT@': c_escape(os.path.abspath(env.subst(env['INSTALL_TK'])))
2485        , '@ASCENDLIBRARY_DEFAULT@': c_escape(os.path.abspath(env.subst(env['DEFAULT_ASCENDLIBRARY'])))
2486        , '@ASCENDSOLVERS_DEFAULT@': c_escape(os.path.abspath(env.subst(env['DEFAULT_ASCENDSOLVERS'])))
2487        , '@ASC_DIST_REL_BIN@' : default_dist_rel_bin
2488        , '@ASC_TK_REL_DIST@' : default_tk_rel_dist
2489        , '@ASC_LIBRARY_REL_DIST@' : default_library_rel_dist
2490        , '@ASC_SOLVERS_REL_DIST@' : default_solvers_rel_dist
2491  }  }
2492    
2493  if env.get('WITH_DOC'):  if env.get('WITH_DOC'):
# Line 2470  for k,v in { Line 2503  for k,v in {
2503          ,'ASC_RESETNEEDED':env.get('ASC_RESETNEEDED')          ,'ASC_RESETNEEDED':env.get('ASC_RESETNEEDED')
2504          ,'HAVE_C99FPE':env.get('HAVE_C99FPE')          ,'HAVE_C99FPE':env.get('HAVE_C99FPE')
2505          ,'HAVE_IEEE':env.get('HAVE_IEEE')          ,'HAVE_IEEE':env.get('HAVE_IEEE')
         ,'ASC_ABSOLUTE_PATHS':env.get('ABSOLUTE_PATHS')  
2506          ,'ASC_XTERM_COLORS':env.get('WITH_XTERM_COLORS')          ,'ASC_XTERM_COLORS':env.get('WITH_XTERM_COLORS')
2507          ,'MALLOC_DEBUG':env.get('MALLOC_DEBUG')          ,'MALLOC_DEBUG':env.get('MALLOC_DEBUG')
2508          }.iteritems():          }.iteritems():
# Line 2708  env.Alias('extfns',env['extfns']) Line 2740  env.Alias('extfns',env['extfns'])
2740    
2741  ascendconfig = env.SubstInFile('ascend-config.in')  ascendconfig = env.SubstInFile('ascend-config.in')
2742    
   
 #------------------------------------------------------  
 # CREATE asc4dev scriptlet  
   
 asc4devcmd = env.SubstInFile('tcltk/asc4dev.in')  
 env.AddPostAction(asc4devcmd, 'chmod 755 $TARGET')  
2743  #------------------------------------------------------  #------------------------------------------------------
2744  # INSTALLATION  # INSTALLATION
2745    
# Line 2730  if env.get('CAN_INSTALL'): Line 2756  if env.get('CAN_INSTALL'):
2756    
2757      libname = "${INSTALL_LIB}/%s%s" % (soname_full,soname_minor)      libname = "${INSTALL_LIB}/%s%s" % (soname_full,soname_minor)
2758      install_lib = env.InstallLibraryAs("${INSTALL_ROOT}"+libname, [libascend])      install_lib = env.InstallLibraryAs("${INSTALL_ROOT}"+libname, [libascend])
2759        if env['ABSOLUTE_PATHS']:
2760            link_target = install_lib
2761        else:
2762            link_target = "%s%s" % (soname_full,soname_minor)
2763    
2764      link1 = "${INSTALL_LIB}/%s" % soname_clean      link1 = "${INSTALL_LIB}/%s" % soname_clean
2765      install_link1 = None      install_link1 = None
2766      if env.subst(link1) != env.subst(libname):      if env.subst(link1) != env.subst(libname):
2767          install_link1 = env.Command("${INSTALL_ROOT}"+link1,install_lib,"ln -f -s %s $TARGET" % libname)          cwd = os.getcwd()
2768            install_link1 = env.Command("${INSTALL_ROOT}"+link1,libname,"ln -f -s %s $TARGET" % link_target)
2769    
2770      link2 = "$INSTALL_LIB/%s" % soname_full      link2 = "$INSTALL_LIB/%s" % soname_full
2771      install_link2 = None      install_link2 = None
2772      if soname_minor:      if soname_minor:
2773          install_link2 = env.Command("${INSTALL_ROOT}"+link2,install_lib,"ln -f -s %s $TARGET"%libname)          install_link2 = env.Command("${INSTALL_ROOT}"+link2,libname,"ln -f -s %s $TARGET"%link_target)
2774    
2775      env.InstallProgram(Dir(env.subst("$INSTALL_ROOT$INSTALL_BIN")),ascendconfig)      env.InstallProgram(Dir(env.subst("$INSTALL_ROOT$INSTALL_BIN")),ascendconfig)
2776    

Legend:
Removed from v.2024  
changed lines
  Added in v.2025

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