#! /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
##################################################################################################
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
#########################################################
# 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
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
#########################################################
#########################################################
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
#########################################################
#########################################################
# 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
#########################################################