Salome HOME
New version of doxygen (1.4.6) is introduced
[tools/install.git] / config_files / build.csh
index 50529458e51714832763918b2a49bb2e0189df7b..7b8ea28e53bebd658429a34911aa042f2d829aa4 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/csh -f
 ##################################################################################################
 # Name       : build.csh
-# Description: Build and install SALOME2 modules from sources
+# Description: Build and install SALOME modules from sources
 # Author     : Vadim SANDLER (VSR), Open CASCADE S.A.
 # Created    : 27.01.2005
 ##################################################################################################
@@ -12,7 +12,7 @@ set is_delete=0
 set verbose_level=2
 set params=""
 set b_params=""
-set modules=(KERNEL GEOM MED SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR HELLO PYHELLO)
+set modules=(KERNEL GUI GEOM MED SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT)
 set optim=""
 set is_install=0
 set is_help=0
@@ -135,7 +135,10 @@ echo $modules
 #########################################################
 # set environment
 #########################################################
-set env_script=`dirname $0`/env_products.csh
+set env_script=`dirname $0`/env_build.csh
+if ( ! -e $env_script ) then
+    set env_script=`dirname $0`/env_products.csh
+endif
 if ( -e $env_script ) then
     echo "Setting environment"
     source $env_script
@@ -190,22 +193,22 @@ foreach module (${modules})
     if ( $is_build_configure == 1 || $cfg_exist == 0 ) then
        echo "------- Build configure ---------"
        #########################################################
-       # if build_configure script is not found, omit the module
+       # check if build_configure script exists
        #########################################################
        if ( ! -e ${module_src}/build_configure ) then
-           echo "Error! Nothing to build in ${module_src}. Skipping module."
-           continue
-       endif
-       #########################################################
-       # call build_configure
-       #########################################################
-       cd ${module_src}
-       ./build_configure >& ${LOG_DIR}/build_configure_${module}.log
-       #########################################################
-       # echo possible errors
-       #########################################################
-       if ( $verbose_level > 0 ) then
-           cat ${LOG_DIR}/build_configure_${module}.log | grep ": error:"
+           echo "Warning! Can not find build_configure script in ${module_src}."
+       else
+           #########################################################
+           # call build_configure
+           #########################################################
+           cd ${module_src}
+           ./build_configure >& ${LOG_DIR}/build_configure_${module}.log
+           #########################################################
+           # echo possible errors
+           #########################################################
+           if ( $verbose_level > 0 ) then
+               cat ${LOG_DIR}/build_configure_${module}.log | grep ": error:"
+           endif
        endif
     endif
     #########################################################
@@ -251,18 +254,25 @@ foreach module (${modules})
     #########################################################
     if ( $is_configure == 1 || $mkfile_exist == 0) then
        echo "------- Configure ---------------"
-       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
        #########################################################
-       # echo possible errors
+       # check if configure script exists
        #########################################################
-       if ( $verbose_level > 0 ) then
-           cat ${LOG_DIR}/configure_${module}.log | grep ": error:"
-       endif
-       if ( $verbose_level > 1 ) then
-           cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:"
+       if ( ! -e ${module_src}/configure ) then
+           echo "Warning! Can not find configure script in ${module_src}."
+       else
+           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
+           #########################################################
+           # echo possible errors
+           #########################################################
+           if ( $verbose_level > 0 ) then
+               cat ${LOG_DIR}/configure_${module}.log | grep ": error:"
+           endif
+           if ( $verbose_level > 1 ) then
+               cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:"
+           endif
        endif
     endif
     #########################################################
@@ -272,7 +282,7 @@ foreach module (${modules})
     #########################################################
     # first clear dependencies
     #########################################################
-    find . -name ".dep*" -exec rm -rf {} \; >& /dev/null
+    find . -name ".dep*" -type f -exec rm -f {} \; >& /dev/null
     make >& ${LOG_DIR}/make_${module}.log
     set sts=$status
     #########################################################