185 |
|
|
186 |
#################### Make sure install directories exist ##################### |
#################### Make sure install directories exist ##################### |
187 |
|
|
188 |
env['BUILD_DIR']=env['build_dir'] |
env['BUILD_DIR']=Dir(env['build_dir']).abspath |
189 |
prefix=Dir(env['prefix']).abspath |
prefix=Dir(env['prefix']).abspath |
190 |
env['incinstall'] = os.path.join(prefix, 'include') |
env['incinstall'] = os.path.join(prefix, 'include') |
191 |
env['bininstall'] = os.path.join(prefix, 'bin') |
env['bininstall'] = os.path.join(prefix, 'bin') |
225 |
|
|
226 |
if cc_name == 'icc': |
if cc_name == 'icc': |
227 |
# Intel compiler |
# Intel compiler |
228 |
cc_flags = "-std=c99 -fPIC -wd161 -w1 -vec-report0 -DBLOCKTIMER -DCORE_ID1" |
# #1875: offsetof applied to non-POD types is nonstandard (in boost) |
229 |
cc_optim = "-O3 -ftz -IPF_ftlacc- -IPF_fma -fno-alias -ip" |
cc_flags = "-std=c99 -fPIC -w2 -wd1875 -Wno-unknown-pragmas -DBLOCKTIMER -DCORE_ID1" |
230 |
|
cc_optim = "-O3 -ftz -fno-alias -ipo -xHost" |
231 |
cc_debug = "-g -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK" |
cc_debug = "-g -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK" |
232 |
omp_flags = "-openmp -openmp_report0" |
omp_flags = "-openmp" |
233 |
omp_ldflags = "-openmp -openmp_report0 -lpthread" |
omp_ldflags = "-openmp -openmp_report=1" |
234 |
fatalwarning = "-Werror" |
fatalwarning = "-Werror" |
235 |
elif cc_name[:3] == 'gcc': |
elif cc_name[:3] == 'gcc': |
236 |
# GNU C on any system |
# GNU C on any system |
965 |
##################### Targets to build the documentation ##################### |
##################### Targets to build the documentation ##################### |
966 |
|
|
967 |
env.Alias('api_epydoc','install_all') |
env.Alias('api_epydoc','install_all') |
968 |
env.Alias('docs', ['examples_tarfile', 'examples_zipfile', 'api_epydoc', 'api_doxygen', 'user_pdf', 'install_pdf', 'cookbook_pdf']) |
env.Alias('docs', ['examples_tarfile', 'examples_zipfile', 'sphinxdoc', 'api_doxygen', 'user_pdf', 'install_pdf', 'cookbook_pdf', 'inversion_pdf']) |
969 |
env.Alias('release_prep', ['docs', 'install_all']) |
env.Alias('release_prep', ['docs', 'install_all']) |
970 |
|
|
971 |
|
|
972 |
|
# The test scripts are always generated, this target allows us to |
973 |
|
# generate the testscripts without doing a full build |
974 |
|
env.Alias('testscripts',[]) |
975 |
|
|
976 |
if not IS_WINDOWS: |
if not IS_WINDOWS: |
977 |
try: |
try: |
978 |
utest=open('utest.sh','w') |
utest=open('utest.sh','w') |
979 |
utest.write(GroupTest.makeHeader(env['PLATFORM'], prefix)) |
utest.write(GroupTest.makeHeader(env['PLATFORM'], prefix, False)) |
980 |
for tests in TestGroups: |
for tests in TestGroups: |
981 |
utest.write(tests.makeString()) |
utest.write(tests.makeString()) |
982 |
utest.close() |
utest.close() |
983 |
Execute(Chmod('utest.sh', 0o755)) |
Execute(Chmod('utest.sh', 0o755)) |
984 |
print("Generated utest.sh.") |
print("Generated utest.sh.") |
985 |
|
# This version contains only python tests - I want this to be usable |
986 |
|
# From a binary only install if you have the test files |
987 |
|
utest=open('itest.sh','w') |
988 |
|
utest.write(GroupTest.makeHeader(env['PLATFORM'], prefix, True)) |
989 |
|
for tests in TestGroups: |
990 |
|
if tests.exec_cmd=='$PYTHONRUNNER ': |
991 |
|
utest.write(tests.makeString()) |
992 |
|
utest.close() |
993 |
|
Execute(Chmod('itest.sh', 0o755)) |
994 |
|
print("Generated itest.sh.") |
995 |
except IOError: |
except IOError: |
996 |
print("Error attempting to write unittests file.") |
print("Error attempting to write unittests file.") |
997 |
Exit(1) |
Exit(1) |
998 |
|
|
999 |
# delete utest.sh upon cleanup |
# delete utest.sh upon cleanup |
1000 |
env.Clean('target_init', 'utest.sh') |
env.Clean('target_init', 'utest.sh') |
1001 |
|
env.Clean('target_init', 'itest.sh') |
1002 |
|
|
1003 |
# Make sure that the escript wrapper is in place |
# Make sure that the escript wrapper is in place |
1004 |
if not os.path.isfile(os.path.join(env['bininstall'], 'run-escript')): |
if not os.path.isfile(os.path.join(env['bininstall'], 'run-escript')): |