/[escript]/trunk/mk
ViewVC logotype

Diff of /trunk/mk

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

trunk/esys2/mk revision 121 by jgs, Fri May 6 04:26:16 2005 UTC trunk/mk revision 268 by jgs, Wed Nov 30 01:39:47 2005 UTC
# Line 3  Line 3 
3  # $Id$  # $Id$
4  # An explicit building script for esys  # An explicit building script for esys
5    
6  MODULES="tools/CppUnitTest tools/mmio esysUtils escript finley"  #**********************************************************************
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 paso finley bruce modellib"
14    MODULES="escript"
15    
16    # the modules to test
17    TESTS="escript bruce finley"
18    
19    # the python tests to run
20    #FINLEY_PYTESTS="ImportTest.py SimpleSolve.py GradTest.py test_linearPDEsOnFinley.py test_generators.py test_visualization_interface.py"
21    FINLEY_PYTESTS="ImportTest.py SimpleSolve.py GradTest.py"
22    ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py DataVariableTests.py test_xml.py"
23    BRUCE_PYTESTS="ImportTest.py BruceTest.py"
24    
25  # use for local developmental builds  # use this setting for local developmental builds
26  ENVVARS="DODEBUG=YES"  ENVVARS="DODEBUG=YES"
27    
28  # use for production installs  - NB: overwrites installed esys llibraries  if [ "$2" == "DEBUG" ]
29  #ENVVARS="L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"  then
30        ENVVARS="DODEBUG=YES"
31    fi
32    
33  if [ "$1" == "clean" ];  if [ "$2" == "NODEBUG" ]
34  then  then
35      for module in $MODULES ; do \      ENVVARS="DODEBUG=NO"
36          (echo Cleaning: $module; cd $module; gmake clean) \  fi
37    
38    # use this setting for production installs on altix
39    # ** NB: overwrites centrally installed esys libraries on altix ***
40    #ENVVARS="$ENVVARS L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"
41    
42    # ensure required symlinks are setup first
43    (cd esysUtils/inc; if [ ! -h esysUtils ]; then ln -s ../src esysUtils; fi)
44    (cd escript/inc; if [ ! -h escript ]; then ln -s ../src escript; fi)
45    (cd finley/inc; if [ ! -h finley ]; then ln -s ../src finley; fi)
46    (cd paso/inc; if [ ! -h paso ]; then ln -s ../src paso; fi)
47    (cd bruce/inc; if [ ! -h bruce ]; then ln -s ../src bruce; fi)
48    
49    (cd tools/mmio; if [ ! -h Makefile ]; then ln -s ./mmio.mk Makefile; fi)
50    (cd tools/CppUnitTest; if [ ! -h Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)
51    (cd esysUtils; if [ ! -h Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)
52    (cd escript; if [ ! -h Makefile ]; then ln -s ./escript.mk Makefile; fi)
53    (cd finley; if [ ! -h Makefile ]; then ln -s ./finley.mk Makefile; fi)
54    (cd paso; if [ ! -h Makefile ]; then ln -s ./paso.mk Makefile; fi)
55    (cd bruce; if [ ! -h Makefile ]; then ln -s ./bruce.mk Makefile; fi)
56    (cd modellib; if [ ! -h Makefile ]; then ln -s ./modellib.mk Makefile; fi)
57    
58    # clean all modules
59    if [ "$1" == "clean" ]
60    then
61        for module in $MODULES ; do
62            (echo Cleaning: $module; cd $module; make clean)
63      done      done
64          exit          exit 0
65  fi  fi
66    
67  (cd escript/lib; if [ ! -e py_src ]; then mkdir py_src; fi)  # uninstall all modules
68    if [ "$1" == "uninstall" ]
69    then
70        for module in $MODULES ; do
71            (echo Cleaning: $module; cd $module; make clean)
72        done
73        for module in $MODULES ; do
74            (echo Uninstalling: $module; cd $module; make uninstall)
75        done
76            exit 0
77    fi
78    
79  (cd escript/inc; if [ ! -e escript ]; then ln -s ../src escript; fi)  # run the unit tests
80  (cd esysUtils/inc; if [ ! -e esysUtils ]; then ln -s ../src esysUtils; fi)  if [ "$1" == "unit_test" ]
81  (cd finley/inc; if [ ! -e finley ]; then ln -s ../src finley; fi)  then
82        for module in $TESTS
83        do
84        echo "Running unit tests for: $module"
85        cd $ESYS_ROOT/$module/test
86        ./unit_test
87            if [ $? != 0 ]
88            then
89              echo Unit Testing FAILED for module: $module
90              exit 1
91            fi
92        done
93        exit 0
94    fi
95    
96  (cd escript; if [ ! -e Makefile ]; then ln -s ./escript.mk Makefile; fi)  # run the python tests
97  (cd esysUtils; if [ ! -e Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)  if [ "$1" == "py_test" ]
98  (cd finley; if [ ! -e Makefile ]; then ln -s ./finley.mk Makefile; fi)  then
99  (cd tools/mmio; if [ ! -e Makefile ]; then ln -s ./mmio.mk Makefile; fi)      for module in $TESTS
100  (cd tools/CppUnitTest; if [ ! -e Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)      do
101        echo "Running python tests for: $module"
102        cd $ESYS_ROOT/$module/test/python
103        if [ "$module" == "finley" ]
104        then
105                for pytest in $FINLEY_PYTESTS
106                do
107                echo "Running python test: $pytest"
108                    python $pytest
109                    if [ $? != 0 ]
110                    then
111                      echo Python Testing FAILED for $pytest in module $module
112                      exit 1
113                    fi
114                done
115        elif [ "$module" == "escript" ]
116        then
117                for pytest in $ESCRIPT_PYTESTS
118                do
119                echo "Running python test: $pytest"
120                    python $pytest
121                    if [ $? != 0 ]
122                    then
123                      echo Python Testing FAILED for $pytest in module $module
124                      exit 1
125                    fi
126                done
127        elif [ "$module" == "bruce" ]
128        then
129                for pytest in $BRUCE_PYTESTS
130                do
131                echo "Running python test: $pytest"
132                    python $pytest
133                    if [ $? != 0 ]
134                    then
135                      echo Python Testing FAILED for $pytest in module $module
136                      exit 1
137                    fi
138                done
139        fi
140        done
141        exit 0
142    fi
143    
144  for module in $MODULES ; do \  # default case - just build all modules
145      (echo Building: $module; cd $module; env $ENVVARS gmake -j 8) \  echo "*************** build ************************************"
146    for module in $MODULES ; do
147        (echo Building: $module; cd $module; env $ENVVARS make -j 10)
148            if [ $? != 0 ]
149            then
150                echo Build FAILED for module: $module
151                exit 1
152            fi
153  done  done
154    
155  if [ "$1" == "install" ];  # install all modules
156    if [ "$1" == "install" ]
157  then  then
158            echo "***************installation ************************************"
159      for module in $MODULES ; do \      for module in $MODULES ; do \
160          (echo Installing: $module; cd $module; env $ENVVARS gmake install ) \                  echo ENVVARS = $ENVVARS
161            (echo Installing: $module; cd $module; env $ENVVARS make install)
162                    if [ $? != 0 ]
163                    then
164                      echo Installation FAILED for module: $module
165                      exit 1
166                    fi
167      done      done
168            (cd esys; touch __init__.py)
169            (cd esys/escript; if [ ! -h escriptcpp.so ]; then ln -s ../../lib/libescriptcpp.so escriptcpp.so; fi)
170            (cd esys/finley; if [ ! -h finleycpp.so ]; then ln -s ../../lib/libfinleycpp.so finleycpp.so; fi)
171            (cd esys/bruce; if [ ! -h brucecpp.so ]; then ln -s ../../lib/libbrucecpp.so brucecpp.so; fi)
172            exit 0
173  fi  fi
   
 (cd esys; if [ ! -e escriptcpp.so ]; then ln -s ../lib/libescriptcpp.so escriptcpp.so; fi)  
 (cd esys; if [ ! -e finleycpp.so ]; then ln -s ../lib/libfinleycpp.so finleycpp.so; fi)  

Legend:
Removed from v.121  
changed lines
  Added in v.268

  ViewVC Help
Powered by ViewVC 1.1.26