From: maintenance team Date: Thu, 22 May 2008 11:46:22 +0000 (+0000) Subject: Update for building MED without gui X-Git-Tag: V_3_2_10~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a7ad9031b65e419d315ebe768a8bc5aa83f03b8;p=tools%2Finstall.git Update for building MED without gui --- diff --git a/config_files/build.csh b/config_files/build.csh index aeec6e7..f6c40e4 100755 --- a/config_files/build.csh +++ b/config_files/build.csh @@ -17,11 +17,12 @@ set is_build_configure=0 set is_configure=0 +set med_with_gui=1 set is_delete=0 set verbose_level=2 set params="" set b_params="" -set modules=(KERNEL GUI GEOM MED MEDWOGUI SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT RANDOMIZER SIERPINSKY) +set modules=(KERNEL GUI GEOM MED SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT RANDOMIZER SIERPINSKY) set optim="" set is_install=0 set is_help=0 @@ -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 @@ -87,6 +90,12 @@ echo "Options:" echo "-b Perform build_configure command for all given modules." echo " This option forces configure (-c) key to be set. Default is off." echo "" +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 "" echo "-c Perform configure command for all given modules. Default is off." echo "" echo "-d Delete build directories before calling configure, to enforce full rebuild" @@ -241,8 +250,11 @@ 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 ######################################################### @@ -318,9 +330,9 @@ foreach module (${modules}) if ( "${module}" == "NETGENPLUGIN" && ($?NETGENHOME) ) then set add_keys="--with-netgen=${NETGENHOME}" endif - if ( "${module}" == "MEDWOGUI" ) then - set add_keys="--without-ihm" - endif + if ( $med_with_gui > 0 && "${module}" == "MED" ) then + set add_keys="--without-ihm" + endif ${module_src}/configure --prefix=$px ${optim} ${add_keys} >& ${LOG_DIR}/configure_${module}.log ######################################################### # echo possible errors diff --git a/config_files/build.sh b/config_files/build.sh index 7d81803..930aae3 100755 --- a/config_files/build.sh +++ b/config_files/build.sh @@ -38,6 +38,10 @@ 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 "" echo "-d Delete build directories before calling configure, to enforce full" echo " rebuild (and reinstall if -i or -p option is used) of module." echo " Use this option carefully." @@ -79,11 +83,12 @@ usage(){ is_build_configure=0 is_configure=0 +med_with_gui=1 is_delete=0 verbose_level=2 params="" b_params="" -modules="KERNEL GUI GEOM MED MEDWOGUI SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT RANDOMIZER SIERPINSKY" +modules="KERNEL GUI GEOM MED SMESH VISU SUPERV NETGENPLUGIN GHS3DPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT RANDOMIZER SIERPINSKY" optim="" is_install=0 is_tui=0 @@ -92,11 +97,12 @@ prefix="" ######################################################### # parse parameters ######################################################### -while getopts ":hbcdoitv:p:" option ; do +while getopts ":hbcwdoitv:p:" option ; do case $option in h ) usage ;; b ) is_build_configure=1 ; is_configure=1 ;; c ) is_configure=1 ;; + w ) med_with_gui=0 ;; d ) is_delete=1 ;; o ) optim="--enable-production=yes --disable-debug" ;; i ) is_install=1 ;; @@ -249,8 +255,11 @@ for module in ${modules}; do ######################################################### # call build_configure ######################################################### + if [ $med_with_gui -eq 0 ] && [ ${module} == "MED" ] ; then + add_keys="--without-ihm" + fi cd ${module_src} - ./build_configure >& ${LOG_DIR}/build_configure_${module}.log + ./build_configure ${add_keys} >& ${LOG_DIR}/build_configure_${module}.log ######################################################### # echo possible errors ######################################################### @@ -300,9 +309,12 @@ for module in ${modules}; do cfg_file=configure.ac if [ ! -e ${module_src}/${cfg_file} ] ; then cfg_file=configure.in.base - 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 + else + vx=`grep -e "^AC_INIT" ${module_src}/${cfg_file} | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"` fi px=${BUILD_DIR}/${module} if [ "$prefix" != "" ] ; then @@ -325,12 +337,12 @@ 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" + fi if [ "${module}" == "NETGENPLUGIN" ] && [ "$NETGENHOME" != "" ] ; then add_keys="--with-netgen=${NETGENHOME}" fi - if [ "${module}" == "MEDWOGUI" ]; then - add_keys="--without-ihm" - fi ${module_src}/configure --prefix=$px ${optim} ${add_keys} >& ${LOG_DIR}/configure_${module}.log ######################################################### # echo possible errors