diff --git a/Pmodules/modbuild b/Pmodules/modbuild index ef25b48..260c372 100755 --- a/Pmodules/modbuild +++ b/Pmodules/modbuild @@ -267,16 +267,8 @@ fi [[ -n ${BUILD_BLOCK} ]] || std::die 1 "No build-block specified!" [[ -r ${BUILD_BLOCK} ]] || std::die 1 "${BUILD_BLOCK}: no such file!" -# :FIXME: move to library? -# :FIXME: implement this with OS/system dependend plugins - declare -r OS -case ${OS} in -Darwin ) - declare -x MACOSX_DEPLOYMENT_TARGET='10.9' - #declare -rx SDKROOT='macosx10.9' - ;; -esac + # source Pmodule environment configuration if [[ "${bootstrap}" == "yes" ]]; then @@ -285,10 +277,16 @@ if [[ "${bootstrap}" == "yes" ]]; then source "${BUILD_BLOCK_DIR}/../config/${pmodule_environment}" declare -r BUILD_BASEDIR=$(std::get_abspath "${BUILD_BLOCK_DIR}/..") + if [[ -r "${BUILD_BLOCK_DIR}/../config/modbuild.conf" ]]; then + source "${BUILD_BLOCK_DIR}/../config/modbuild.conf" + fi elif [[ -n ${PMODULES_ROOT} ]] && [[ -n ${PMODULES_CONFIG_DIR} ]] && \ [[ -r ${PMODULES_ROOT}/${PMODULES_CONFIG_DIR}/${pmodule_environment} ]]; then source ${PMODULES_ROOT}/${PMODULES_CONFIG_DIR}/${pmodule_environment} declare -r BUILD_BASEDIR=$(std::get_abspath "${BUILD_BLOCK_DIR}/../..") + if [[ -r "${PMODULES_ROOT}/config/modbuild.conf" ]]; then + source "${PMODULES_ROOT}/config/modbuild.conf" + fi else std::die 3 "Build environment not setup properbly!" diff --git a/config/modbuild.conf b/config/modbuild.conf new file mode 100644 index 0000000..7a25d05 --- /dev/null +++ b/config/modbuild.conf @@ -0,0 +1,9 @@ +#!/bin/bash + +case ${OS} in +Darwin ) + declare -x MACOSX_DEPLOYMENT_TARGET='10.12' + #declare -rx SDKROOT='macosx10.9' + ;; +esac + diff --git a/install_pmodules.sh b/install_pmodules.sh index 33d4d7d..665117d 100755 --- a/install_pmodules.sh +++ b/install_pmodules.sh @@ -106,6 +106,10 @@ if [[ ! -e "${PMODULES_ROOT}/${PMODULES_CONFIG_DIR}/profile.bash" ]]; then install -m 0755 "${SRC_DIR}/profile.bash" "${PMODULES_ROOT}/${PMODULES_CONFIG_DIR}/profile.bash" fi +if [[ ! -e "${PMODULES_ROOT}/${PMODULES_CONFIG_DIR}/modbuild.conf" ]]; then + install -m 0755 "${BOOTSTRAP_DIR}/config/modbuild.conf" "${PMODULES_ROOT}/${PMODULES_CONFIG_DIR}/modbuild.conf" +fi + mkdir -p "${PMODULES_ROOT}/Tools/modulefiles" mkdir -p "${PMODULES_ROOT}/Libraries/modulefiles"