/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 706 by gross, Sat Apr 8 16:13:02 2006 UTC revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC
# Line 46  opts.AddOptions( Line 46  opts.AddOptions(
46    ('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'),    ('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'),
47    ('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath),    ('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath),
48    ('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"),    ('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"),
49    ('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_src_tests.zip"),    ('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"),
50    ('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"),    ('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"),
51    ('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_src_tests.tar.gz"),    ('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"),
52    ('doc', 'where the doc files will be installed', Dir('#.').abspath+'/release/doc'),    ('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"),
53      ('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"),
54      ('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"),
55      ('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"),
56      ('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"),
57  # Compilation options  # Compilation options
58    BoolOption('dodebug', 'Do you want a debug build?', 'no'),    BoolOption('dodebug', 'Do you want a debug build?', 'no'),
59    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file),    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file),
# Line 84  opts.AddOptions( Line 87  opts.AddOptions(
87    PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),    PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),
88    ('boost_lib', 'Boost libraries to link with', ['boost_python',]),    ('boost_lib', 'Boost libraries to link with', ['boost_python',]),
89  # Doc building  # Doc building
90    PathOption('doxygen_path', 'Path to Doxygen executable', None),  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),
91    PathOption('epydoc_path', 'Path to Epydoc executable', None),  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),
   PathOption('epydoc_pythonpath', 'Path to Epydoc python files', None),  
92  # PAPI  # PAPI
93    PathOption('papi_path', 'Path to PAPI includes', None),    PathOption('papi_path', 'Path to PAPI includes', None),
94    PathOption('papi_lib_path', 'Path to PAPI libs', None),    PathOption('papi_lib_path', 'Path to PAPI libs', None),
# Line 124  if os.name != "nt" and os.uname()[4]=='i Line 126  if os.name != "nt" and os.uname()[4]=='i
126     if env['CXX'] == 'icpc':     if env['CXX'] == 'icpc':
127        env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py        env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py
128  elif os.name == "nt":  elif os.name == "nt":
    # FIXME: Need to implement equivalent of ld library path for windoze  
129     env = Environment(tools = ['default', 'intelc'], options = opts)     env = Environment(tools = ['default', 'intelc'], options = opts)
130     env['ENV']['PYTHONPATH'] = python_path     env['ENV']['PYTHONPATH'] = python_path
131  else:  else:
# Line 159  try: Line 160  try:
160     libinstall = env['libinstall']     libinstall = env['libinstall']
161     env.Append(LIBPATH = [libinstall,])     env.Append(LIBPATH = [libinstall,])
162     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
163       if env['PLATFORM'] == "win32":
164          env.PrependENVPath('PATH', libinstall)
165          env.PrependENVPath('PATH', env['boost_lib_path'])
166  except KeyError:  except KeyError:
167     libinstall = None       libinstall = None  
168  try:  try:
# Line 172  except KeyError: Line 176  except KeyError:
176     dodebug = None       dodebug = None  
177  try:  try:
178     cc_defines = env['cc_defines']     cc_defines = env['cc_defines']
179     env.Append(CPPDEFINES = [cc_defines,])     env.Append(CPPDEFINES = cc_defines)
180  except KeyError:  except KeyError:
181     pass     pass
182  if dodebug:  if dodebug:
# Line 298  try: Line 302  try:
302  except KeyError:  except KeyError:
303     epydoc_path = None       epydoc_path = None  
304  try:  try:
    epydoc_pythonpath = env['epydoc_pythonpath']  
 except KeyError:  
    epydoc_pythonpath = None    
 try:  
305     includes = env['papi_path']     includes = env['papi_path']
306     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
307  except KeyError:  except KeyError:
# Line 316  try: Line 316  try:
316  except KeyError:  except KeyError:
317     papi_libs = None       papi_libs = None  
318    
319    
320  try:  try:
321     src_zipfile = env['src_zipfile']     src_zipfile = env.File(env['src_zipfile'])
322  except KeyError:  except KeyError:
323     src_zipfile = None       src_zipfile = None  
   
   
324  try:  try:
325     test_zipfile = env['test_zipfile']     test_zipfile = env.File(env['test_zipfile'])
326  except KeyError:  except KeyError:
327     test_zipfile = None       test_zipfile = None  
328    try:
329       examples_zipfile = env.File(env['examples_zipfile'])
330    except KeyError:
331       examples_zipfile = None  
332    
333  try:  try:
334     src_tarfile = env['src_tarfile']     src_tarfile = env.File(env['src_tarfile'])
335  except KeyError:  except KeyError:
336     src_tarfile = None       src_tarfile = None  
337    try:
338       test_tarfile = env.File(env['test_tarfile'])
339    except KeyError:
340       test_tarfile = None  
341    try:
342       examples_tarfile = env.File(env['examples_tarfile'])
343    except KeyError:
344       examples_tarfile = None  
345    
346    try:
347       guide_pdf = env.File(env['guide_pdf'])
348    except KeyError:
349       guide_pdf = None  
350    
351  try:  try:
352     test_tarfile = env['test_tarfile']     guide_html_index = env.File('index.htm',env['guide_html'])
353  except KeyError:  except KeyError:
354     test_tarfile = None       guide_html_index = None  
355    
356  try:  try:
357     doc = env['doc']     api_epydoc = env.Dir(env['api_epydoc'])
358  except KeyError:  except KeyError:
359     doc = None       api_epydoc = None  
360    
361  # Zipgets  # Zipgets
362      
363  env.Default(libinstall)  env.Default(libinstall)
364  env.Default(incinstall)  env.Default(incinstall)
365  env.Default(pyinstall)  env.Default(pyinstall)
366  env.Alias('release_src',[ src_zipfile, src_tarfile ])    env.Alias('release_src',[ src_zipfile, src_tarfile ])  
367  env.Alias('release_tests',[ test_zipfile, test_tarfile])  env.Alias('release_tests',[ test_zipfile, test_tarfile])
368  env.Alias('release', ['release_src', 'release_tests'])  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])
369  env.Alias('docs')  env.Alias('api_epydoc',api_epydoc)
370    env.Alias('docs',[ 'release_examples', guide_pdf, guide_html_index, api_epydoc])
371    env.Alias('release', ['release_src', 'release_tests', 'docs'])
372  env.Alias('build_tests')    # target to build all C++ tests  env.Alias('build_tests')    # target to build all C++ tests
373  env.Alias('build_py_tests') # target to build all python tests  env.Alias('build_py_tests') # target to build all python tests
374  env.Alias('build_all_tests', [ 'build_tests', 'build_py_tests' ] ) # target to build all python tests  env.Alias('build_all_tests', [ 'build_tests', 'build_py_tests' ] ) # target to build all python tests
# Line 359  env.Alias('py_tests', 'build_py_tests') Line 377  env.Alias('py_tests', 'build_py_tests')
377  env.Alias('all_tests', ['run_tests', 'py_tests']) # target to run all C++ and released python tests  env.Alias('all_tests', ['run_tests', 'py_tests']) # target to run all C++ and released python tests
378    
379  # Python install - esys __init__.py  # Python install - esys __init__.py
380  # This is just an empty file but stills need to be touched so add a special target and Command. Note you can't use the scons Touch() function as it will not  init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET'))
381  # create the file if it doesn't exist  env.Alias(init_target)
 env.Command(pyinstall+'/__init__.py', None, 'touch $TARGET')  
382    
383  # Allow sconscripts to see the env  # Allow sconscripts to see the env
384  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs",  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs",
385      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "epydoc_pythonpath", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
386          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "doc" ])          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",
387            "guide_pdf", "guide_html_index", "api_epydoc"])
388    
389  # End initialisation section  # End initialisation section
390  # Begin configuration section  # Begin configuration section
# Line 390  env.SConscript(dirs = ['escript/src'], b Line 408  env.SConscript(dirs = ['escript/src'], b
408  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)
409  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)
410  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)
411  #env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)
412    env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)
413    
414  # FIXME:need to be incorporated into build system  # added by Ben Cumming
415  # FIXME: 'doc/SConstruct']  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)
 # FIXME: 'doc/SConstruct']  

Legend:
Removed from v.706  
changed lines
  Added in v.757

  ViewVC Help
Powered by ViewVC 1.1.26