diff --git a/lib/libem.bash b/lib/libem.bash index c417f8e..0e818cb 100644 --- a/lib/libem.bash +++ b/lib/libem.bash @@ -123,20 +123,20 @@ while (( $# > 0 )); do shift done -declare -rx EM_BASEDIR=$(abspath $SHLIBDIR/..) +declare -rx BUILD_BASEDIR=$(abspath $SHLIBDIR/..) -source "${EM_BASEDIR}/config/environment.bash" +source "${BUILD_BASEDIR}/config/environment.bash" -declare -xr EM_CONFIGDIR="${EM_BASEDIR}/config" -declare -xr EM_SCRIPTDIR="${EM_BASEDIR}/scripts" -declare -xr EM_TMPDIR="${EM_BASEDIR}/tmp" -declare -rx EM_DOWNLOADDIR="${EM_BASEDIR}/Downloads" -declare -xr EM_DEFAULT_VERSIONSFILE="${EM_CONFIGDIR}/versions.conf" +declare -xr BUILD_CONFIGDIR="${BUILD_BASEDIR}/config" +declare -xr BUILD_SCRIPTSDIR="${BUILD_BASEDIR}/scripts" +declare -xr BUILD_TMPDIR="${BUILD_BASEDIR}/tmp" +declare -xr BUILD_DOWNLOADSDIR="${BUILD_BASEDIR}/Downloads" +declare -xr BUILD_VERSIONSFILE="${BUILD_CONFIGDIR}/versions.conf" -if [[ -z "${EM_CONFIGDIR}/families.d/"*.conf ]]; then - die 1 "Default family configuration not set in ${EM_CONFIGDIR}/families.d" +if [[ -z "${BUILD_CONFIGDIR}/families.d/"*.conf ]]; then + die 1 "Default family configuration not set in ${BUILD_CONFIGDIR}/families.d" fi -for f in "${EM_CONFIGDIR}/families.d/"*.conf; do +for f in "${BUILD_CONFIGDIR}/families.d/"*.conf; do source "${f}" done @@ -146,16 +146,17 @@ eval "${ENVIRONMENT_ARGS}" declare -x PREFIX='' declare -x DOCDIR='' -declare -x EM_FAMILY='' -declare -x EM_RELEASE='stable' -declare -x EM_MODULENAME='' +declare -x MODULE_FAMILY='' +declare -x MODULE_RELEASE='stable' +declare -x MODULE_NAME='' # these directories are module dependend -declare -x EM_SRCDIR='' -declare -x EM_BUILDDIR='' +declare -x MODULE_SRCDIR='' +declare -x MODULE_BUILDDIR='' -declare -x EM_BUILD_DEPENDENCIES +declare -x MODULE_BUILD_DEPENDENCIES +declare -x MODULE_DEPENDENCIES declare -x C_INCLUDE_PATH declare -x CPLUS_INCLUDE_PATH @@ -176,7 +177,7 @@ fi function em.release() { case $1 in unstable | stable | obsolete ) - EM_RELEASE="$1" + MODULE_RELEASE="$1" ;; * ) die 1 "$P: unknown release type: $1" @@ -198,27 +199,27 @@ function em.add_to_family() { if [[ ! -d ${EM_ETCDIR}/${1} ]]; then die 43 "${1}: family does not exist." fi - EM_FAMILY=$1 + MODULE_FAMILY=$1 } function em.set_build_dependencies() { - EM_BUILD_DEPENDENCIES=("$@") + MODULE_BUILD_DEPENDENCIES=("$@") } function em.set_runtime_dependencies() { - EM_DEPENDENCIES=("$@") + MODULE_DEPENDENCIES=("$@") } function em.set_supported_compilers() { - EM_SUPPORTED_COMPILERS=("$@") + MODULE_SUPPORTED_COMPILERS=("$@") } function em.set_docfiles() { - EM_DOCFILES=("$@") + MODULE_DOCFILES=("$@") } function _load_build_dependencies() { - for m in "${EM_BUILD_DEPENDENCIES[@]}"; do + for m in "${MODULE_BUILD_DEPENDENCIES[@]}"; do [[ -z $m ]] && continue if [[ ! $m =~ "*/*" ]]; then local _V=$(echo -n $m | tr [:lower:] [:upper:] )_VERSION @@ -230,7 +231,7 @@ function _load_build_dependencies() { fi if [[ -z $(module avail "$m" 2>&1) ]]; then echo "$m: info: module does not exist, trying to build it..." - "${EM_SCRIPTDIR}/${m/\/*}.build" ${ARGS[@]} + "${BUILD_SCRIPTSDIR}/${m/\/*}.build" ${ARGS[@]} if [[ -z $(module avail "$m" 2>&1) ]]; then die 1 "$m: oops: build failed..." fi @@ -246,7 +247,7 @@ function _write_runtime_dependencies() { local -r fname="${PREFIX}/.dependencies" local dep echo -n "" > "${fname}" - for dep in "${EM_DEPENDENCIES[@]}"; do + for dep in "${MODULE_DEPENDENCIES[@]}"; do [[ -z $dep ]] && continue if [[ ! $dep =~ "*/*" ]]; then local _V=$(echo -n $dep | tr [:lower:] [:upper:] )_VERSION @@ -260,7 +261,7 @@ function _write_build_dependencies() { local -r fname="${PREFIX}/.build_dependencies" local dep echo -n "" > "${fname}" - for dep in "${EM_BUILD_DEPENDENCIES[@]}"; do + for dep in "${MODULE_BUILD_DEPENDENCIES[@]}"; do [[ -z $dep ]] && continue if [[ ! $dep =~ "*/*" ]]; then local _V=$(echo -n $dep | tr [:lower:] [:upper:] )_VERSION @@ -278,7 +279,7 @@ function _setup_env() { LD_LIBRARY_PATH='' DYLD_LIBRARY_PATH='' - if [[ -z ${EM_FAMILY} ]]; then + if [[ -z ${MODULE_FAMILY} ]]; then die 1 "$P: family not set." fi @@ -288,7 +289,7 @@ function _setup_env() { [[ "${_name:0:1}" == '#' ]] && continue _NAME=$(echo ${_name} | tr [:lower:] [:upper:]) eval ${_NAME}_VERSION=$_version - done < "${EM_DEFAULT_VERSIONSFILE}" + done < "${BUILD_VERSIONSFILE}" # overwrite environment variables with values we got on the cmd line eval "${ENVIRONMENT_ARGS}" @@ -302,51 +303,51 @@ function _setup_env() { if [[ -z $V ]]; then die 1 "$P: Missing version." fi - EM_SRCDIR="${EM_TMPDIR}/src/${P/_serial}-$V" - EM_BUILDDIR="${EM_TMPDIR}/build/$P-$V/$COMPILER/$COMPILER_VERSION" + MODULE_SRCDIR="${BUILD_TMPDIR}/src/${P/_serial}-$V" + MODULE_BUILDDIR="${BUILD_TMPDIR}/build/$P-$V/$COMPILER/$COMPILER_VERSION" # build module name - case ${EM_FAMILY} in + case ${MODULE_FAMILY} in Tools ) - EM_PREFIX="${P}/${V}" - EM_MODULENAME="${P}/${V}" + MODULE_RPREFIX="${P}/${V}" + MODULE_NAME="${P}/${V}" ;; Programming ) - EM_PREFIX="${P}/${V}" - EM_MODULENAME="${P}/${V}" + MODULE_RPREFIX="${P}/${V}" + MODULE_NAME="${P}/${V}" ;; Libraries ) - EM_PREFIX="${P}/${V}" - EM_MODULENAME="${P}/${V}" + MODULE_RPREFIX="${P}/${V}" + MODULE_NAME="${P}/${V}" ;; System ) - EM_PREFIX="${P}/${V}" - EM_MODULENAME="${P}/${V}" + MODULE_RPREFIX="${P}/${V}" + MODULE_NAME="${P}/${V}" ;; Compiler ) - EM_PREFIX="${P}/${V}/${COMPILER}/${COMPILER_VERSION}" - EM_MODULENAME="${COMPILER}/${COMPILER_VERSION}/${P}/${V}" + MODULE_RPREFIX="${P}/${V}/${COMPILER}/${COMPILER_VERSION}" + MODULE_NAME="${COMPILER}/${COMPILER_VERSION}/${P}/${V}" ;; MPI ) - EM_PREFIX="${P}/${V}/${MPI}/${MPI_VERSION}/${COMPILER}/${COMPILER_VERSION}" - EM_MODULENAME="${COMPILER}/${COMPILER_VERSION}/${MPI}/${MPI_VERSION}/${P}/${V}" + MODULE_RPREFIX="${P}/${V}/${MPI}/${MPI_VERSION}/${COMPILER}/${COMPILER_VERSION}" + MODULE_NAME="${COMPILER}/${COMPILER_VERSION}/${MPI}/${MPI_VERSION}/${P}/${V}" ;; HDF5 ) - EM_PREFIX="${P}/${V}/${HDF5}/${HDF5_VERSION}/${MPI}/${MPI_VERSION}/${COMPILER}/${COMPILER_VERSION}/" - EM_MODULENAME="${COMPILER}/${COMPILER_VERSION}/${MPI}/${MPI_VERSION}/${HDF5}/${HDF5_VERSION}/${P}/${V}" + MODULE_RPREFIX="${P}/${V}/${HDF5}/${HDF5_VERSION}/${MPI}/${MPI_VERSION}/${COMPILER}/${COMPILER_VERSION}/" + MODULE_NAME="${COMPILER}/${COMPILER_VERSION}/${MPI}/${MPI_VERSION}/${HDF5}/${HDF5_VERSION}/${P}/${V}" ;; HDF5_serial ) - EM_PREFIX="${P}/${V}/hdf5_serial/${HDF5_SERIAL_VERSION}/${COMPILER}/${COMPILER_VERSION}" - EM_MODULENAME="${COMPILER}/${COMPILER_VERSION}/hdf5_serial/${HDF5_VERSION}/${P}/${V}" + MODULE_RPREFIX="${P}/${V}/hdf5_serial/${HDF5_SERIAL_VERSION}/${COMPILER}/${COMPILER_VERSION}" + MODULE_NAME="${COMPILER}/${COMPILER_VERSION}/hdf5_serial/${HDF5_VERSION}/${P}/${V}" ;; * ) - die 1 "$P: oops: unknown family: ${EM_FAMILY}" + die 1 "$P: oops: unknown family: ${MODULE_FAMILY}" ;; esac - case ${EM_RELEASE} in + case ${MODULE_RELEASE} in unstable | obsolete ) - EM_FAMILY="${EM_FAMILY}.${EM_RELEASE}" + MODULE_FAMILY="${MODULE_FAMILY}.${MODULE_RELEASE}" ;; stable ) ;; @@ -356,11 +357,11 @@ function _setup_env() { esac # set PREFIX of module - PREFIX="${EM_BINDIR}/${EM_FAMILY}/${EM_PREFIX}" + PREFIX="${EM_BINDIR}/${MODULE_FAMILY}/${MODULE_RPREFIX}" DOCDIR="${PREFIX}/share/doc/$P" - TARBALL="${EM_DOWNLOADDIR}/${P/_serial}-$V.tar" + TARBALL="${BUILD_DOWNLOADSDIR}/${P/_serial}-$V.tar" if [[ -r $TARBALL.gz ]]; then TARBALL=${TARBALL}.gz _UNTAR_FLAGS='xvzf' @@ -376,13 +377,13 @@ function _setup_env() { function _prep() { # untar sources - if [[ ! -d ${EM_SRCDIR} ]]; then - mkdir -p "${EM_TMPDIR}/src" - (cd "${EM_TMPDIR}/src" && tar ${_UNTAR_FLAGS} "${TARBALL}") + if [[ ! -d ${MODULE_SRCDIR} ]]; then + mkdir -p "${BUILD_TMPDIR}/src" + (cd "${BUILD_TMPDIR}/src" && tar ${_UNTAR_FLAGS} "${TARBALL}") fi # create build directory - mkdir -p "${EM_BUILDDIR}" + mkdir -p "${MODULE_BUILDDIR}" } @@ -391,7 +392,7 @@ function em.pre_configure() { } function em.configure() { - ${EM_SRCDIR}/configure \ + ${MODULE_SRCDIR}/configure \ --prefix="${PREFIX}" } @@ -408,27 +409,27 @@ function em.post_install() { } function em.install_doc() { - install -m0444 ${EM_DOCFILES[*]} "${BUILDSCRIPT}" "${DOCDIR}" + install -m0444 ${MODULE_DOCFILES[*]} "${BUILDSCRIPT}" "${DOCDIR}" } function _set_link() { (mkdir -p "${MODULEPATH_ROOT}" cd "${MODULEPATH_ROOT}" - local _path="${EM_FAMILY}/${EM_MODULENAME%/*}" + local _path="${MODULE_FAMILY}/${MODULE_NAME%/*}" mkdir -p "${_path}" cd "${_path}" local x IFS='/' x=(${_path}) - local -r _target="../"$(eval printf "../%.s" {1..${#x[@]}})${EM_ETCDIR##*/}/"${EM_FAMILY}/${P}/modulefile" - ln -fs "${_target}" "${EM_MODULENAME##*/}" + local -r _target="../"$(eval printf "../%.s" {1..${#x[@]}})${EM_ETCDIR##*/}/"${MODULE_FAMILY}/${P}/modulefile" + ln -fs "${_target}" "${MODULE_NAME##*/}" ) } function _cleanup_build() { ( - [[ -d /${EM_BUILDDIR} ]] || return 0 - cd "/${EM_BUILDDIR}/.."; + [[ -d /${MODULE_BUILDDIR} ]] || return 0 + cd "/${MODULE_BUILDDIR}/.."; if [[ $(pwd) != / ]]; then echo "Cleaning up $(pwd)/${COMPILER_VERSION}" rm -rf * @@ -438,18 +439,18 @@ function _cleanup_build() { function em.cleanup_src() { ( - [[ -d /${EM_SRCDIR} ]] || return 0 - cd "/${EM_SRCDIR}/.."; + [[ -d /${MODULE_SRCDIR} ]] || return 0 + cd "/${MODULE_SRCDIR}/.."; if [[ $(pwd) != / ]]; then echo "Cleaning up $(pwd)" - rm -rf ${EM_SRCDIR##*/} + rm -rf ${MODULE_SRCDIR##*/} fi ); } function _check_compiler() { - test -z ${EM_SUPPORTED_COMPILERS} && return 0 - for cc in ${EM_SUPPORTED_COMPILERS[@]}; do + test -z ${MODULE_SUPPORTED_COMPILERS} && return 0 + for cc in ${MODULE_SUPPORTED_COMPILERS[@]}; do if [[ ${COMPILER}/${COMPILER_VERSION} =~ ${cc} ]]; then return 0 fi @@ -464,14 +465,14 @@ function em.make_all() { _load_build_dependencies _check_compiler _prep - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" em.pre_configure - cd "${EM_BUILDDIR}" + cd "${MODULE_BUILDDIR}" em.configure em.build em.install em.post_install - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" mkdir -p "${DOCDIR}" em.install_doc else diff --git a/scripts/BoxLib.build b/scripts/BoxLib.build index 3a6a6de..a855b42 100755 --- a/scripts/BoxLib.build +++ b/scripts/BoxLib.build @@ -6,7 +6,7 @@ function em.configure() { CC=$MPICC CXX=$MPICXX cmake \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DCMAKE_BUILD_TYPE=RELEASE \ - "${EM_SRCDIR}" + "${MODULE_SRCDIR}" } em.add_to_family 'MPI' diff --git a/scripts/H5hut.build b/scripts/H5hut.build index 907122f..37870e3 100755 --- a/scripts/H5hut.build +++ b/scripts/H5hut.build @@ -13,8 +13,8 @@ function em.configure() { F90=$MPIF90 FC=$MPIFC FORTRAN=$MPIFORTRAN - #( cd "${EM_SRCDIR}" && ./autogen.sh ) - "${EM_SRCDIR}"/configure \ + #( cd "${MODULE_SRCDIR}" && ./autogen.sh ) + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-parallel \ --enable-debug \ diff --git a/scripts/H5hut_serial.build b/scripts/H5hut_serial.build index 44ae8e2..72cb8d7 100755 --- a/scripts/H5hut_serial.build +++ b/scripts/H5hut_serial.build @@ -3,8 +3,8 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - (cd "${EM_SRCDIR}" && ./autogen.sh) - "${EM_SRCDIR}"/configure \ + (cd "${MODULE_SRCDIR}" && ./autogen.sh) + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-debug \ --enable-vtkconverter \ diff --git a/scripts/H5root.build b/scripts/H5root.build index f2dadaf..8843e87 100755 --- a/scripts/H5root.build +++ b/scripts/H5root.build @@ -7,7 +7,7 @@ function em.pre_configure() { } function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-h5hut \ --enable-hdf5 \ diff --git a/scripts/Lmod.build b/scripts/Lmod.build index 60bfdcb..7ac7a72 100755 --- a/scripts/Lmod.build +++ b/scripts/Lmod.build @@ -3,15 +3,15 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cd "${EM_SRCDIR}" - "${EM_SRCDIR}"/configure \ + cd "${MODULE_SRCDIR}" + "${MODULE_SRCDIR}"/configure \ --prefix="${EM_PREFIX}/core" \ --with-module-root-path="${MODULEPATH_ROOT}" \ || exit 1 } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make -j ${JOBS} } diff --git a/scripts/Modules.build b/scripts/Modules.build index 9db29cf..9901366 100755 --- a/scripts/Modules.build +++ b/scripts/Modules.build @@ -5,8 +5,8 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - CPPFLAGS="-DUSE_INTERP_ERRORLINE" "${EM_SRCDIR}"/configure \ - --prefix="${EM_BINDIR}/${EM_FAMILY}" \ + CPPFLAGS="-DUSE_INTERP_ERRORLINE" "${MODULE_SRCDIR}"/configure \ + --prefix="${EM_BINDIR}/${MODULE_FAMILY}" \ --with-module-path="${MODULEPATH_ROOT}" \ || exit 1 } diff --git a/scripts/OPAL.build b/scripts/OPAL.build index 634d521..aa49cc3 100755 --- a/scripts/OPAL.build +++ b/scripts/OPAL.build @@ -3,11 +3,11 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - CC=$MPICC CXX=$MPICXX cmake \ + CC="$MPICC -fopenmp" CXX="$MPICXX -fopenmp" cmake \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DCMAKE_BUILD_TYPE=RELEASE \ -DENABLE_SAAMG_SOLVER=TRUE \ - "${EM_SRCDIR}" + "${MODULE_SRCDIR}" } em.add_to_family 'Tools' diff --git a/scripts/OpenBLAS.build b/scripts/OpenBLAS.build index 1e4c15d..dadd1f4 100755 --- a/scripts/OpenBLAS.build +++ b/scripts/OpenBLAS.build @@ -3,14 +3,14 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cat < "${EM_SRCDIR}/make.inc" + cat < "${MODULE_SRCDIR}/make.inc" SHELL = /bin/sh PLAT = DRVOPTS = \$(OPTS) LOADER = \$(FORTRAN) -pthread ARCHFLAGS= -ru EOF - cat < "${EM_SRCDIR}/Makefile.rule" + cat < "${MODULE_SRCDIR}/Makefile.rule" VERSION = 0.2.9 TARGET = CORE2 CC = gcc @@ -26,7 +26,7 @@ EOF } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make } diff --git a/scripts/OpenBLAS_OMP.build b/scripts/OpenBLAS_OMP.build index 1abf948..0355b30 100755 --- a/scripts/OpenBLAS_OMP.build +++ b/scripts/OpenBLAS_OMP.build @@ -3,14 +3,14 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cat < "${EM_SRCDIR}/make.inc" + cat < "${MODULE_SRCDIR}/make.inc" SHELL = /bin/sh PLAT = DRVOPTS = \$(OPTS) LOADER = \$(FORTRAN) -pthread ARCHFLAGS= -ru EOF - cat < "${EM_SRCDIR}/Makefile.rule" + cat < "${MODULE_SRCDIR}/Makefile.rule" VERSION = 0.2.9 TARGET = CORE2 CC = gcc @@ -26,7 +26,7 @@ EOF } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make } diff --git a/scripts/Python.build b/scripts/Python.build index 106e4f0..6269f12 100755 --- a/scripts/Python.build +++ b/scripts/Python.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } diff --git a/scripts/SuperLU.build b/scripts/SuperLU.build index 1b32c1f..a4c416a 100755 --- a/scripts/SuperLU.build +++ b/scripts/SuperLU.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cat < "${EM_SRCDIR}/make.inc" + cat < "${MODULE_SRCDIR}/make.inc" PLAT = SuperLUroot = \${PREFIX} SUPERLULIB = \$(SuperLUroot)/lib/libsuperlu.a @@ -29,7 +29,7 @@ EOF } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" mkdir -p "${PREFIX}/lib" make } @@ -37,7 +37,7 @@ function em.build() { function em.install() { make install mkdir -p "${PREFIX}/include" - install -m 0444 "${EM_SRCDIR}"/SRC/*.h "${PREFIX}/include" + install -m 0444 "${MODULE_SRCDIR}"/SRC/*.h "${PREFIX}/include" } em.add_to_family 'Compiler' diff --git a/scripts/SuperLU_DIST.build b/scripts/SuperLU_DIST.build index 10289e5..958f55b 100755 --- a/scripts/SuperLU_DIST.build +++ b/scripts/SuperLU_DIST.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cat < "${EM_SRCDIR}/make.inc" + cat < "${MODULE_SRCDIR}/make.inc" PLAT = DSuperLUroot = \${PREFIX} DSUPERLULIB = \$(DSuperLUroot)/lib/libsuperlu_dist.a @@ -28,7 +28,7 @@ EOF } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" mkdir -p "${PREFIX}/lib" make } @@ -36,7 +36,7 @@ function em.build() { function em.install() { make install mkdir -p "${PREFIX}/include" - install -m 0444 "${EM_SRCDIR}"/SRC/*.h "${PREFIX}/include" + install -m 0444 "${MODULE_SRCDIR}"/SRC/*.h "${PREFIX}/include" } function em.install_doc() { diff --git a/scripts/UMFPACK.bash b/scripts/UMFPACK.bash index fcb33cb..7fc5232 100755 --- a/scripts/UMFPACK.bash +++ b/scripts/UMFPACK.bash @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cat < "${EM_SRCDIR}/SuiteSparse_config/SuiteSparse_config.mk" + cat < "${MODULE_SRCDIR}/SuiteSparse_config/SuiteSparse_config.mk" CF = \$(CFLAGS) \$(CPPFLAGS) \$(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER RANLIB = ranlib ARCHIVE = \$(AR) \$(ARFLAGS) @@ -27,7 +27,7 @@ EOF } function em.build() { - cd "${EM_SRCDIR}/UMFPACK" + cd "${MODULE_SRCDIR}/UMFPACK" make TARGET=CORE2 BINARY=64 USE_THREAD=0 NO_SHARED=1 } diff --git a/scripts/all.build b/scripts/all.build index 6429328..f123402 100755 --- a/scripts/all.build +++ b/scripts/all.build @@ -2,7 +2,7 @@ source "$(dirname $0)/../lib/lib.bash" -[[ -z $EM_ETCDIR ]] && die 1 "Module environment not loaded" +[[ -z ${EM_ETCDIR} ]] && die 1 "Module environment not loaded" while read family rest; do $(dirname $0)/family.build ${family} "$@" diff --git a/scripts/autoconf.build b/scripts/autoconf.build index e50628c..1e787fb 100755 --- a/scripts/autoconf.build +++ b/scripts/autoconf.build @@ -3,27 +3,29 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -function em.install_doc() { - install -m 0444 \ - AUTHORS \ - COPYING \ - COPYING.EXCEPTION \ - COPYINGv3 \ - NEWS \ - README \ - THANKS \ - "${DOCDIR}" -} - # use system gcc to compile declare -rx CC=gcc em.add_to_family 'Programming' +em.set_docfiles \ + AUTHORS \ + COPYING \ + COPYING.EXCEPTION \ + COPYINGv3 \ + NEWS \ + README \ + THANKS + em.set_build_dependencies "m4" em.make_all +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: diff --git a/scripts/automake.build b/scripts/automake.build index e10c0df..1dfa5a4 100755 --- a/scripts/automake.build +++ b/scripts/automake.build @@ -3,27 +3,29 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -function em.install_doc() { - install -m 0444 \ - AUTHORS \ - COPYING \ - ChangeLog \ - HACKING \ - NEWS \ - README \ - THANKS \ - "${DOCDIR}" -} - # use system gcc to compile declare -rx CC=gcc em.add_to_family 'Programming' +em.set_docfiles \ + AUTHORS \ + COPYING \ + ChangeLog \ + HACKING \ + NEWS \ + README \ + THANKS em.set_build_dependencies 'm4' 'autoconf' em.make_all +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: + diff --git a/scripts/boost.build b/scripts/boost.build index 4279fcd..1a91a39 100755 --- a/scripts/boost.build +++ b/scripts/boost.build @@ -6,8 +6,8 @@ source "$(dirname $0)/../lib/libem.bash" TOOLSET=gcc function em.configure() { - cd "${EM_SRCDIR}" - "${EM_SRCDIR}"/bootstrap.sh \ + cd "${MODULE_SRCDIR}" + "${MODULE_SRCDIR}"/bootstrap.sh \ --prefix="${PREFIX}" \ --with-toolset=${TOOLSET} \ --with-libraries=all \ @@ -16,10 +16,10 @@ function em.configure() { } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" ./b2 \ --build-type=minimal \ - --build-dir="${EM_BUILDDIR}" \ + --build-dir="${MODULE_BUILDDIR}" \ --layout=system \ --without-mpi \ variant=release \ @@ -29,10 +29,10 @@ function em.build() { } function em.install() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" ./b2 \ --build-type=minimal \ - --build-dir="${EM_BUILDDIR}" \ + --build-dir="${MODULE_BUILDDIR}" \ --layout=system \ --without-mpi \ variant=release \ diff --git a/scripts/cmake.build b/scripts/cmake.build index 10cbdef..5dc8f67 100755 --- a/scripts/cmake.build +++ b/scripts/cmake.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}/bootstrap" --prefix="${PREFIX}" + "${MODULE_SRCDIR}/bootstrap" --prefix="${PREFIX}" } em.add_to_family 'Programming' diff --git a/scripts/emacs.build b/scripts/emacs.build index 510b5e8..d8705dd 100755 --- a/scripts/emacs.build +++ b/scripts/emacs.build @@ -14,7 +14,7 @@ Darwin ) COMPILER_VERSION='' function em.post_install() { mkdir -p "${PREFIX}" - cp -rv "${EM_BUILDDIR}"/nextstep/Emacs.app "${PREFIX}" + cp -rv "${MODULE_BUILDDIR}"/nextstep/Emacs.app "${PREFIX}" } ;; *) @@ -22,7 +22,7 @@ Darwin ) esac function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ ${configure_args} \ || exit 1 diff --git a/scripts/filebench.build b/scripts/filebench.build index 170e836..baa0b4b 100755 --- a/scripts/filebench.build +++ b/scripts/filebench.build @@ -3,21 +3,11 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -#function em.install_doc() { -# install -m 0444 \ -# Copyright \ -# ChangeLog \ -# NEWS \ -# README \ -# README.1ST \ -# "${DOCDIR}" -#} - em.supported_os 'Linux' em.add_to_family 'System' em.set_build_dependencies "${COMPILER}" diff --git a/scripts/fsstress.build b/scripts/fsstress.build index c4445a5..19b3334 100755 --- a/scripts/fsstress.build +++ b/scripts/fsstress.build @@ -7,27 +7,17 @@ function em.configure() { } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make -j ${JOBS} } function em.install() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" mkdir -p ${PREFIX}/bin install -m 0755 fsstress "${PREFIX}/bin" } -#function em.install_doc() { -# install -m 0444 \ -# Copyright \ -# ChangeLog \ -# NEWS \ -# README \ -# README.1ST \ -# "${DOCDIR}" -#} - #em.supported_os 'Linux' em.add_to_family 'System' em.set_build_dependencies "${COMPILER}" diff --git a/scripts/gcc.build b/scripts/gcc.build index d597c41..a1bf78c 100755 --- a/scripts/gcc.build +++ b/scripts/gcc.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-languages=c,c++,objc,obj-c++,lto,fortran \ --with-gmp="${GMP_PREFIX}" \ diff --git a/scripts/giflib.build b/scripts/giflib.build index 427c683..8060ae0 100755 --- a/scripts/giflib.build +++ b/scripts/giflib.build @@ -3,25 +3,11 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -#function em.install_doc() { -# install -m 0444 \ -# AUTHORS \ -# BUGS \ -# COPYING \ -# ChangeLog \ -# INSTALL \ -# NEWS \ -# README \ -# THANKS \ -# TODO \ -# "${DOCDIR}" -#} - em.add_to_family 'Libraries' em.set_build_dependencies "${COMPILER}" em.make_all diff --git a/scripts/gmp.build b/scripts/gmp.build index e5b16fc..53830dc 100755 --- a/scripts/gmp.build +++ b/scripts/gmp.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --disable-shared \ || exit 1 diff --git a/scripts/gnuplot.build b/scripts/gnuplot.build index 9aa12a8..e263f3d 100755 --- a/scripts/gnuplot.build +++ b/scripts/gnuplot.build @@ -3,23 +3,20 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --with-gif=no \ --with-tiff=no \ || exit 1 } -function em.install_doc() { - install -m 0444 \ - Copyright \ - ChangeLog \ - NEWS \ - README \ - README.1ST \ - "${DOCDIR}" -} - em.add_to_family 'Tools' +em.set_docfiles 'Copyright' 'ChangeLog' 'NEWS' 'README' 'README.1ST' em.set_build_dependencies "${COMPILER}" em.make_all + +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: diff --git a/scripts/gsl.build b/scripts/gsl.build index 0183b1a..b792372 100755 --- a/scripts/gsl.build +++ b/scripts/gsl.build @@ -3,25 +3,27 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -function em.install_doc() { - install -m 0444 \ - AUTHORS \ - BUGS \ - COPYING \ - ChangeLog \ - INSTALL \ - NEWS \ - README \ - THANKS \ - TODO \ - "${DOCDIR}" -} - em.add_to_family 'Compiler' +em.set_docfiles \ + 'AUTHORS' \ + 'BUGS' \ + 'COPYING' \ + 'ChangeLog' \ + 'INSTALL' \ + 'NEWS' \ + 'README' \ + 'THANKS' \ + 'TODO' em.set_build_dependencies "${COMPILER}" em.make_all + +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: diff --git a/scripts/hdf5.build b/scripts/hdf5.build index cf1d2aa..2e4493b 100755 --- a/scripts/hdf5.build +++ b/scripts/hdf5.build @@ -10,7 +10,7 @@ function em.configure() { FC=$MPIFC FORTRAN=$MPIFORTRAN - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-shared \ --enable-parallel \ diff --git a/scripts/hdf5_serial.build b/scripts/hdf5_serial.build index a5c9770..fea5fb4 100755 --- a/scripts/hdf5_serial.build +++ b/scripts/hdf5_serial.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-shared \ --enable-cxx \ diff --git a/scripts/ippl.build b/scripts/ippl.build index a5028f7..3ecceb2 100755 --- a/scripts/ippl.build +++ b/scripts/ippl.build @@ -14,7 +14,7 @@ function em.configure() { cmake \ -DCMAKE_BUILD_TYPE=RELEASE \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ - "${EM_SRCDIR}" \ + "${MODULE_SRCDIR}" \ || exit 1 } diff --git a/scripts/libtool.build b/scripts/libtool.build index 8d05565..dd388f9 100755 --- a/scripts/libtool.build +++ b/scripts/libtool.build @@ -3,25 +3,16 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -function em.install_doc() { - install -m 0444 \ - AUTHORS \ - COPYING \ - NEWS \ - README \ - THANKS \ - "${DOCDIR}" -} - # use system gcc to compile declare -rx CC=gcc em.add_to_family 'Programming' -em.set_build_dependencies "autoconf" "automake" +em.set_docfiles 'AUTHORS' 'COPYING' 'NEWS' 'README' 'THANKS' +em.set_build_dependencies 'autoconf' 'automake' em.make_all diff --git a/scripts/libungif.build b/scripts/libungif.build index 427c683..8060ae0 100755 --- a/scripts/libungif.build +++ b/scripts/libungif.build @@ -3,25 +3,11 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -#function em.install_doc() { -# install -m 0444 \ -# AUTHORS \ -# BUGS \ -# COPYING \ -# ChangeLog \ -# INSTALL \ -# NEWS \ -# README \ -# THANKS \ -# TODO \ -# "${DOCDIR}" -#} - em.add_to_family 'Libraries' em.set_build_dependencies "${COMPILER}" em.make_all diff --git a/scripts/lua.build b/scripts/lua.build index 9ce4d70..d282527 100755 --- a/scripts/lua.build +++ b/scripts/lua.build @@ -6,14 +6,14 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cd "${EM_SRCDIR}" - "${EM_SRCDIR}"/configure \ + cd "${MODULE_SRCDIR}" + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make -j ${JOBS} } diff --git a/scripts/m4.build b/scripts/m4.build index 506c4a9..178b82e 100755 --- a/scripts/m4.build +++ b/scripts/m4.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } diff --git a/scripts/mathlib.build b/scripts/mathlib.build index 0cd7ed1..16de08d 100755 --- a/scripts/mathlib.build +++ b/scripts/mathlib.build @@ -7,7 +7,7 @@ function em.configure() { } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" install -m 0755 -d "${PREFIX}/include" diff --git a/scripts/mpc.build b/scripts/mpc.build index f78cf29..6b5479a 100755 --- a/scripts/mpc.build +++ b/scripts/mpc.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --with-gmp=$GMP_PREFIX \ --with-mpfr=$MPFR_PREFIX \ diff --git a/scripts/mpfr.build b/scripts/mpfr.build index 5b6cc6a..f087dce 100755 --- a/scripts/mpfr.build +++ b/scripts/mpfr.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --with-gmp=$GMP_PREFIX \ --disable-shared \ diff --git a/scripts/netcdf.build b/scripts/netcdf.build index 40f6f7b..e4d2fce 100755 --- a/scripts/netcdf.build +++ b/scripts/netcdf.build @@ -13,7 +13,7 @@ function em.configure() { F90=$MPIF90 FC=$MPIFC FORTRAN=$MPIFORTRAN - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-netcdf-4 \ --with-pic \ diff --git a/scripts/nmap.build b/scripts/nmap.build index 1be19bb..69a3e3a 100755 --- a/scripts/nmap.build +++ b/scripts/nmap.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" ./configure \ --prefix="${PREFIX}" \ --with-libpcap=included \ @@ -14,12 +14,12 @@ function em.configure() { } function em.build() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make -j "${JOBS}" } function em.install() { - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make install } diff --git a/scripts/openmpi.build b/scripts/openmpi.build index d9df96e..23a58ce 100755 --- a/scripts/openmpi.build +++ b/scripts/openmpi.build @@ -3,7 +3,7 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ --enable-mpi-cxx \ --enable-mpi-cxx-seek \ diff --git a/scripts/parmetis.build b/scripts/parmetis.build index 269665f..6ea62e3 100755 --- a/scripts/parmetis.build +++ b/scripts/parmetis.build @@ -14,7 +14,7 @@ function em.configure() { function em.build() { local -ri MAJOR_VERSION=${V%%.*} if (( MAJOR_VERSION == 3 )) ; then - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make -e -j3 || exit 1 mkdir -p $PREFIX/include/metis @@ -24,7 +24,7 @@ function em.build() { cp METISLib/*.h $PREFIX/include/metis cp lib*.a $PREFIX/lib elif (( MAJOR_VERSION == 4 )); then - cd "${EM_SRCDIR}" + cd "${MODULE_SRCDIR}" make config prefix=$PREFIX || exit 1 make -j3 || exit 1 make install diff --git a/scripts/patchelf.build b/scripts/patchelf.build index 170e836..baa0b4b 100755 --- a/scripts/patchelf.build +++ b/scripts/patchelf.build @@ -3,21 +3,11 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -#function em.install_doc() { -# install -m 0444 \ -# Copyright \ -# ChangeLog \ -# NEWS \ -# README \ -# README.1ST \ -# "${DOCDIR}" -#} - em.supported_os 'Linux' em.add_to_family 'System' em.set_build_dependencies "${COMPILER}" diff --git a/scripts/root.build b/scripts/root.build index 2cd9666..a61ffcd 100755 --- a/scripts/root.build +++ b/scripts/root.build @@ -13,7 +13,7 @@ Darwin ) esac function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --disable-ldap \ --disable-mysql \ --disable-opengl \ diff --git a/scripts/tiff.build b/scripts/tiff.build index 427c683..8060ae0 100755 --- a/scripts/tiff.build +++ b/scripts/tiff.build @@ -3,25 +3,11 @@ source "$(dirname $0)/../lib/libem.bash" function em.configure() { - "${EM_SRCDIR}"/configure \ + "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ || exit 1 } -#function em.install_doc() { -# install -m 0444 \ -# AUTHORS \ -# BUGS \ -# COPYING \ -# ChangeLog \ -# INSTALL \ -# NEWS \ -# README \ -# THANKS \ -# TODO \ -# "${DOCDIR}" -#} - em.add_to_family 'Libraries' em.set_build_dependencies "${COMPILER}" em.make_all diff --git a/scripts/trilinos.build b/scripts/trilinos.build index e93fccc..83b431a 100755 --- a/scripts/trilinos.build +++ b/scripts/trilinos.build @@ -67,7 +67,7 @@ function em.configure() { -D Trilinos_ENABLE_Teuchos:BOOL=ON \ -D Trilinos_ENABLE_Tpetra:BOOL=ON \ -D Trilinos_ENABLE_TESTS:BOOL=OFF \ - "${EM_SRCDIR}" || exit 1 + "${MODULE_SRCDIR}" || exit 1 } em.add_to_family 'MPI' diff --git a/scripts/vtk.build b/scripts/vtk.build index bba2174..c042cda 100755 --- a/scripts/vtk.build +++ b/scripts/vtk.build @@ -23,7 +23,7 @@ function em.configure() { -DVTK_INSTALL_INCLUDE_DIR:PATH=include \ -DVTK_INSTALL_LIB_DIR:PATH=lib \ -DVTK_USE_COCOA:BOOL=OFF \ - "${EM_SRCDIR}" + "${MODULE_SRCDIR}" } em.add_to_family 'Compiler'