Salome HOME
Add RANDOMIZER and SIERPINSKY modules.
[tools/install.git] / config_files / build.csh
index ec0b9c0e05cb41f6723997226eb9300a147a1a1d..14b7a64417f96826cb837206b1e7216f4fb149b4 100755 (executable)
@@ -6,7 +6,7 @@
 #  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
 #  Project   : SALOME
 #  Module    : Installation Wizard
-#  Copyright : 2002-2006 CEA
+#  Copyright : 2002-2007 CEA
 #
 #  This script is the part of the SALOME installation procedure.
 #
@@ -17,6 +17,7 @@
 
 set is_build_configure=0
 set is_configure=0
+set med_with_gui=1
 set is_delete=0
 set verbose_level=2
 set params=""
@@ -37,6 +38,8 @@ while ( ${%1} > 0 )
        set is_configure=1
     else if ( "$1" == "-c" ) then
        set is_configure=1
+    else if ( "$1" == "-w" ) then
+       set med_with_gui=0
     else if ( "$1" == "-d" ) then
        set is_delete=1
     else if ( "$1" == "-o" ) then
@@ -89,6 +92,10 @@ echo "            This option forces configure (-c) key to be set. Default is of
 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 ""
 echo "-d          Delete build directories before calling configure, to enforce full rebuild"
 echo "            (and reinstall if -i or -p option is used) of module."
 echo "            Use this option carefully."
@@ -241,13 +248,16 @@ foreach module (${modules})
            #########################################################
            # call build_configure
            #########################################################
+           if ( $med_with_gui == 0 && "${module}" == "MED" ) then
+               set add_keys="--without-ihm"
+           endif
            cd ${module_src}
-           ./build_configure >& ${LOG_DIR}/build_configure_${module}.log
+           ./build_configure ${add_keys} >& ${LOG_DIR}/build_configure_${module}.log
            #########################################################
            # echo possible errors
            #########################################################
            if ( $verbose_level > 0 ) then
-               cat ${LOG_DIR}/build_configure_${module}.log | grep -E "(failed|: error:)" > /dev/stderr
+               cat ${LOG_DIR}/build_configure_${module}.log | grep -E "(failed|: error:)" >&2
            endif
        endif
     endif
@@ -315,7 +325,10 @@ foreach module (${modules})
        if ( ! -e ${module_src}/configure ) then
            echo "\!\!\! Warning \!\!\! Can not find configure script in ${module_src}."
        else
-           if (  "${module}" == "NETGENPLUGIN" && ($?NETGENHOME) ) then
+           if ( $med_with_gui == 0 && "${module}" == "MED" ) then
+               set add_keys="--without-ihm"
+           endif
+           if ( "${module}" == "NETGENPLUGIN" && ($?NETGENHOME) ) then
                set add_keys="--with-netgen=${NETGENHOME}"
            endif
            ${module_src}/configure --prefix=$px ${optim} ${add_keys} >& ${LOG_DIR}/configure_${module}.log
@@ -323,10 +336,10 @@ foreach module (${modules})
            # echo possible errors
            #########################################################
            if ( $verbose_level > 0 ) then
-               cat ${LOG_DIR}/configure_${module}.log | grep ": error:" > /dev/stderr
+               cat ${LOG_DIR}/configure_${module}.log | grep ": error:" >&2
            endif
            if ( $verbose_level > 1 ) then
-               cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:" > /dev/stderr
+               cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:" >&2
            endif
        endif
     endif
@@ -350,7 +363,7 @@ foreach module (${modules})
     #########################################################
     # print make errors
     #########################################################
-    cat ${LOG_DIR}/make_${module}.log | grep '[*][*][*]' > /dev/stderr
+    cat ${LOG_DIR}/make_${module}.log | grep '[*][*][*]' >&2
     #########################################################
     # print compiler errors and warnings
     # Note: here awk is used to concatenate together several lines of single
@@ -359,10 +372,10 @@ foreach module (${modules})
     #########################################################
     if ( $verbose_level > 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/"@@ > /dev/stderr
+       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
     endif
     if ( $verbose_level > 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/"@@ > /dev/stderr
+       cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep ": warning" | sed s@"^${module_src}/src/"@@ >&2
     endif
     #########################################################
     # perform make dev_docs step if -t flag is given
@@ -373,7 +386,7 @@ foreach module (${modules})
        if ( "$dd" != "" ) then
            echo "... Performing make dev_docs"
            make dev_docs >& ${LOG_DIR}/make_dev_docs_${module}.log
-           cat ${LOG_DIR}/make_dev_docs_${module}.log | grep '[*][*][*]' > /dev/stderr
+           cat ${LOG_DIR}/make_dev_docs_${module}.log | grep '[*][*][*]' >&2
        endif
     endif
     cd ${module_build}