Salome HOME
Update for 5.1.2
[tools/install.git] / config_files / build.sh
index 553908e97aea92aff000b4ef146c781439f5aaf0..178cae277aad0d73ae258d1c8d5af0ba3838b43c 100755 (executable)
@@ -6,7 +6,7 @@
 #  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
 #  Project   : SALOME
 #  Module    : Installation Wizard
-#  Copyright : 2002-2007 CEA
+#  Copyright : 2002-2008 CEA
 #
 #  This script is the part of the SALOME installation procedure.
 #
@@ -38,9 +38,9 @@ usage(){
     echo ""
     echo "-c          Perform configure command for all given modules. Default is off."
     echo ""
-    echo "-w          Add --without-ihm key to build_configure and configure"
-    echo "            commands for MED module to build its sources without GUI."
-    echo "            By default MED sources are built with GUI."
+    echo "-w          Add --without-gui key to build_configure and configure commands"
+    echo "            to build SALOME module sources without GUI."
+    echo "            By default sources are built with GUI."
     echo ""
     echo "-d          Delete build directories before calling configure, to enforce full"
     echo "            rebuild (and reinstall if -i or -p option is used) of module."
@@ -83,12 +83,12 @@ usage(){
 
 is_build_configure=0
 is_configure=0
-med_with_gui=1
+inst_with_gui=1
 is_delete=0
 verbose_level=2
 params=""
 b_params=""
-modules="KERNEL GUI GEOM MED SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT"
+modules="KERNEL GUI GEOM MED SMESH VISU NETGENPLUGIN GHS3DPLUGIN BLSURFPLUGIN HexoticPLUGIN GHS3DPRLPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT PYLIGHT SIERPINSKY RANDOMIZER YACS"
 optim=""
 is_install=0
 is_tui=0
@@ -102,7 +102,7 @@ while getopts ":hbcwdoitv:p:" option ; do
         h ) usage ;;
         b ) is_build_configure=1 ; is_configure=1 ;;
         c ) is_configure=1 ;;
-        w ) med_with_gui=0 ;;
+        w ) inst_with_gui=0 ;;
         d ) is_delete=1 ;;
         o ) optim="--enable-production=yes --disable-debug" ;;
         i ) is_install=1 ;;
@@ -255,8 +255,8 @@ for module in ${modules}; do
                #########################################################
                 # call build_configure
                #########################################################
-               if [ $med_with_gui -eq 0 ] && [ ${module} == "MED" ] ; then
-                   add_keys="--without-ihm"
+               if [ $inst_with_gui -eq 0 ] ; then
+                   add_keys="--without-gui"
                fi
                cd ${module_src}
                ./build_configure ${add_keys} >& ${LOG_DIR}/build_configure_${module}.log
@@ -312,6 +312,9 @@ for module in ${modules}; do
        fi
        if [ -e ${module_src}/${cfg_file} ] ; then
            vx=`grep -e "^VERSION=" ${module_src}/${cfg_file} | awk -F= '{ if (NF>1) print $NF; }' | tr -d '[:space:]'`
+           if [ "$vx" == "" ] ; then
+               vx=`grep -e "^AC_INIT" ${module_src}/${cfg_file} | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
+           fi
        fi
        px=${BUILD_DIR}/${module}
        if [ "$prefix" != "" ] ; then
@@ -334,8 +337,11 @@ for module in ${modules}; do
                echo '!!! Warning !!! Can not find configure script in '${module_src}'.'
                echo
            else
-               if [ $med_with_gui -eq 0 ] && [ "${module}" == "MED" ] ; then
-                   add_keys="--without-ihm"
+               if [ $inst_with_gui -eq 0 ] ; then
+                   add_keys="--without-gui"
+               fi
+               if [  "${module}" == "MED" ] && [ "${METISDIR}" != "" ] && [ "${SCOTCHDIR}" != "" ] ; then
+                   add_keys="--enable-splitter=yes --with-metis=${METISDIR} --with-scotch=${SCOTCHDIR}"
                fi
                if [ "${module}" == "NETGENPLUGIN" ] && [ "$NETGENHOME" != "" ] ; then
                    add_keys="--with-netgen=${NETGENHOME}"
@@ -372,7 +378,7 @@ for module in ${modules}; do
         #########################################################
         # print make errors
         #########################################################
-       cat ${LOG_DIR}/make_${module}.log | grep '[*][*][*]' >&2
+       cat ${LOG_DIR}/make_${module}.log | grep -Ei '[*][*][*].*error' >&2
         #########################################################
         # print compiler errors and warnings
         # Note: here awk is used to concatenate together several lines of single
@@ -381,10 +387,10 @@ for module in ${modules}; do
         #########################################################
        if [ $verbose_level -gt 0 ] ; then
            ###cat ${LOG_DIR}/make_${module}.log | grep ": error"
-           cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep "${module_src}/[A-Za-z_0-9./]*:" | sed s@"^${module_src}/src/"@@ >&2
+           cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {print $0} END {print ""}' | grep "${module_src}/[A-Za-z_0-9./]*:" | sed s@"^${module_src}/src/"@@ >&2
        fi
        if [ $verbose_level -gt 1 ] ; then
-           cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep ": warning" | sed s@"^${module_src}/src/"@@ >&2
+           cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {print $0} END {print ""}' | grep -E ": warning|* Warning" | sed s@"^${module_src}/src/"@@ >&2
        fi
         #########################################################
         # perform make dev_docs step if -t flag is given