Salome HOME
Prepare SALOME 7.3.0
[tools/install.git] / config_files / build.sh
index 8b6a636d3afa3b5ba27a7795bd8c8089eda92581..547d5b45b5805f61a7c88022b2d2c9817092f428 100755 (executable)
@@ -116,7 +116,7 @@ b_params=""
 for arg in $@ ; do
     known=0
     for m in $modules ; do
-       if [ "$m" == "$arg" ] ; then known=1 ; break ; fi
+       if [ "$m" = "$arg" ] ; then known=1 ; break ; fi
     done
     if [ $known -eq 0 ] ; then
        echo
@@ -135,7 +135,7 @@ if [ "${params}" != "" ] ; then
     for module in ${modules} ; do
        found=0
        for p in $params ; do
-           if [ "$p" == "$module" ] ; then found=1 ; break ; fi
+           if [ "$p" = "$module" ] ; then found=1 ; break ; fi
        done
        if [ $found -eq 1 ] ; then 
            xparams="$xparams $module"
@@ -178,12 +178,12 @@ LOG_DIR=${BUILD_DIR}/LOGS
 #########################################################
 # define installation prefix
 #########################################################
-if [ "$prefix" == "" ] ; then
+if [ "$prefix" = "" ] ; then
     echo
     echo '!!! Warning !!! Installation directory is not set.'
     echo "All the modules will be installed to the ${BUILD_DIR}${def_install_dir}"
 else
-    if [ "`echo $prefix | grep -E '^/'`" == "" ] ; then
+    if [ "`echo $prefix | grep -E '^/'`" = "" ] ; then
        prefix=${BUILD_DIR}/$prefix
        echo
        echo '!!! Warning !!! Relative prefix is used.'
@@ -244,7 +244,7 @@ for module in ${modules}; do
            if [ ! -e ${module_src}/build_configure ] && [ "${module}" != "PARAVIS" ] ; then
                echo '!!! Warning !!! Cannot find build_configure script in '${module_src}'.'
            else
-               if [ "${module}" == "PARAVIS" ]; then
+               if [ "${module}" = "PARAVIS" ]; then
                    echo '!!! Warning !!! build_configure step is not executed for '${module}'.'                    
                else
                    #########################################################
@@ -312,7 +312,7 @@ for module in ${modules}; do
            vx=`grep -e "^AC_INIT" ${module_src}/configure.ac | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
        elif [ -e ${module_src}/configure.in.base ] ; then
            vx=`grep -e "^VERSION=" ${module_src}/configure.in.base | awk -F= '{ if (NF>1) print $NF; }' | tr -d '[:space:]'`
-           if [ "$vx" == "" ] ; then
+           if [ "$vx" = "" ] ; then
                vx=`grep -e "^AC_INIT" ${module_src}/configure.in.base | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
            fi
        elif [ -e ${module_src}/CMakeLists.txt ] ; then
@@ -324,7 +324,7 @@ for module in ${modules}; do
        if [ "$vx" != "" ] ; then
            vx="_$vx"
        fi
-       if [ "$prefix" == "" ] ; then
+       if [ "$prefix" = "" ] ; then
            px=${BUILD_DIR}${def_install_dir}/${module}${vx}
        else
            px=$prefix/${module}${vx}
@@ -347,14 +347,14 @@ for module in ${modules}; do
                if [ $inst_with_gui -eq 0 ] ; then
                    myconf_keys="${myconf_keys} --without-gui"
                fi
-               if [ "${module}" == "MED" ] && [ "${METISDIR}" != "" ] && [ "${SCOTCHDIR}" != "" ] ; then
-                   myconf_keys="${myconf_keys} --enable-splitter=yes --with-metis=${METISDIR} --with-scotch=${SCOTCHDIR}"
+               if [ "${module}" = "MED" ] && [ "${METIS_ROOT_DIR}" != "" ] && [ "${SCOTCH_ROOT_DIR}" != "" ] ; then
+                   myconf_keys="${myconf_keys} --enable-splitter=yes --with-metis=${METIS_ROOT_DIR} --with-scotch=${SCOTCH_ROOT_DIR}"
                fi
-               if [ "${module}" == "NETGENPLUGIN" ] && [ "$NETGENHOME" != "" ] ; then
-                   myconf_keys="${myconf_keys} --with-netgen=${NETGENHOME}"
+               if [ "${module}" = "NETGENPLUGIN" ] && [ "$NETGEN_ROOT_DIR" != "" ] ; then
+                   myconf_keys="${myconf_keys} --with-netgen=${NETGEN_ROOT_DIR}"
                fi
 
-               if [ "${module}" == "PARAVIS" ] ; then
+               if [ "${module}" = "PARAVIS" ] ; then
                    cd ${module_build}; cmake ${module_src} -DCMAKE_INSTALL_PREFIX=$px >& ${LOG_DIR}/configure_${module}.log
                else
                    ${module_src}/configure --prefix=$px ${optim} ${myconf_keys} >& ${LOG_DIR}/configure_${module}.log
@@ -382,13 +382,13 @@ for module in ${modules}; do
         #########################################################
         # then make
         #########################################################
-       if [ "${module}" == "PARAVIS" ] ; then
+       if [ "${module}" = "PARAVIS" ] ; then
            VTK_AUTOLOAD_PATH_BACKUP=${VTK_AUTOLOAD_PATH}
            test "${VTK_AUTOLOAD_PATH}" != "" && unset VTK_AUTOLOAD_PATH
        fi
        make >& ${LOG_DIR}/make_${module}.log
        sts=$?
-       if [ "${module}" == "PARAVIS" ] ; then
+       if [ "${module}" = "PARAVIS" ] ; then
            test "${VTK_AUTOLOAD_PATH_BACKUP}" != "" && export VTK_AUTOLOAD_PATH=${VTK_AUTOLOAD_PATH_BACKUP}
        fi
         #########################################################
@@ -431,7 +431,7 @@ for module in ${modules}; do
         #########################################################
         # perform make if -i or -p flags are given
         #########################################################
-       if [ $is_install -eq 1 ] && [ $sts -eq 0 ] || [ "${module}" == "KERNEL" ] ; then
+       if [ $is_install -eq 1 ] && [ $sts -eq 0 ] || [ "${module}" = "KERNEL" ] ; then
            #########################################################
            # deleting build directory if -d flag is given
            #########################################################