Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/hexablock.git] / src / HEXABLOCK / umake
1 #!/bin/sh
2 # Comm : Makefile associe aux tests unitaires
3
4 commande=$0
5 liste_args="$*"
6
7 # =============================================== Begin
8
9 test_u=
10 opt=
11 for arg in $*
12    do
13    case $arg in
14       -setx ) set -x 
15            ;;
16       -clean  ) 
17          rm -rf *.exe *.a *.o *.bak *.brep *~ *.vtk *.cpp *.xml *.exe.stackdump
18            exit
19            ;;
20       -j  ) opt="$opt -j4"
21            ;;
22       -j* ) opt="$opt $arg"
23            ;;
24       -k  ) echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo
25             echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo
26            ;;
27       *) if ( [ -z "$test_u" ] ) then
28             test_u=`echo $arg | cut -d. -f1`
29             ishere=`grep -w $test_u test_*.cxx | grep -c tabargs`
30             if ( [ "$ishere" = "0" ] ) then
31                echo "****"
32                echo "**** Programme non trouve : $test_u"
33                echo "****"
34                exit 1
35                fi
36             fi
37    esac
38    done
39
40 if ( [ -z "$test_u" ] ) then
41    test_u=test_hexa
42    fi
43
44 if ( [ ! -f makefile.ozz ] ) then
45    ./make.make
46    fi
47
48 make -f makefile.ozz $opt main=$test_u