Salome HOME
Merge from V6_main 01/04/2013
[modules/hexablock.git] / src / HEXABLOCK / umake
1 #!/bin/sh
2 # Copyright (C) 2009-2013  CEA/DEN, EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 # Comm : Makefile associe aux tests unitaires
22
23 commande=$0
24 liste_args="$*"
25
26 # =============================================== Begin
27
28 test_u=
29 opt=
30 for arg in $*
31    do
32    case $arg in
33       -setx ) set -x 
34            ;;
35       -clean  ) 
36          rm -rf *.exe *.a *.o *.bak *.brep *~ *.vtk *.cpp *.xml *.exe.stackdump
37            exit
38            ;;
39       -j  ) opt="$opt -j4"
40            ;;
41       -j* ) opt="$opt $arg"
42            ;;
43       -k  ) echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo
44             echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo
45            ;;
46       *) if ( [ -z "$test_u" ] ) then
47             test_u=`echo $arg | cut -d. -f1`
48             ishere=`grep -w $test_u test_*.cxx | grep -c tabargs`
49             if ( [ "$ishere" = "0" ] ) then
50                echo "****"
51                echo "**** Programme non trouve : $test_u"
52                echo "****"
53                exit 1
54                fi
55             fi
56    esac
57    done
58
59 if ( [ -z "$test_u" ] ) then
60    test_u=test_hexa
61    fi
62
63 if ( [ ! -f makefile.ozz ] ) then
64    ./make.make
65    fi
66
67 make -f makefile.ozz $opt main=$test_u