From 2ff70a76a360225e52c70e9b68ab8e1533ea1a98 Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 30 Nov 2005 16:38:39 +0000 Subject: [PATCH] suppress check on OMNIORBDIR variable. --- scripts/hxx2salome | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) 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 # -- 2.39.2