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), |
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), |
300 |
except KeyError: |
except KeyError: |
301 |
epydoc_path = None |
epydoc_path = None |
302 |
try: |
try: |
|
epydoc_pythonpath = env['epydoc_pythonpath'] |
|
|
except KeyError: |
|
|
epydoc_pythonpath = None |
|
|
try: |
|
303 |
includes = env['papi_path'] |
includes = env['papi_path'] |
304 |
env.Append(CPPPATH = [includes,]) |
env.Append(CPPPATH = [includes,]) |
305 |
except KeyError: |
except KeyError: |
314 |
except KeyError: |
except KeyError: |
315 |
papi_libs = None |
papi_libs = None |
316 |
|
|
317 |
|
|
318 |
try: |
try: |
319 |
src_zipfile = env['src_zipfile'] |
src_zipfile = env.File(env['src_zipfile']) |
320 |
except KeyError: |
except KeyError: |
321 |
src_zipfile = None |
src_zipfile = None |
|
|
|
|
|
|
322 |
try: |
try: |
323 |
test_zipfile = env['test_zipfile'] |
test_zipfile = env.File(env['test_zipfile']) |
324 |
except KeyError: |
except KeyError: |
325 |
test_zipfile = None |
test_zipfile = None |
326 |
|
try: |
327 |
|
examples_zipfile = env.File(env['examples_zipfile']) |
328 |
|
except KeyError: |
329 |
|
examples_zipfile = None |
330 |
|
|
331 |
try: |
try: |
332 |
src_tarfile = env['src_tarfile'] |
src_tarfile = env.File(env['src_tarfile']) |
333 |
except KeyError: |
except KeyError: |
334 |
src_tarfile = None |
src_tarfile = None |
335 |
|
try: |
336 |
|
test_tarfile = env.File(env['test_tarfile']) |
337 |
|
except KeyError: |
338 |
|
test_tarfile = None |
339 |
|
try: |
340 |
|
examples_tarfile = env.File(env['examples_tarfile']) |
341 |
|
except KeyError: |
342 |
|
examples_tarfile = None |
343 |
|
|
344 |
|
try: |
345 |
|
guide_pdf = env.File(env['guide_pdf']) |
346 |
|
except KeyError: |
347 |
|
guide_pdf = None |
348 |
|
|
349 |
try: |
try: |
350 |
test_tarfile = env['test_tarfile'] |
guide_html_index = env.File('index.htm',env['guide_html']) |
351 |
except KeyError: |
except KeyError: |
352 |
test_tarfile = None |
guide_html_index = None |
353 |
|
|
354 |
try: |
try: |
355 |
doc = env['doc'] |
api_epydoc = env.Dir(env['api_epydoc']) |
356 |
except KeyError: |
except KeyError: |
357 |
doc = None |
api_epydoc = None |
358 |
|
|
359 |
# Zipgets |
# Zipgets |
360 |
|
|
361 |
env.Default(libinstall) |
env.Default(libinstall) |
362 |
env.Default(incinstall) |
env.Default(incinstall) |
363 |
env.Default(pyinstall) |
env.Default(pyinstall) |
364 |
env.Alias('release_src',[ src_zipfile, src_tarfile ]) |
env.Alias('release_src',[ src_zipfile, src_tarfile ]) |
365 |
env.Alias('release_tests',[ test_zipfile, test_tarfile]) |
env.Alias('release_tests',[ test_zipfile, test_tarfile]) |
366 |
env.Alias('release', ['release_src', 'release_tests']) |
env.Alias('release_examples',[ examples_zipfile, examples_tarfile]) |
367 |
env.Alias('docs') |
env.Alias('api_epydoc',api_epydoc) |
368 |
env.Alias('build_tests') |
env.Alias('docs',[ 'release_examples', guide_pdf, guide_html_index, api_epydoc]) |
369 |
env.Alias('build_py_tests') |
env.Alias('release', ['release_src', 'release_tests', 'docs']) |
370 |
env.Alias('local_py_tests') |
env.Alias('build_tests') # target to build all C++ tests |
371 |
env.Alias('run_tests',['build_tests']) |
env.Alias('build_py_tests') # target to build all python tests |
372 |
env.Alias('py_tests', ['build_py_tests']) |
env.Alias('build_all_tests', [ 'build_tests', 'build_py_tests' ] ) # target to build all python tests |
373 |
env.Alias('all_tests', ['run_tests', 'py_tests']) |
env.Alias('run_tests', 'build_tests') # target to run all C++ test |
374 |
|
env.Alias('py_tests', 'build_py_tests') # taget to run all released python tests |
375 |
|
env.Alias('all_tests', ['run_tests', 'py_tests']) # target to run all C++ and released python tests |
376 |
|
|
377 |
# Python install - esys __init__.py |
# Python install - esys __init__.py |
378 |
# 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 |
# 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 |
381 |
|
|
382 |
# Allow sconscripts to see the env |
# Allow sconscripts to see the env |
383 |
Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", |
Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", |
384 |
"boost_lib", "python_lib", "doxygen_path", "epydoc_path", "epydoc_pythonpath", "papi_libs", |
"boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs", |
385 |
"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", |
386 |
|
"guide_pdf", "guide_html_index", "api_epydoc"]) |
387 |
|
|
388 |
# End initialisation section |
# End initialisation section |
389 |
# Begin configuration section |
# Begin configuration section |
390 |
# adds this file and the scons option directore to the source tar |
# adds this file and the scons option directore to the source tar |
391 |
release_srcfiles=[env.File('SConstruct'),]+[ env.File(x) for x in glob.glob('scons/*.py') ] |
release_srcfiles=[env.File('SConstruct'),]+[ env.File(x) for x in glob.glob('scons/*.py') ] |
392 |
release_testfiles=[env.File('README_TESTS'),] |
release_testfiles=[env.File('README_TESTS'),] |
393 |
env.Zip(src_zipfile,release_srcfiles) |
env.Zip(src_zipfile, release_srcfiles) |
394 |
env.Zip(test_zipfile, release_testfiles) |
env.Zip(test_zipfile, release_testfiles) |
395 |
env.Tar(src_tarfile, release_srcfiles) |
env.Tar(src_tarfile, release_srcfiles) |
396 |
env.Tar(test_tarfile, release_testfiles) |
env.Tar(test_tarfile, release_testfiles) |
407 |
env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0) |
env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0) |
408 |
env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0) |
env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0) |
409 |
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) |
410 |
#env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) |
env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0) |
411 |
|
env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) |
412 |
|
|
413 |
# FIXME:need to be incorporated into build system |
# added by Ben Cumming |
414 |
# FIXME: 'doc/SConstruct'] |
env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0) |
|
# FIXME: 'doc/SConstruct'] |
|