Salome HOME
Ensure cmake_build_type is used in SALOME 9.12.0
[tools/sat_salome.git] / products / compil_scripts / openmpi.sh
1 #!/bin/bash
2
3 echo "##########################################################################"
4 echo "OpenMPI" $VERSION
5 echo "##########################################################################"
6
7 rm -rf $BUILD_DIR
8 mkdir $BUILD_DIR
9 cd $BUILD_DIR
10
11 # -p option ensures that the date remain the same.
12 cp -p -r $SOURCE_DIR/* .
13
14 if [ -f autogen.pl ] && [ ! -f configure ]; then
15     echo
16     echo "*** autogen.pl"
17     chmod +x autogen.pl
18     ./autogen.pl
19     if [ $? -ne 0 ]; then
20         echo "ERROR on autogen.pl"
21         exit 1
22     fi
23 fi
24
25 echo
26 echo "*** configure"
27 $BUILD_DIR/configure --prefix=$PRODUCT_INSTALL
28 if [ $? -ne 0 ]; then
29     echo "ERROR on configure"
30     exit 2
31 fi
32
33 echo
34 echo "*** make" $MAKE_OPTIONS
35 make $MAKE_OPTIONS
36 if [ $? -ne 0 ]; then
37     echo "ERROR on make"
38     exit 3
39 fi
40
41 echo
42 echo "*** make install"
43 make install
44 if [ $? -ne 0 ]; then
45     echo "ERROR on make install"
46     exit 4
47 fi
48
49 echo
50 echo "########## END"
51