Salome HOME
ROOT : cleanup + add ROOT master product batch file
[tools/sat_salome.git] / products / compil_scripts / ispc-1.9.2.sh
1 #!/bin/bash                                                                                                                                                                              
2
3 echo "##########################################################################"
4 echo "ispc" $VERSION
5 echo "##########################################################################"
6
7 if [ -f "$SOURCE_DIR/bin/ispc" ]
8 then
9     echo "INFO: about to copy the ispc binary utility to the installation folder: $PRODUCT_INSTALL/bin"
10     mkdir -p $PRODUCT_INSTALL/bin
11     cp  $SOURCE_DIR/bin/ispc $PRODUCT_INSTALL/bin
12     chmod +x $PRODUCT_INSTALL/bin/ispc
13 else
14     echo "INFO: compiling ispc..."
15     cd $SOURCE_DIR
16     TARGET_MAKE=gcc
17     # issue with the current version of CLANG libraries
18     if [[ $DIST_NAME == "UB" && $DIST_VERSION == "18.04" ]]
19     then
20         TARGET_MAKE=clang
21     fi
22     
23     # CentOS 6
24     if [[ $DIST_NAME == "CO" && $DIST_VERSION == "6" ]]
25     then
26         TARGET_MAKE=clang
27     fi
28     
29     echo "*** make" $MAKE_OPTIONS $TARGET_MAKE
30     make $MAKE_OPTIONS $TARGET_MAKE
31     if [ $? -ne 0 ]
32     then
33         echo "ERROR on make"
34         exit 2
35     fi
36     
37     echo "INFO: about to copy the ispc binary utility to the installation folder: $PRODUCT_INSTALL/bin"
38     mkdir -p $PRODUCT_INSTALL/bin
39     cp $SOURCE_DIR/ispc $PRODUCT_INSTALL/bin
40     chmod +x $PRODUCT_INSTALL/bin/ispc
41 fi
42
43 echo
44 echo "########## END"