/[escript]/trunk/mk
ViewVC logotype

Diff of /trunk/mk

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

revision 121 by jgs, Fri May 6 04:26:16 2005 UTC revision 145 by jgs, Mon Jul 25 05:43:00 2005 UTC
# Line 3  Line 3 
3  # $Id$  # $Id$
4  # An explicit 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"
14    
15  # use for local developmental builds  # the tests to run
16  ENVVARS="DODEBUG=YES"  TESTS="escript finley"
17    
18    # use this setting for local developmental builds
19    #ENVVARS="DODEBUG=YES"
20    
21    if [ "$2" == "DEBUG" ];
22    then
23        ENVVARS="DODEBUG=YES"
24    fi
25    
26    if [ "$2" == "NODEBUG" ];
27    then
28        ENVVARS="DODEBUG=NO"
29    fi
30    
31  # use for production installs  - NB: overwrites installed esys llibraries  # use this setting for production installs on altix
32    # ** NB: overwrites centrally installed esys libraries on altix ***
33  #ENVVARS="L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"  #ENVVARS="L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"
34    
35    # ensure required symlinks are setup first
36    (cd escript/inc; if [ ! -h escript ]; then ln -s ../src escript; fi)
37    (cd esysUtils/inc; if [ ! -h esysUtils ]; then ln -s ../src esysUtils; fi)
38    (cd finley/inc; if [ ! -h finley ]; then ln -s ../src finley; fi)
39    
40    (cd escript; if [ ! -h Makefile ]; then ln -s ./escript.mk Makefile; fi)
41    (cd esysUtils; if [ ! -h Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)
42    (cd finley; if [ ! -h Makefile ]; then ln -s ./finley.mk Makefile; fi)
43    (cd tools/mmio; if [ ! -h Makefile ]; then ln -s ./mmio.mk Makefile; fi)
44    (cd tools/CppUnitTest; if [ ! -h Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)
45    (cd modellib; if [ ! -h Makefile ]; then ln -s ./modellib.mk Makefile; fi)
46    
47    # clean all modules
48  if [ "$1" == "clean" ];  if [ "$1" == "clean" ];
49  then  then
50      for module in $MODULES ; do \      for module in $MODULES ; do \
# Line 19  then Line 53  then
53          exit          exit
54  fi  fi
55    
56  (cd escript/lib; if [ ! -e py_src ]; then mkdir py_src; fi)  # uninstall all modules
57    if [ "$1" == "uninstall" ];
58  (cd escript/inc; if [ ! -e escript ]; then ln -s ../src escript; fi)  then
59  (cd esysUtils/inc; if [ ! -e esysUtils ]; then ln -s ../src esysUtils; fi)      for module in $MODULES ; do \
60  (cd finley/inc; if [ ! -e finley ]; then ln -s ../src finley; fi)          (echo Cleaning: $module; cd $module; gmake uninstall) \
61        done
62  (cd escript; if [ ! -e Makefile ]; then ln -s ./escript.mk Makefile; fi)          exit
63  (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)  
64    
65    # default case - just build all modules
66  for module in $MODULES ; do \  for module in $MODULES ; do \
67      (echo Building: $module; cd $module; env $ENVVARS gmake -j 8) \      (echo Building: $module; cd $module; env $ENVVARS gmake -j 10) \
68  done  done
69    
70    # install all modules
71  if [ "$1" == "install" ];  if [ "$1" == "install" ];
72  then  then
73      for module in $MODULES ; do \      for module in $MODULES ; do \
74          (echo Installing: $module; cd $module; env $ENVVARS gmake install ) \          (echo Installing: $module; cd $module; env $ENVVARS gmake install) \
75      done      done
76            (cd esys/escript; if [ ! -h escriptcpp.so ]; then ln -s ../../lib/libescriptcpp.so escriptcpp.so; fi)
77            (cd esys/finley; if [ ! -h finleycpp.so ]; then ln -s ../../lib/libfinleycpp.so finleycpp.so; fi)
78  fi  fi
79    
80  (cd esys; if [ ! -e escriptcpp.so ]; then ln -s ../lib/libescriptcpp.so escriptcpp.so; fi)  # run the unit tests
81  (cd esys; if [ ! -e finleycpp.so ]; then ln -s ../lib/libfinleycpp.so finleycpp.so; fi)  if [ "$1" == "unit_test" ]
82    then
83        for module in $TESTS
84        do
85        echo "Running unit tests for: $module"
86        cd $ESYS_ROOT/$module/test
87        unit_test
88        done
89    fi
90    
91    # run the python tests
92    if [ "$1" == "py_test" ]
93    then
94        for module in $TESTS
95        do
96        echo "Running python tests for: $module"
97        if [ "$module" == "finley" ]
98        then
99            cd $ESYS_ROOT/$module/test/python
100                python ImportTest.py
101            python SimpleSolve.py
102            python GradTest.py
103        elif [ "$module" == "escript" ]
104        then
105            cd $ESYS_ROOT/$module/test/python
106                python ImportTest.py
107            python BinaryOps.py
108            python UnaryOps.py
109            python SliceGetting.py
110            python SliceSetting.py
111                python MiscTests.py
112        fi
113        done
114    fi

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

  ViewVC Help
Powered by ViewVC 1.1.26