X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=config_files%2Fbuild.csh;h=7b8ea28e53bebd658429a34911aa042f2d829aa4;hb=3fc3493387b534f9e0c536de985ac0af3413ae7a;hp=9325b6e176f79d50387b1a47464152345a069215;hpb=a4fcf53cfc132258cbb51ce990bda7e30de90958;p=tools%2Finstall.git diff --git a/config_files/build.csh b/config_files/build.csh index 9325b6e..7b8ea28 100755 --- a/config_files/build.csh +++ b/config_files/build.csh @@ -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 GUI GEOM MED SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR HELLO PYHELLO LIGHT) +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 #########################################################