From fa88bb0bdea60adadf8098ce5c09fc0b66c55e9a Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 16 May 2008 05:15:52 +0000 Subject: [PATCH] Improve 'single dir' mode: call modify_la_files procedure only once to improve performance --- config_files/CALCULATOR_BIN.sh | 15 +++--- config_files/CALCULATOR_SRC.sh | 13 +++-- config_files/COMPONENT_BIN.sh | 15 +++--- config_files/COMPONENT_SRC.sh | 13 +++-- config_files/DOCUMENTATION.sh | 7 +-- config_files/GEOM_BIN.sh | 15 +++--- config_files/GEOM_SRC.sh | 13 +++-- config_files/GHS3DPLUGIN_BIN.sh | 15 +++--- config_files/GHS3DPLUGIN_SRC.sh | 13 +++-- config_files/GUI_BIN.sh | 15 +++--- config_files/GUI_SRC.sh | 13 +++-- config_files/HELLO_BIN.sh | 15 +++--- config_files/HELLO_SRC.sh | 13 +++-- config_files/HXX2SALOME.sh | 9 ++-- config_files/HXX2SALOMEDOC.sh | 7 +-- config_files/KERNEL_BIN.sh | 15 +++--- config_files/KERNEL_SRC.sh | 13 +++-- config_files/LIGHT_BIN.sh | 15 +++--- config_files/LIGHT_SRC.sh | 13 +++-- config_files/MEDWOGUI_BIN.sh | 15 +++--- config_files/MEDWOGUI_SRC.sh | 13 +++-- config_files/MED_BIN.sh | 15 +++--- config_files/MED_SRC.sh | 13 +++-- config_files/NETGENPLUGIN_BIN.sh | 15 +++--- config_files/NETGENPLUGIN_SRC.sh | 13 +++-- config_files/PYCALCULATOR_BIN.sh | 15 +++--- config_files/PYCALCULATOR_SRC.sh | 13 +++-- config_files/PYHELLO_BIN.sh | 15 +++--- config_files/PYHELLO_SRC.sh | 13 +++-- config_files/RANDOMIZER_BIN.sh | 15 +++--- config_files/RANDOMIZER_SRC.sh | 13 +++-- config_files/SAMPLES.sh | 9 ++-- config_files/SIERPINSKY_BIN.sh | 15 +++--- config_files/SIERPINSKY_SRC.sh | 13 +++-- config_files/SMESH_BIN.sh | 15 +++--- config_files/SMESH_SRC.sh | 13 +++-- config_files/SUPERV_BIN.sh | 15 +++--- config_files/SUPERV_SRC.sh | 13 +++-- config_files/VISU_BIN.sh | 15 +++--- config_files/VISU_SRC.sh | 13 +++-- config_files/common.sh | 93 +++++++++++++++++++++++++++----- config_files/modify_la_files.sh | 26 +++++++++ 42 files changed, 356 insertions(+), 299 deletions(-) create mode 100755 config_files/modify_la_files.sh diff --git a/config_files/CALCULATOR_BIN.sh b/config_files/CALCULATOR_BIN.sh index f5368f7..d1584a9 100755 --- a/config_files/CALCULATOR_BIN.sh +++ b/config_files/CALCULATOR_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${CALCULATOR_ROOT_DIR}" ]; then check_lib_version VERSION ${CALCULATOR_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${CALCULATOR_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,11 +106,11 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/CALCULATORbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/CALCULATORbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export CALCULATOR_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi cd ${PRODUCT_DIR}/bin/salome sed -e "s%export KERNEL_ROOT_DIR=.*%export KERNEL_ROOT_DIR=${KERNEL_ROOT_DIR}%g" runAppli > _runAppli @@ -123,6 +121,8 @@ chmod a+x runAppli print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -131,11 +131,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=CALCULATOR_${VERSION} + export PRODUCT=CALCULATOR_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/CALCULATOR_SRC.sh b/config_files/CALCULATOR_SRC.sh index 95100d1..5af0a0f 100755 --- a/config_files/CALCULATOR_SRC.sh +++ b/config_files/CALCULATOR_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${CALCULATOR_SRC_DIR}" ]; then if [ -f ${CALCULATOR_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${CALCULATOR_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/CALCULATORsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/CALCULATORsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/CALCULATOR_${VERSION} +mkdir -p ${INSTALL_ROOT}/CALCULATOR_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="CALCULATORsrc" ; fi -export PRODUCT="CALCULATOR_SRC_${VERSION}" +export PRODUCT="CALCULATOR_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/COMPONENT_BIN.sh b/config_files/COMPONENT_BIN.sh index 587a085..76b80c8 100755 --- a/config_files/COMPONENT_BIN.sh +++ b/config_files/COMPONENT_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${COMPONENT_ROOT_DIR}" ]; then check_lib_version VERSION ${COMPONENT_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${COMPONENT_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,15 +106,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/COMPONENTbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/COMPONENTbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export COMPONENT_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -125,11 +125,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=COMPONENT_${VERSION} + export PRODUCT=COMPONENT_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/COMPONENT_SRC.sh b/config_files/COMPONENT_SRC.sh index 65552af..6491b16 100755 --- a/config_files/COMPONENT_SRC.sh +++ b/config_files/COMPONENT_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${COMPONENT_SRC_DIR}" ]; then if [ -f ${COMPONENT_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${COMPONENT_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/COMPONENTsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/COMPONENTsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/COMPONENT_${VERSION} +mkdir -p ${INSTALL_ROOT}/COMPONENT_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="COMPONENTsrc" ; fi -export PRODUCT="COMPONENT_SRC_${VERSION}" +export PRODUCT="COMPONENT_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/DOCUMENTATION.sh b/config_files/DOCUMENTATION.sh index f5c2a19..38481c8 100755 --- a/config_files/DOCUMENTATION.sh +++ b/config_files/DOCUMENTATION.sh @@ -42,7 +42,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/DOCUMENTATION-V3.2.10.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/DOCUMENTATION-V${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -53,14 +53,15 @@ echo "Can't install binaries for ${PRODUCT}" return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="DOCUMENTATION" ; fi -export PRODUCT="DOCUMENTATION_${VERSION}" +export PRODUCT="DOCUMENTATION_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/GEOM_BIN.sh b/config_files/GEOM_BIN.sh index 906064f..f8935d5 100755 --- a/config_files/GEOM_BIN.sh +++ b/config_files/GEOM_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${GEOM_ROOT_DIR}" ]; then check_lib_version VERSION ${GEOM_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${GEOM_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,15 +106,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/GEOMbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/GEOMbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export GEOM_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -125,11 +125,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=GEOM_${VERSION} + export PRODUCT=GEOM_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/GEOM_SRC.sh b/config_files/GEOM_SRC.sh index 4be464d..5a81a07 100755 --- a/config_files/GEOM_SRC.sh +++ b/config_files/GEOM_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${GEOM_SRC_DIR}" ]; then if [ -f ${GEOM_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${GEOM_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/GEOMsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/GEOMsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/GEOM_${VERSION} +mkdir -p ${INSTALL_ROOT}/GEOM_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="GEOMsrc" ; fi -export PRODUCT="GEOM_SRC_${VERSION}" +export PRODUCT="GEOM_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/GHS3DPLUGIN_BIN.sh b/config_files/GHS3DPLUGIN_BIN.sh index e34ea47..c922d90 100755 --- a/config_files/GHS3DPLUGIN_BIN.sh +++ b/config_files/GHS3DPLUGIN_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${GHS3DPLUGIN_ROOT_DIR}" ]; then check_lib_version VERSION ${GHS3DPLUGIN_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${GHS3DPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -106,15 +104,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export GHS3DPLUGIN_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -123,11 +123,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=GHS3DPLUGIN_${VERSION} + export PRODUCT=GHS3DPLUGIN_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/GHS3DPLUGIN_SRC.sh b/config_files/GHS3DPLUGIN_SRC.sh index 8d73644..e21ca7d 100755 --- a/config_files/GHS3DPLUGIN_SRC.sh +++ b/config_files/GHS3DPLUGIN_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${GHS3DPLUGIN_SRC_DIR}" ]; then if [ -f ${GHS3DPLUGIN_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${GHS3DPLUGIN_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/GHS3DPLUGIN_${VERSION} +mkdir -p ${INSTALL_ROOT}/GHS3DPLUGIN_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="GHS3DPLUGINsrc" ; fi -export PRODUCT="GHS3DPLUGIN_SRC_${VERSION}" +export PRODUCT="GHS3DPLUGIN_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/GUI_BIN.sh b/config_files/GUI_BIN.sh index 677699e..161f4b3 100755 --- a/config_files/GUI_BIN.sh +++ b/config_files/GUI_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${GUI_ROOT_DIR}" ]; then check_lib_version VERSION ${GUI_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${GUI_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,15 +106,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/GUIbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/GUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export GUI_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -125,11 +125,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=GUI_${VERSION} + export PRODUCT=GUI_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/GUI_SRC.sh b/config_files/GUI_SRC.sh index 6cf033d..872a114 100755 --- a/config_files/GUI_SRC.sh +++ b/config_files/GUI_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${GUI_SRC_DIR}" ]; then if [ -f ${GUI_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${GUI_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/GUIsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/GUIsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/GUI_${VERSION} +mkdir -p ${INSTALL_ROOT}/GUI_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="GUIsrc" ; fi -export PRODUCT="GUI_SRC_${VERSION}" +export PRODUCT="GUI_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/HELLO_BIN.sh b/config_files/HELLO_BIN.sh index 4ce4dd4..147d38b 100755 --- a/config_files/HELLO_BIN.sh +++ b/config_files/HELLO_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${HELLO_ROOT_DIR}" ]; then check_lib_version VERSION ${HELLO_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${HELLO_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,11 +106,11 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/HELLObinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/HELLObinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export HELLO_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi cd ${PRODUCT_DIR}/bin/salome sed -e "s%export KERNEL_ROOT_DIR=.*%export KERNEL_ROOT_DIR=${KERNEL_ROOT_DIR}%g" runAppli > _runAppli @@ -123,6 +121,8 @@ chmod a+x runAppli print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -131,11 +131,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=HELLO_${VERSION} + export PRODUCT=HELLO_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/HELLO_SRC.sh b/config_files/HELLO_SRC.sh index f99e28a..fd1c364 100755 --- a/config_files/HELLO_SRC.sh +++ b/config_files/HELLO_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${HELLO_SRC_DIR}" ]; then if [ -f ${HELLO_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${HELLO_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/HELLOsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/HELLOsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/HELLO_${VERSION} +mkdir -p ${INSTALL_ROOT}/HELLO_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="HELLOsrc" ; fi -export PRODUCT="HELLO_SRC_${VERSION}" +export PRODUCT="HELLO_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/HXX2SALOME.sh b/config_files/HXX2SALOME.sh index 198d30b..3f0643f 100755 --- a/config_files/HXX2SALOME.sh +++ b/config_files/HXX2SALOME.sh @@ -56,7 +56,7 @@ source ${INSTALL_WORK}/$SHRC makedir ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/HXX2SALOMEsourcesV3.2.10.tar.gz -C ${INSTALL_WORK} +check_jb tar xfz ${SOURCE_DIR}/HXX2SALOMEsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_WORK} cd ${PRODUCT_WORK} cat >> ${PRODUCT_DIR}/CONFIGURE.LOG < _runAppli @@ -120,6 +118,8 @@ chmod a+x runAppli print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -128,11 +128,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=PYHELLO_${VERSION} + export PRODUCT=PYHELLO_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/PYHELLO_SRC.sh b/config_files/PYHELLO_SRC.sh index e88862a..d924b04 100755 --- a/config_files/PYHELLO_SRC.sh +++ b/config_files/PYHELLO_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${PYHELLO_SRC_DIR}" ]; then if [ -f ${PYHELLO_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${PYHELLO_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/PYHELLOsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/PYHELLOsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/PYHELLO_${VERSION} +mkdir -p ${INSTALL_ROOT}/PYHELLO_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="PYHELLOsrc" ; fi -export PRODUCT="PYHELLO_SRC_${VERSION}" +export PRODUCT="PYHELLO_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/RANDOMIZER_BIN.sh b/config_files/RANDOMIZER_BIN.sh index e12b968..3867c44 100755 --- a/config_files/RANDOMIZER_BIN.sh +++ b/config_files/RANDOMIZER_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${RANDOMIZER_ROOT_DIR}" ]; then check_lib_version VERSION ${RANDOMIZER_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -106,15 +104,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/RANDOMIZERbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/RANDOMIZERbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export RANDOMIZER_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -123,11 +123,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=RANDOMIZER_${VERSION} + export PRODUCT=RANDOMIZER_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/RANDOMIZER_SRC.sh b/config_files/RANDOMIZER_SRC.sh index 9d75ab3..91742c6 100755 --- a/config_files/RANDOMIZER_SRC.sh +++ b/config_files/RANDOMIZER_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${RANDOMIZER_SRC_DIR}" ]; then if [ -f ${RANDOMIZER_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${RANDOMIZER_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/RANDOMIZERsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/RANDOMIZERsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/RANDOMIZER_${VERSION} +mkdir -p ${INSTALL_ROOT}/RANDOMIZER_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="RANDOMIZERsrc" ; fi -export PRODUCT="RANDOMIZER_SRC_${VERSION}" +export PRODUCT="RANDOMIZER_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/SAMPLES.sh b/config_files/SAMPLES.sh index 3d2d731..63f8bf9 100755 --- a/config_files/SAMPLES.sh +++ b/config_files/SAMPLES.sh @@ -12,8 +12,6 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ # There is no possibility to check version number return 0 @@ -54,7 +52,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/SAMPLESsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/SAMPLESsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -69,14 +67,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="SAMPLES" ; fi -export PRODUCT="SAMPLES_SRC_${VERSION}" +export PRODUCT="SAMPLES_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/SIERPINSKY_BIN.sh b/config_files/SIERPINSKY_BIN.sh index 48e7154..9e96067 100755 --- a/config_files/SIERPINSKY_BIN.sh +++ b/config_files/SIERPINSKY_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${SIERPINSKY_ROOT_DIR}" ]; then check_lib_version VERSION ${SIERPINSKY_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${SIERPINSKY_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -106,15 +104,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/SIERPINSKYbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/SIERPINSKYbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export SIERPINSKY_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -123,11 +123,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=SIERPINSKY_${VERSION} + export PRODUCT=SIERPINSKY_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/SIERPINSKY_SRC.sh b/config_files/SIERPINSKY_SRC.sh index 73a849a..eb9bc0d 100755 --- a/config_files/SIERPINSKY_SRC.sh +++ b/config_files/SIERPINSKY_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${SIERPINSKY_SRC_DIR}" ]; then if [ -f ${SIERPINSKY_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${SIERPINSKY_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/SIERPINSKYsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/SIERPINSKYsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/SIERPINSKY_${VERSION} +mkdir -p ${INSTALL_ROOT}/SIERPINSKY_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="SIERPINSKYsrc" ; fi -export PRODUCT="SIERPINSKY_SRC_${VERSION}" +export PRODUCT="SIERPINSKY_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/SMESH_BIN.sh b/config_files/SMESH_BIN.sh index 930fb51..58ac217 100755 --- a/config_files/SMESH_BIN.sh +++ b/config_files/SMESH_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${SMESH_ROOT_DIR}" ]; then check_lib_version VERSION ${SMESH_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${SMESH_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,15 +106,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/SMESHbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/SMESHbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export SMESH_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -125,11 +125,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=SMESH_${VERSION} + export PRODUCT=SMESH_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/SMESH_SRC.sh b/config_files/SMESH_SRC.sh index a8a0f81..ee5b4ab 100755 --- a/config_files/SMESH_SRC.sh +++ b/config_files/SMESH_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${SMESH_SRC_DIR}" ]; then if [ -f ${SMESH_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${SMESH_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/SMESHsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/SMESHsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/SMESH_${VERSION} +mkdir -p ${INSTALL_ROOT}/SMESH_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="SMESHsrc" ; fi -export PRODUCT="SMESH_SRC_${VERSION}" +export PRODUCT="SMESH_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/SUPERV_BIN.sh b/config_files/SUPERV_BIN.sh index 2f8d696..4c8fa5a 100755 --- a/config_files/SUPERV_BIN.sh +++ b/config_files/SUPERV_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${SUPERV_ROOT_DIR=}" ]; then check_lib_version VERSION ${SUPERV_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${SUPERV_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,15 +106,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/SUPERVbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/SUPERVbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export SUPERV_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -125,11 +125,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=SUPERV_${VERSION} + export PRODUCT=SUPERV_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/SUPERV_SRC.sh b/config_files/SUPERV_SRC.sh index f91f340..d012421 100755 --- a/config_files/SUPERV_SRC.sh +++ b/config_files/SUPERV_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${SUPERV_SRC_DIR}" ]; then if [ -f ${SUPERV_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${SUPERV_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/SUPERVsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/SUPERVsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/SUPERV_${VERSION} +mkdir -p ${INSTALL_ROOT}/SUPERV_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="SUPERVsrc" ; fi -export PRODUCT="SUPERV_SRC_${VERSION}" +export PRODUCT="SUPERV_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/VISU_BIN.sh b/config_files/VISU_BIN.sh index 6b87f10..0d0b81f 100755 --- a/config_files/VISU_BIN.sh +++ b/config_files/VISU_BIN.sh @@ -12,14 +12,12 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${VISU_ROOT_DIR}" ]; then check_lib_version VERSION ${VISU_ROOT_DIR}/bin/salome if [ "$?" -eq "0" ]; then ver=`cat ${VISU_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -108,15 +106,17 @@ source ${INSTALL_WORK}/$SHRC # create a module directory mkdir -p ${PRODUCT_DIR} -check_jb tar xfz ${SOURCE_DIR}/VISUbinariesV${VERSION}.tar.gz -C ${PRODUCT_DIR} +check_jb tar xfz ${SOURCE_DIR}/VISUbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR} # modify all *.la files export VISU_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR} +if [ "$SINGLE_DIR" != "1" ] ; then modif_la_files ${PRODUCT_DIR} ; fi print_env } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; @@ -125,11 +125,10 @@ export PRODUCT_SEQUENCE=$5; export PRODUCT_TYPE=$6; SINGLE_DIR=$7 if [ "$SINGLE_DIR" == "1" ] ; then - export PRODUCT=SALOME_${VERSION} + export PRODUCT=SALOME_${SALOME_VERSION} else - export PRODUCT=VISU_${VERSION} + export PRODUCT=VISU_${SALOME_VERSION} fi export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/VISU_SRC.sh b/config_files/VISU_SRC.sh index 4bf8065..1ee77fb 100755 --- a/config_files/VISU_SRC.sh +++ b/config_files/VISU_SRC.sh @@ -12,13 +12,11 @@ # #################################################################################### -VERSION="3.2.10" - check_version(){ if [ -n "${VISU_SRC_DIR}" ]; then if [ -f ${VISU_SRC_DIR}/configure.in.base ]; then ver=`grep -E "^VERSION=" ${VISU_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` - if [ "$ver" = "${VERSION}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi @@ -62,7 +60,7 @@ install_source() make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} source ${INSTALL_WORK}/$SHRC -check_jb tar xfz ${SOURCE_DIR}/VISUsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT} +check_jb tar xfz ${SOURCE_DIR}/VISUsourcesV${SALOME_VERSION}.tar.gz -C ${INSTALL_ROOT} print_env } @@ -74,7 +72,7 @@ install_source # build sources prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"` -mkdir -p ${INSTALL_ROOT}/VISU_${VERSION} +mkdir -p ${INSTALL_ROOT}/VISU_${SALOME_VERSION} if [ -e ./build.sh ] ; then cp -f ./build.sh ${INSTALL_ROOT} @@ -94,14 +92,15 @@ install_binary() return 1 } +source ./common.sh + export PROCEDURE=$1; export INSTALL_WORK=$2; export SOURCE_DIR=$3; export INSTALL_ROOT=$4; export PRODUCT_SEQUENCE=$5; if [ $# -gt 5 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="VISUsrc" ; fi -export PRODUCT="VISU_SRC_${VERSION}" +export PRODUCT="VISU_SRC_${SALOME_VERSION}" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh $PROCEDURE diff --git a/config_files/common.sh b/config_files/common.sh index 5867ac0..60f352b 100755 --- a/config_files/common.sh +++ b/config_files/common.sh @@ -17,6 +17,11 @@ export SDIR_DELIM="### to be removed ###" export SHRC="salome.sh" export CSHRC="salome.csh" +##################################################### +# !WARNING! This is current SALOME version number +#################################################### +export SALOME_VERSION="3.2.10" + #this function takes several parameters #first parameter contains descriptor of output file #next parameters is command for execution @@ -608,7 +613,8 @@ if [ -z "$ldir" ] || [ ! -d "$ldir" ]; then return 1; fi srcdir=`pwd` -SALOME_MODULES="`env | awk -F_ '/[[:alnum:]]*_ROOT_DIR/ { print $1 }'`" +#SALOME_MODULES="`env | awk -F_ '/[[:alnum:]]*_ROOT_DIR/ { print $1 }'`" +SALOME_MODULES="`env | awk -F_ '/[a-zA-Z0-9]*_ROOT_DIR/ { print $1 }' | grep -v -E '^SALOME$'`" cd $ldir ldir=`pwd` @@ -620,14 +626,23 @@ if [ "$l" != "X" ] ; then l=`basename $l` cd $ldir; cd $d # 1. process salome modules dependencies + for mod in $SALOME_MODULES; do moddir=`printenv ${mod}_ROOT_DIR` if [ -n "${moddir}" ] ; then #echo $l $mod $moddir - sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/lib% \1${moddir}/lib%g" $l > $l"_" +# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/\(lib\|lib64\)% \1${moddir}/${myldir}%g" $l > $l"_" +# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/lib% \1${moddir}/lib%g" $l > $l"_" + sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/lib% \1${moddir}/lib%g" \ + -e "s%^libdir='[^[:space:]]*${mod}[^[:space:]]*/\(lib.*\)'%libdir='${moddir}/\1'%g" $l > $l"_" mv -f $l"_" $l +# for mod1 in $SALOME_MODULES; do +# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod1}[^[:space:]]*/${mod1}_build%%g" $l > $l"_" +# mv -f $l"_" $l +# done fi done + # 2. process CAS.CADE dependencies casdir=`printenv CASROOT`/lib if [ ! -d ${casdir} ] ; then casdir=`printenv CASROOT`/Linux/lib ; fi @@ -644,18 +659,25 @@ if [ "$l" != "X" ] ; then if [ ! -d ${omnidir} ] ; then omnidir=`printenv OMNIORBDIR`/lib ; fi if [ -n "${OMNIORBDIR}" ] && [ -d "${omnidir}" ] ; then # echo $l $OMNIORBDIR $omnidir - sed -e "s%-L[^[:space:]]*omni[^[:space:]]*%-L${omnidir}%g" $l > $l"_" + sed -e "s%-L[^[:space:]]*omni[^[:space:]]*%-L${omnidir}%g" \ + -e "s%-R[^[:space:]]*omni[^[:space:]]*%-R${omnidir}%g" $l > $l"_" mv -f $l"_" $l fi # 4. process VTK dependencies - if test `uname -m` = "x86_64" ; then - vtkdir=`printenv VTKHOME`/lib64/vtk + vtkpath=`printenv VTKHOME` + if [ `uname -m` = "x86_64" ] && [ -d ${vtkpath}/lib64 ] ; then + LIB_PREFIX=64 + elif [ -d ${vtkpath}/lib ] ; then + LIB_PREFIX="" else - vtkdir=`printenv VTKHOME`/lib/vtk + LIB_PREFIX=64 fi - if [ -n "${VTKHOME}" ] && [ -d "${vtkdir}" ] ; then + vtkldir=${vtkpath}/lib${LIB_PREFIX} + vtkdir=${vtkldir}/vtk + if [ -n "${VTKHOME}" ] && [ -d "${vtkdir}" ] && [ -d "${vtkldir}" ] ; then # echo $l $VTKHOME $vtkdir - sed -e "s%-L[^[:space:]]*VTK[^[:space:]]*/\(lib\|lib64\)/vtk%-L${vtkdir}%g" $l > $l"_" + sed -e "s%-L[^[:space:]]*VTK[^[:space:]]*/\(lib\|lib64\)/vtk%-L${vtkdir}%g" \ + -e "s%-L[^[:space:]]*VTK[^[:space:]]*/\(lib\|lib64\)%-L${vtkldir}%g" $l > $l"_" mv -f $l"_" $l fi # 5. process HDF dependencies @@ -724,12 +746,55 @@ if [ "$l" != "X" ] ; then sed -e "s%-L[^[:space:]]*boost[^[:space:]]*/lib%-L${boostdir}%g" $l > $l"_" mv -f $l"_" $l fi - # 14. modify libdir - #sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/salome'%g" $l > $l"_" - mod=`basename $ldir | awk -F_ '{print $1}'` - moddir=`printenv ${mod}_ROOT_DIR` - sed -e "s%^libdir='[^[:space:]]*${mod}[^[:space:]]*/\(lib.*\)'%libdir='${moddir}/\1'%g" $l > $l"_" - mv -f $l"_" $l + + blsurfdir=`printenv BLSURFHOME`/lib + if [ -n "${blsurfdir}" ] && [ -d "${blsurfdir}" ] ; then + # echo $l $BOOSTDIR $boostdir + sed -e "s%-L[^[:space:]]*blsurf[^[:space:]]*/lib%-L${blsurfdir}%g" $l > $l"_" + mv -f $l"_" $l + fi + +# # 14. modify libdir +# #sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/salome'%g" $l > $l"_" +# mod=`basename $ldir | awk -F_ '{print $1}'` +# moddir=`printenv ${mod}_ROOT_DIR` +# sed -e "s%^libdir='[^[:space:]]*${mod}[^[:space:]]*/\(lib.*\)'%libdir='${moddir}/\1'%g" $l > $l"_" +# mv -f $l"_" $l + + # 15. process libxml dependencies +# libxmldir=`printenv LIBXML_DIR`/lib +# if [ ! -d ${libxmldir} ] ; then libxmldir=`printenv LIBXML_DIR`/lib ; fi +# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*libxml2-[0-9]\.[0-9]\.[0-9][0-9]/lib% \1${libxmldir}%g" $l > $l"_" +# mv -f $l"_" $l + + # 16. process metis dependencies +# metisdir=`printenv METISDIR` +# if [ ! -d ${metisdir} ] ; then metisdir=`printenv METISDIR` ; fi +# sed -e "s%-L[^[:space:]]*metis[^[:space:]]*%-L${metisdir}%g" $l > $l"_" +# mv -f $l"_" $l + + # 17. process scotch dependencies +# scotchdir=`printenv SCOTCHDIR`/bin +# if [ ! -d ${scotchdir} ] ; then scotchdir=`printenv SCOTCHDIR`/bin ; fi +# sed -e "s%-L[^[:space:]]*scotch[^[:space:]]*/bin%-L${scotchdir}%g" $l > $l"_" +# mv -f $l"_" $l + + # 18. process libGL.la dependencies + if test `uname -m` = "x86_64" ; then + libGLpath=/usr/lib64/libGL.la + else + libGLpath=/usr/lib/libGL.la + fi + sed -e "s%$libGLpath%""%g" $l > $l"_" + mv -f $l"_" $l + + # 19. process graphviz dependencies + graphvizdir=`printenv GRAPHVIZHOME`/lib + if [ ! -d ${graphvizdir} ] ; then graphvizdir=`printenv GRAPHVIZHOME`/lib ; fi + sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*graphviz-[0-9]\.[0-9]\+\.[0-9]/lib% \1${graphvizdir}%g" $l > $l"_" + chmod -f --reference=$l $l"_" + mv -f $l"_" $l + fi done diff --git a/config_files/modify_la_files.sh b/config_files/modify_la_files.sh new file mode 100755 index 0000000..42ac43b --- /dev/null +++ b/config_files/modify_la_files.sh @@ -0,0 +1,26 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : modify_la_files.sh +# Created : Thu May 15 20:11:34 2008 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2008 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +source ./common.sh + +export INSTALL_WORK=$1; +export INSTALL_ROOT=$2 +export PRODUCT_SEQUENCE=$3; +export PRODUCT_DIR=${INSTALL_ROOT}/SALOME_${SALOME_VERSION} + +### call functions from common.sh + +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" +source ${INSTALL_WORK}/$SHRC +modif_la_files ${PRODUCT_DIR} -- 2.39.2