/[escript]/branches/diaplayground/SConstruct
ViewVC logotype

Diff of /branches/diaplayground/SConstruct

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

revision 3975 by caltinay, Thu Sep 20 01:54:06 2012 UTC revision 4078 by jfenwick, Fri Nov 16 07:50:49 2012 UTC
# Line 1  Line 1 
1  ########################################################  ##############################################################################
2  #  #
3  # Copyright (c) 2003-2012 by University of Queensland  # Copyright (c) 2003-2012 by University of Queensland
4  # Earth Systems Science Computational Center (ESSCC)  # http://www.uq.edu.au
 # http://www.uq.edu.au/esscc  
5  #  #
6  # Primary Business: Queensland, Australia  # Primary Business: Queensland, Australia
7  # Licensed under the Open Software License version 3.0  # Licensed under the Open Software License version 3.0
8  # http://www.opensource.org/licenses/osl-3.0.php  # http://www.opensource.org/licenses/osl-3.0.php
9  #  #
10  ########################################################  # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
11    # Development since 2012 by School of Earth Sciences
12    #
13    ##############################################################################
14    
15  EnsureSConsVersion(0,98,1)  EnsureSConsVersion(0,98,1)
16  EnsurePythonVersion(2,5)  EnsurePythonVersion(2,5)
# Line 183  if len(vars.UnknownVariables())>0: Line 185  if len(vars.UnknownVariables())>0:
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')
# Line 348  for key in 'OMP_NUM_THREADS', 'ESCRIPT_N Line 350  for key in 'OMP_NUM_THREADS', 'ESCRIPT_N
350          env['ENV'][key] = 1          env['ENV'][key] = 1
351    
352  env_export=env['env_export']  env_export=env['env_export']
353  env_export.extend(['ESCRIPT_NUM_THREADS','ESCRIPT_HOSTFILE','DISPLAY','XAUTHORITY','PATH','HOME','TMPDIR','TEMP','TMP'])  env_export.extend(['ESCRIPT_NUM_THREADS','ESCRIPT_HOSTFILE','DISPLAY','XAUTHORITY','PATH','HOME','KMP_MONITOR_STACKSIZE','TMPDIR','TEMP','TMP'])
354    
355  for key in set(env_export):  for key in set(env_export):
356      try:      try:
# Line 962  env.Alias('build_PasoTests','$BUILD_DIR/ Line 964  env.Alias('build_PasoTests','$BUILD_DIR/
964  ##################### Targets to build the documentation #####################  ##################### Targets to build the documentation #####################
965    
966  env.Alias('api_epydoc','install_all')  env.Alias('api_epydoc','install_all')
967  env.Alias('docs', ['examples_tarfile', 'examples_zipfile', 'api_epydoc', 'api_doxygen', 'user_pdf', 'install_pdf', 'cookbook_pdf'])  env.Alias('docs', ['examples_tarfile', 'examples_zipfile', 'api_epydoc', 'api_doxygen', 'user_pdf', 'install_pdf', 'cookbook_pdf', 'inversion_pdf'])
968  env.Alias('release_prep', ['docs', 'install_all'])  env.Alias('release_prep', ['docs', 'install_all'])
969    
970    
971    # The test scripts are always generated, this target allows us to
972    # generate the testscripts without doing a full build
973    env.Alias('testscripts',[])
974    
975  if not IS_WINDOWS:  if not IS_WINDOWS:
976      try:      try:
977          utest=open('utest.sh','w')          utest=open('utest.sh','w')
978          utest.write(GroupTest.makeHeader(env['PLATFORM'], prefix))          utest.write(GroupTest.makeHeader(env['PLATFORM'], prefix, False))
979          for tests in TestGroups:          for tests in TestGroups:
980              utest.write(tests.makeString())              utest.write(tests.makeString())
981          utest.close()          utest.close()
982          Execute(Chmod('utest.sh', 0o755))          Execute(Chmod('utest.sh', 0o755))
983          print("Generated utest.sh.")          print("Generated utest.sh.")
984            # This version contains only python tests - I want this to be usable
985            # From a binary only install if you have the test files
986            utest=open('itest.sh','w')
987            utest.write(GroupTest.makeHeader(env['PLATFORM'], prefix, True))
988            for tests in TestGroups:
989              if tests.exec_cmd=='$PYTHONRUNNER ':
990                utest.write(tests.makeString())
991            utest.close()
992            Execute(Chmod('itest.sh', 0o755))
993            print("Generated itest.sh.")        
994      except IOError:      except IOError:
995          print("Error attempting to write unittests file.")          print("Error attempting to write unittests file.")
996          Exit(1)          Exit(1)
997    
998      # delete utest.sh upon cleanup      # delete utest.sh upon cleanup
999      env.Clean('target_init', 'utest.sh')      env.Clean('target_init', 'utest.sh')
1000        env.Clean('target_init', 'itest.sh')
1001    
1002      # Make sure that the escript wrapper is in place      # Make sure that the escript wrapper is in place
1003      if not os.path.isfile(os.path.join(env['bininstall'], 'run-escript')):      if not os.path.isfile(os.path.join(env['bininstall'], 'run-escript')):

Legend:
Removed from v.3975  
changed lines
  Added in v.4078

  ViewVC Help
Powered by ViewVC 1.1.26