From: crouzet Date: Wed, 30 Nov 2005 16:38:39 +0000 (+0000) Subject: suppress check on OMNIORBDIR variable. X-Git-Tag: V2_2_6~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2ff70a76a360225e52c70e9b68ab8e1533ea1a98;p=tools%2Fhxx2salome.git suppress check on OMNIORBDIR variable. --- diff --git a/scripts/hxx2salome b/scripts/hxx2salome index 1e3575c..c343ee0 100755 --- a/scripts/hxx2salome +++ b/scripts/hxx2salome @@ -28,7 +28,9 @@ usage() echo -e " of the Salome component\n" echo -e "\n Options :" echo -e " -h : help" - echo -e " -e environment_script : to specify the name of a environment file that will be source for compiling" + echo -e " -e environment_script : to specify the name of a environment file that will be updated with new necessary commands" + echo -e " (this file is also used for sourcing environment before compilation if it has sh or bash syntax," + echo -e " if the syntax is csh, it is not sourced and for compiling (-c option) environment must be set up before)" echo -e " -s script_extension : to use if your environment file name doesn't have extension" echo -e " -c : to compile after generation" echo -e " (use this option only if you don't have dependencies in your header or libraries" @@ -442,25 +444,26 @@ then esac fi -if [ ${KERNEL_ROOT_DIR} ] && [ -d ${KERNEL_ROOT_DIR} ] && [ ${OMNIORBDIR} ] && [ -d ${OMNIORBDIR} ] +# Environment policy : +# - an existing sh file was specified : we source environment file +# - else (no file or csh syntax) : we don't source environment file, and do compile +# only if KERNEL_ROOT_DIR and MED_ROOT_DIR are defined +if [ "${SHELL_EXT}" == "sh" ] && [ ${ENVIRON_FILE} ] && [ -f ${ENVIRON_FILE} ] then - # if KERNEL_ROOT_DIR ans OMNIORBDIR are defined, we consider that environment is set - echo -e "\n Environment already set" + echo -e "\n Environment file with sh syntax specified => we source ${ENVIRON_FILE}" + source ${ENVIRON_FILE} else - # if KERNEL_ROOT_DIR is not defined : - # - sh file : we source environment file - # - csh file : we do not compile - if [ "${SHELL_EXT}" == "sh" ] && [ ${ENVIRON_FILE} ] && [ -f ${ENVIRON_FILE} ] - then - echo -e "\n Environment not set : source ${ENVIRON_FILE}" - source ${ENVIRON_FILE} - else + if [ ${KERNEL_ROOT_DIR} ] && [ -d ${KERNEL_ROOT_DIR} ] && [ ${MED_ROOT_DIR} ] && [ -d ${MED_ROOT_DIR} ] + then + # if KERNEL_ROOT_DIR and MED_ROOT_DIR are defined, we consider that environment is set + echo -e "\n Environment already set (KERNEL_ROOT_DIR and MED_ROOT_DIR are defined)" + else if [ $do_compile -eq 1 ] then - echo -e "\n Warning - Cannot compile : Environment shoud be set up for compiling!\n" - do_compile=0 + echo -e "\n Warning - Cannot compile : Environment shoud be set up before, or specify a environment file with sh syntax!\n" + do_compile=0 fi - fi + fi fi #