/[escript]/trunk/mk
ViewVC logotype

Diff of /trunk/mk

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

revision 98 by jgs, Wed Dec 15 03:43:28 2004 UTC revision 122 by jgs, Thu Jun 9 05:38:05 2005 UTC
# Line 1  Line 1 
1  #!/bin/env bash  #!/bin/bash
2    
3  # $Id$  # $Id$
4  # a brutal building script for esys  # An explicit building script for esys
5    
6    #**********************************************************************
7    # NB: this script is setup to perform default developmental builds
8    # change any settings you require, but PLEASE do not check any changes
9    # to this script back into the repository - talk to Jon first
10    #**********************************************************************
11    
12    # the modules to make
13  MODULES="tools/CppUnitTest tools/mmio esysUtils escript finley"  MODULES="tools/CppUnitTest tools/mmio esysUtils escript finley"
 #MODULES="escript finley"  
14    
15    # the tests to run
16    TESTS="escript finley"
17    
18    # use this setting for local developmental builds
19    ENVVARS="DODEBUG=YES"
20    
21    # use this setting for production installs on altix
22    # ** NB: overwrites centrally installed esys libraries on altix ***
23    #ENVVARS="L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"
24    
25    # ensure required symlinks are setup first
26    (cd escript/inc; if [ ! -h escript ]; then ln -s ../src escript; fi)
27    (cd esysUtils/inc; if [ ! -h esysUtils ]; then ln -s ../src esysUtils; fi)
28    (cd finley/inc; if [ ! -h finley ]; then ln -s ../src finley; fi)
29    
30    (cd escript; if [ ! -h Makefile ]; then ln -s ./escript.mk Makefile; fi)
31    (cd esysUtils; if [ ! -h Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)
32    (cd finley; if [ ! -h Makefile ]; then ln -s ./finley.mk Makefile; fi)
33    (cd tools/mmio; if [ ! -h Makefile ]; then ln -s ./mmio.mk Makefile; fi)
34    (cd tools/CppUnitTest; if [ ! -h Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)
35    
36    # clean all modules
37  if [ "$1" == "clean" ];  if [ "$1" == "clean" ];
38  then  then
39      for module in $MODULES ; do \      for module in $MODULES ; do \
40          (echo Cleaning: $module; cd $module; make clean) \          (echo Cleaning: $module; cd $module; gmake clean) \
41      done      done
42            exit
43  fi  fi
44    
45  (cd escript/lib; if [ ! -e py_src ]; then mkdir py_src; fi)  # uninstall all modules
46    if [ "$1" == "uninstall" ];
47  (cd escript/inc; if [ ! -e escript ]; then ln -s ../src escript; fi)  then
48  (cd esysUtils/inc; if [ ! -e esysUtils ]; then ln -s ../src esysUtils; fi)      for module in $MODULES ; do \
49  (cd finley/inc; if [ ! -e finley ]; then ln -s ../src finley; fi)          (echo Cleaning: $module; cd $module; gmake uninstall) \
50        done
51  (cd escript; if [ ! -e Makefile ]; then ln -s ./escript.mk Makefile; fi)          exit
52  (cd esysUtils; if [ ! -e Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)  fi
 (cd finley; if [ ! -e Makefile ]; then ln -s ./finley.mk Makefile; fi)  
 (cd tools/mmio; if [ ! -e Makefile ]; then ln -s ./mmio.mk Makefile; fi)  
 (cd tools/CppUnitTest; if [ ! -e Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)  
53    
54    # default case - just build all modules
55  for module in $MODULES ; do \  for module in $MODULES ; do \
56      (echo Building: $module; cd $module; make) \      (echo Building: $module; cd $module; env $ENVVARS gmake -j 10) \
57  done  done
58    
59  (cd escript/lib; if [ ! -e escript.so ]; then ln -s libescript.so escript.so; fi)  # install all modules
60  (cd finley/lib; if [ ! -e  finley.so ]; then ln -s libfinley.so finley.so; fi)  if [ "$1" == "install" ];
61    then
62        for module in $MODULES ; do \
63            (echo Installing: $module; cd $module; env $ENVVARS gmake install) \
64        done
65            (cd esys; if [ ! -h escriptcpp.so ]; then ln -s ../lib/libescriptcpp.so escriptcpp.so; fi)
66            (cd esys; if [ ! -h finleycpp.so ]; then ln -s ../lib/libfinleycpp.so finleycpp.so; fi)
67    fi
68    
69    # run the unit tests
70    if [ "$1" == "unit_test" ]
71    then
72        for module in $TESTS
73        do
74        echo "Running unit tests for: $module"
75        cd $ESYS_ROOT/$module/test
76        unit_test
77        done
78    fi
79    
80    # run the python tests
81    if [ "$1" == "py_test" ]
82    then
83        for module in $TESTS
84        do
85        echo "Running python tests for: $module"
86        if [ "$module" == "finley" ]
87        then
88            cd $ESYS_ROOT/$module/test/python
89                python ImportTest.py
90            python SimpleSolve.py
91            python GradTest.py
92        elif [ "$module" == "escript" ]
93        then
94            cd $ESYS_ROOT/$module/test/python
95                python ImportTest.py
96            python BinaryOps.py
97            python UnaryOps.py
98            python SliceGetting.py
99            python SliceSetting.py
100                python MiscTests.py
101        fi
102        done
103    fi

Legend:
Removed from v.98  
changed lines
  Added in v.122

  ViewVC Help
Powered by ViewVC 1.1.26