Merge branch 'master' of gitorious.psi.ch:scicomp/psi-modules-buildenvironment
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
tmp
|
||||
*~
|
||||
Downloads
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
PMODULES_VERSION=0.99.0
|
||||
MODULES_VERSION=3.2.10
|
||||
declare -x PMODULES_VERSION=0.99.1
|
||||
declare -x MODULES_VERSION=3.2.10
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
autoconf 2.69
|
||||
automake 1.14
|
||||
bash 4.3.30
|
||||
boost 1.55.0
|
||||
boost 1.57.0
|
||||
BoxLib 2014-02-28
|
||||
cmake 2.8.12.2
|
||||
dialog 1.2.1
|
||||
@@ -17,8 +17,8 @@ fsstress 1.0.0
|
||||
h5hut_serial 1.99.13
|
||||
H5hut 1.99.13
|
||||
H5root 1.2.0
|
||||
hdf5_serial 1.8.12
|
||||
hdf5 1.8.12
|
||||
hdf5_serial 1.8.14
|
||||
hdf5 1.8.14
|
||||
ippl 1.1.3
|
||||
libtool 2.4.2
|
||||
libungif 4.1.4
|
||||
@@ -36,11 +36,11 @@ OpenBLAS_OMP 0.2.9
|
||||
parmetis 3.2.0
|
||||
patchelf 0.8.1
|
||||
Python 3.4.0
|
||||
root 5.34.19
|
||||
root 5.34.26
|
||||
SuperLU 4.3
|
||||
SuperLU_DIST 3.3
|
||||
Tcl 8.6.3
|
||||
tiff 4.0.3
|
||||
trilinos 11.10.2
|
||||
trilinos 11.12.1
|
||||
UMFPACK 5.6.2
|
||||
vtk 5.10.1
|
||||
|
||||
@@ -25,6 +25,8 @@ declare -xr BUILD_TMPDIR="${BUILD_BASEDIR}/tmp"
|
||||
declare -xr BUILD_DOWNLOADSDIR="${BUILD_BASEDIR}/Downloads"
|
||||
declare -xr BUILD_VERSIONSFILE="${BUILD_CONFIGDIR}/versions.conf"
|
||||
|
||||
declare -xr PSI_TEMPLATES_DIR='templates'
|
||||
|
||||
if [[ -z "${BUILD_CONFIGDIR}/families.d/"*.conf ]]; then
|
||||
die 1 "Default family configuration not set in ${BUILD_CONFIGDIR}/families.d"
|
||||
fi
|
||||
@@ -151,26 +153,27 @@ fi
|
||||
|
||||
# while bootstraping the module command is not yet available
|
||||
if [[ ${bootstrap} == no ]]; then
|
||||
source "${PSI_PREFIX}/${PSI_CONFIG_DIR}/profile.bash"
|
||||
source "${PSI_PREFIX}/${PSI_CONFIG_DIR}/profile.bash"
|
||||
MODULECMD="${PMODULES_HOME}/bin/modulecmd"
|
||||
[[ -x ${MODULECMD} ]] || die 1 "${MODULECMD}: no such executable"
|
||||
module use unstable
|
||||
module purge
|
||||
fi
|
||||
|
||||
P=$(basename $0)
|
||||
P=${P%.*}
|
||||
P=$(basename $(dirname "${BUILDSCRIPT}"))
|
||||
_P=$(echo $P | tr [:lower:] [:upper:])
|
||||
_P=${_P//-/_}
|
||||
_V=${_P}_VERSION
|
||||
|
||||
eval "${ENVIRONMENT_ARGS}"
|
||||
|
||||
if [[ ${PSI_RELEASES_CONF} ]] && [[ -r "${PSI_PREFIX}/${PSI_RELEASES_CONF}" ]]; then
|
||||
declare -r releases=:$(< "${PSI_PREFIX}/${PSI_RELEASES_CONF}"):
|
||||
if [[ -n ${PSI_RELEASES} ]]; then
|
||||
declare -r releases="${PSI_RELEASES}"
|
||||
else
|
||||
# set defaults, if file doesn't exist or isn't readable
|
||||
declare -r releases=":unstable:stable:deprecated:"
|
||||
fi
|
||||
|
||||
is_release () {
|
||||
[[ ${releases} =~ :$1: ]]
|
||||
}
|
||||
@@ -192,7 +195,7 @@ function em.add_to_family() {
|
||||
if [[ -z ${1} ]]; then
|
||||
die 42 "${FUNCNAME}: Missing family argument."
|
||||
fi
|
||||
if [[ ! -d ${PSI_PREFIX}/${PSI_CONFIG_DIR}/${1} ]]; then
|
||||
if [[ ! -d ${PSI_PREFIX}/${PSI_MODULES_ROOT}/${1} ]]; then
|
||||
die 43 "${1}: family does not exist."
|
||||
fi
|
||||
MODULE_FAMILY=$1
|
||||
@@ -219,8 +222,14 @@ function module_is_available() {
|
||||
}
|
||||
|
||||
function _load_build_dependencies() {
|
||||
# :FIXME: merge this two loops, load only modules which are required
|
||||
# this merge is not as easy as it looks like at a first glance!
|
||||
for m in "${with_modules[@]}"; do
|
||||
module load "${m}"
|
||||
if module_is_available "$m"; then
|
||||
module load "${m}"
|
||||
else
|
||||
die 44 "$m: module not available!"
|
||||
fi
|
||||
done
|
||||
for m in "${MODULE_BUILD_DEPENDENCIES[@]}"; do
|
||||
[[ -z $m ]] && continue
|
||||
@@ -273,7 +282,7 @@ function _load_build_dependencies() {
|
||||
esac
|
||||
shift
|
||||
done
|
||||
"${BUILD_SCRIPTSDIR}/${m/\/*}.build" ${args[@]}
|
||||
"${BUILD_SCRIPTSDIR}"/*/"${m/\/*}/build" ${args[@]}
|
||||
if [[ -z $(module avail "$m" 2>&1) ]]; then
|
||||
die 1 "$m: oops: build failed..."
|
||||
fi
|
||||
@@ -530,7 +539,7 @@ if [[ ${bootstrap} == yes ]]; then
|
||||
MODULE_SRCDIR="${BUILD_TMPDIR}/src/${P/_serial}-$V"
|
||||
MODULE_BUILDDIR="${BUILD_TMPDIR}/build/$P-$V"
|
||||
MODULE_FAMILY='Tools'
|
||||
MODULE_NAME="Pmodules/0.99.0"
|
||||
MODULE_NAME="Pmodules/${PMODULES_VERSION}"
|
||||
# set PREFIX of module
|
||||
PREFIX="${PSI_PREFIX}/${MODULE_FAMILY}/${MODULE_NAME}"
|
||||
|
||||
@@ -617,7 +626,7 @@ function _set_link() {
|
||||
local x
|
||||
IFS='/' x=( ${dir_name/${PSI_PREFIX}\/${PSI_MODULES_ROOT}\/} )
|
||||
local n=${#x[@]}
|
||||
local -r _target="../"$(eval printf "../%.s" {1..${n}})${PSI_CONFIG_DIR##*/}/"${MODULE_FAMILY}/${P}/modulefile"
|
||||
local -r _target="../"$(eval printf "../%.s" {1..${n}})${PSI_TEMPLATES_DIR##*/}/"${MODULE_FAMILY}/${P}/modulefile"
|
||||
ln -fs "${_target}" "${MODULE_NAME##*/}"
|
||||
)
|
||||
fi
|
||||
|
||||
1
scripts/Bootstrap/.gitignore
vendored
Normal file
1
scripts/Bootstrap/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
modulecmd
|
||||
@@ -1,18 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
#############################################################################
|
||||
# bash 3 or newer ...
|
||||
#
|
||||
if [ ${BASH_VERSINFO:-0} -lt 3 ]; then
|
||||
echo "BASH version ${BASH_VERSION} ist not supported! You need at least version 3..."
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "${LOADEDMODULES:-}" = "" ]; then
|
||||
declare -x LOADEDMODULES=
|
||||
fi
|
||||
|
||||
if [[ -r "${PSI_BASH_COMPLETION}" ]]; then
|
||||
source "${PSI_BASH_COMPLETION}"
|
||||
fi
|
||||
|
||||
#############################################################################
|
||||
# implement module comand as function
|
||||
#
|
||||
module() {
|
||||
local -r modulecmd="${PMODULES_HOME}/bin/modulecmd"
|
||||
|
||||
@@ -63,6 +61,72 @@ module() {
|
||||
}
|
||||
export -f module
|
||||
|
||||
#############################################################################
|
||||
# helper functions
|
||||
#
|
||||
append_path () {
|
||||
local -r P=$1
|
||||
local -r d=$2
|
||||
|
||||
if ! echo ${!P} | egrep -q "(^|:)${d}($|:)" ; then
|
||||
if [[ -z ${!P} ]]; then
|
||||
eval $P=${d}
|
||||
else
|
||||
eval $P="${!P}:${d}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
prepend_path () {
|
||||
local -r P=$1
|
||||
local -r d=$2
|
||||
|
||||
if ! echo ${!P} | egrep -q "(^|:)${d}($|:)" ; then
|
||||
if [[ -z ${!P} ]]; then
|
||||
eval $P=${d}
|
||||
else
|
||||
eval $P="${d}:${!P}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# setup environment
|
||||
#
|
||||
if [[ -z ${LOADEDMODULES} ]]; then
|
||||
declare -x LOADEDMODULES=''
|
||||
fi
|
||||
|
||||
if [[ -z ${MODULEPATH} ]]; then
|
||||
declare -x MODULEPATH=''
|
||||
fi
|
||||
|
||||
if [[ -z ${PSI_LOADEDFAMILIES} ]]; then
|
||||
declare -x PSI_LOADEDFAMILIES=''
|
||||
fi
|
||||
for f in ${PSI_DEFAULT_FAMILIES}; do
|
||||
append_path MODULEPATH "${PSI_PREFIX}/${PSI_MODULES_ROOT}/$f"
|
||||
append_path PSI_LOADEDFAMILIES "${f}"
|
||||
done
|
||||
|
||||
append_path PATH "${PMODULES_HOME}/bin"
|
||||
append_path MANPATH "${PMODULES_HOME}/share/man"
|
||||
|
||||
#############################################################################
|
||||
# initialize bash completion
|
||||
#
|
||||
if [[ -r "${PMODULES_HOME}/init/bash_completion" ]]; then
|
||||
source "${PMODULES_HOME}/init/bash_completion"
|
||||
fi
|
||||
|
||||
#############################################################################
|
||||
# legacy...
|
||||
#
|
||||
declare -x MODULE_VERSION=${PMODULES_VERSION}
|
||||
declare -x MODULE_VERSION_STACK="${PMODULE_VERSION}"
|
||||
declare -x MODULESHOME="${PMODULES_HOME}"
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: sh
|
||||
# sh-basic-offset: 8
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../System/bash.build
|
||||
13
scripts/Bootstrap/bash.build
Executable file
13
scripts/Bootstrap/bash.build
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
em.add_to_family 'System'
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
@@ -2,7 +2,7 @@
|
||||
# Bash commandline completion (bash 3.0 and above) for Modules 3.2.10
|
||||
#
|
||||
_module_avail() {
|
||||
"${MODULESHOME}"/bin/modulecmd bash -t avail 2>&1 | sed '
|
||||
"${PMODULES_HOME}"/bin/modulecmd bash -t avail 2>&1 | sed '
|
||||
/:$/d;
|
||||
/:ERROR:/d;
|
||||
s#^\(.*\)/\(.\+\)(default)#\1\n\1\/\2#;
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
declare -r BASE_DIR=$(cd "$(dirname $0)/../.." && pwd)
|
||||
declare -r BOOTSTRAP_DIR="${BASE_DIR}/scripts/Bootstrap"
|
||||
|
||||
source "/opt/psi/config/environment.bash"
|
||||
source "${BASE_DIR}/config/pmodules_version.conf"
|
||||
|
||||
unset PMODULES_HOME
|
||||
source "/opt/psi/config/environment.bash"
|
||||
|
||||
${BOOTSTRAP_DIR}/gettext.build --bootstrap
|
||||
${BOOTSTRAP_DIR}/getopt.build --bootstrap
|
||||
${BOOTSTRAP_DIR}/dialog.build --bootstrap
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../Tools/dialog.build
|
||||
13
scripts/Bootstrap/dialog.build
Executable file
13
scripts/Bootstrap/dialog.build
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
em.add_to_family 'Tools'
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
30
scripts/Bootstrap/environment.bash
Normal file
30
scripts/Bootstrap/environment.bash
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -x PSI_PREFIX=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
|
||||
declare -x PSI_CONFIG_DIR=$(basename $(cd $(dirname "${BASH_SOURCE}") && pwd))
|
||||
|
||||
if [[ -z ${PMODULES_VERSION} ]]; then
|
||||
declare -x PMODULES_VERSION="0.99.1"
|
||||
fi
|
||||
|
||||
declare -x PMODULES_HOME="${PSI_PREFIX}/Tools/Pmodules/${PMODULES_VERSION}"
|
||||
|
||||
declare -A PSI_FAMILIES=(
|
||||
['Legacy']=0
|
||||
['Libraries']=0
|
||||
['Programming']=0
|
||||
['Numeric']=0
|
||||
['System']=0
|
||||
['Tools']=0
|
||||
['Compiler']=2
|
||||
['MPI']=4
|
||||
['HDF5_serial']=4
|
||||
['HDF5']=6
|
||||
)
|
||||
|
||||
declare -x PSI_MODULES_ROOT='modulefiles'
|
||||
|
||||
declare -x PSI_DEFAULT_FAMILIES='Tools Programming'
|
||||
|
||||
declare -x PSI_RELEASES=':unstable:stable:deprecated:'
|
||||
declare -x PSI_USED_RELEASES='stable'
|
||||
@@ -1 +0,0 @@
|
||||
../System/getopt.build
|
||||
42
scripts/Bootstrap/getopt.build
Executable file
42
scripts/Bootstrap/getopt.build
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
:
|
||||
}
|
||||
|
||||
function em.build() {
|
||||
case ${OS} in
|
||||
Linux )
|
||||
declare -x LDFLAGS="-lintl -liconv"
|
||||
;;
|
||||
Darwin )
|
||||
declare -x LDFLAGS="-lintl -liconv -framework CoreFoundation"
|
||||
;;
|
||||
esac
|
||||
|
||||
cd "${MODULE_SRCDIR}"
|
||||
make -e
|
||||
}
|
||||
|
||||
function em.install() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
declare -x DESTDIR="${PREFIX}"
|
||||
declare -x prefix=''
|
||||
make -e install
|
||||
}
|
||||
|
||||
function em.cleanup_build() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
make -e realclean
|
||||
}
|
||||
|
||||
em.add_to_family 'Tools'
|
||||
em.make_all
|
||||
|
||||
# Local Variables:
|
||||
# mode: sh
|
||||
# sh-basic-offset: 8
|
||||
# tab-width: 8
|
||||
# End:
|
||||
@@ -1 +0,0 @@
|
||||
../Tools/gettext.build
|
||||
24
scripts/Bootstrap/gettext.build
Executable file
24
scripts/Bootstrap/gettext.build
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
--disable-java \
|
||||
--disable-threads \
|
||||
--disable-shared \
|
||||
--enable-relocatable \
|
||||
--disable-openmp \
|
||||
--disable-acl \
|
||||
--disable-curses \
|
||||
--with-included-gettext \
|
||||
--without-libiconv-prefix \
|
||||
--without-libintl-prefix \
|
||||
--with-included-libxml \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
em.add_to_family 'Tools'
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
@@ -3,22 +3,27 @@
|
||||
declare -r BASE_DIR=$(cd "$(dirname $0)/../.." && pwd)
|
||||
declare -r BOOTSTRAP_DIR="${BASE_DIR}/scripts/Bootstrap"
|
||||
|
||||
source "/opt/psi/config/environment.bash"
|
||||
source "${BASE_DIR}/config/pmodules_version.conf"
|
||||
|
||||
unset PMODULES_HOME
|
||||
source "/opt/psi/config/environment.bash"
|
||||
|
||||
sed_cmd="s:@PMODULES_HOME@:${PMODULES_HOME}:g;"
|
||||
sed_cmd+="s:@PMODULES_VERSION@:${PMODULES_VERSION}:g;"
|
||||
sed_cmd+="s:@MODULES_VERSION@:${MODULES_VERSION}:g"
|
||||
sed "${sed_cmd}" "${BOOTSTRAP_DIR}/modulecmd.bash" > "${BOOTSTRAP_DIR}/modulecmd"
|
||||
|
||||
install -d -m 0755 "${PMODULES_HOME}/etc"
|
||||
install -d -m 0755 "${PMODULES_HOME}/bin"
|
||||
install -d -m 0755 "${PMODULES_HOME}/config"
|
||||
install -d -m 0755 "${PMODULES_HOME}/init"
|
||||
install -d -m 0755 "${PMODULES_HOME}/lib"
|
||||
|
||||
install -m 0755 "${BOOTSTRAP_DIR}/modulecmd" "${PMODULES_HOME}/bin"
|
||||
install -m 0755 "${BOOTSTRAP_DIR}/init_local_env.bash" "${PMODULES_HOME}/bin"
|
||||
install -m 0755 "${BOOTSTRAP_DIR}/modsync.bash" "${PMODULES_HOME}/bin"
|
||||
install -m 0755 "${BOOTSTRAP_DIR}/dialog.bash" "${PMODULES_HOME}/bin"
|
||||
|
||||
install -m 0644 "${BOOTSTRAP_DIR}/modulerc" "${PMODULES_HOME}/etc"
|
||||
#install -m 0644 "${BOOTSTRAP_DIR}/modulerc" "${PMODULES_HOME}/config"
|
||||
|
||||
install -m 0644 "${BOOTSTRAP_DIR}/bash" "${PMODULES_HOME}/init"
|
||||
install -m 0644 "${BOOTSTRAP_DIR}/bash_completion" "${PMODULES_HOME}/init"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,9 @@
|
||||
declare -r PMODULES_DIR=$( cd "$(dirname $0)/.." && pwd )
|
||||
declare -r version='@PMODULES_VERSION@'
|
||||
declare -r modulecmd="${PMODULES_DIR}/bin/modulecmd.tcl"
|
||||
#declare -rx TCL_LIBRARY="${PMODULES_DIR}/lib/tcl8.6"
|
||||
|
||||
declare -rx TCL_LIBRARY="${PMODULES_DIR}/lib/tcl8.6"
|
||||
declare -rx PSI_LIBMODULES="${PMODULES_DIR}/lib/libmodules.tcl"
|
||||
|
||||
declare -r modulepath_root="${PSI_PREFIX}/${PSI_MODULES_ROOT}"
|
||||
declare -ra modulepath=( ${MODULEPATH//:/ } )
|
||||
@@ -398,11 +400,11 @@ get_release() {
|
||||
echo ${release}
|
||||
}
|
||||
|
||||
if [[ ${PSI_RELEASES_CONF} ]] && [[ -r "${PSI_PREFIX}/${PSI_CONFIG_DIR}/${PSI_RELEASES_CONF}" ]]; then
|
||||
declare -r available_releases=:$(< "${PSI_PREFIX}/${PSI_CONFIG_DIR}/${PSI_RELEASES_CONF}"):
|
||||
if [[ -n ${PSI_RELEASES} ]]; then
|
||||
declare -r available_releases="${PSI_RELEASES}"
|
||||
else
|
||||
# set defaults, if file doesn't exist or isn't readable
|
||||
declare -r available_releases=":unstable:stable:deprecated:"
|
||||
declare -r available_releases=':unstable:stable:deprecated:'
|
||||
fi
|
||||
declare used_releases=":${PSI_USED_RELEASES}:"
|
||||
|
||||
@@ -414,20 +416,8 @@ is_used_release() {
|
||||
[[ ${used_releases} =~ :$1: ]]
|
||||
}
|
||||
|
||||
declare available_families=':'
|
||||
declare family
|
||||
declare depth
|
||||
while read family depth rest; do
|
||||
if (( depth == 0 )); then
|
||||
available_families+="${family}:"
|
||||
fi
|
||||
done < "${PSI_PREFIX}/${PSI_CONFIG_DIR}/${PSI_FAMILY_CONF}"
|
||||
declare used_families=":${PSI_LOADEDFAMILIES}:"
|
||||
|
||||
is_family() {
|
||||
[[ ${available_families} =~ :$1: ]]
|
||||
}
|
||||
|
||||
is_used_family() {
|
||||
[[ ${used_families} =~ :$1: ]]
|
||||
}
|
||||
@@ -677,6 +667,27 @@ subcommand_avail() {
|
||||
done
|
||||
}
|
||||
|
||||
get_families () {
|
||||
{
|
||||
cd "${modulepath_root}"
|
||||
echo *
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# $1: family name (not path!)
|
||||
compute_family_depth () {
|
||||
{
|
||||
local -r family=$1
|
||||
cd "${modulepath_root}"
|
||||
local -r tmp=$(find "${family}" -d -type f -o -type l | head -1)
|
||||
local -ar tmp2=( ${tmp//\// } )
|
||||
local depth=${#tmp2[@]}
|
||||
let depth-=3
|
||||
echo ${depth}
|
||||
};
|
||||
}
|
||||
|
||||
subcommand_use() {
|
||||
if [[ $# == 0 ]]; then
|
||||
local f
|
||||
@@ -686,9 +697,10 @@ subcommand_use() {
|
||||
echo -e "\t${f}" 1>&2
|
||||
done
|
||||
echo -e "\nFamilies you may use in addition:" 1>&2
|
||||
for f in ${available_families//:/ }; do
|
||||
if ! is_used_family $f; then
|
||||
echo -e "\t${f}" 1>&2
|
||||
for family in $(get_families); do
|
||||
local -i depth=$( compute_family_depth "${family}")
|
||||
if ! is_used_family $f && (( depth == 0 )); then
|
||||
echo -e "\t${f}" 1>&2
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -699,7 +711,7 @@ subcommand_use() {
|
||||
echo -e "\nReleases you may use in addition:" 1>&2
|
||||
for r in ${available_releases//:/ }; do
|
||||
if ! is_used_release $r; then
|
||||
echo -e "\t${r}"
|
||||
echo -e "\t${r}" 1>&2
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -710,6 +722,7 @@ subcommand_use() {
|
||||
fi
|
||||
done
|
||||
else
|
||||
|
||||
local dirs_to_add=()
|
||||
local subcommand_switches=''
|
||||
while (( $# > 0)); do
|
||||
@@ -722,7 +735,16 @@ subcommand_use() {
|
||||
# releases are always *appended*
|
||||
append_path PSI_USED_RELEASES "${arg}"
|
||||
elif [[ ! ${arg} =~ */* ]] && [[ -d ${modulepath_root}/${arg} ]]; then
|
||||
dirs_to_add+=( ${modulepath_root}/${arg} )
|
||||
local -i depth=$(compute_family_depth "${arg}")
|
||||
if (( depth == 0 )); then
|
||||
dirs_to_add+=( ${modulepath_root}/${arg} )
|
||||
else
|
||||
echo "${0##_}: cannot add family ${arg} to module path"
|
||||
return 3
|
||||
fi
|
||||
elif [[ ${arg} =~ ^${modulepath_root} ]]; then
|
||||
echo "${0##_}: illegal directory: ${arg}" 1>&2
|
||||
return 3
|
||||
elif [[ -d ${arg} ]]; then
|
||||
local normalized_dir=$(cd "${arg}" && pwd)
|
||||
dirs_to_add+=( ${normalized_dir} )
|
||||
@@ -808,9 +830,10 @@ subcommand_search() {
|
||||
local -r module=$1
|
||||
# we must write temporary results to a file for sorting
|
||||
local -r tmpfile=$( mktemp /tmp/$(basename $0).XXXXXX ) || exit 1
|
||||
local family depth unused
|
||||
local family
|
||||
# loop over all families
|
||||
while read family depth unused; do
|
||||
for family in $(get_families); do
|
||||
local -i depth=$( compute_family_depth ${family} )
|
||||
# get all potential directories of family $f with module-files
|
||||
local mpaths=( $(find \
|
||||
"${modulepath_root}/${family}" \
|
||||
@@ -841,7 +864,7 @@ subcommand_search() {
|
||||
${family} "${requires}" >> "${tmpfile}"
|
||||
done
|
||||
done
|
||||
done < "${PSI_PREFIX}/${PSI_CONFIG_DIR}/${PSI_FAMILY_CONF}"
|
||||
done
|
||||
sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}" 1>&2
|
||||
|
||||
rm -f "${tmpfile}"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#%Module1.0
|
||||
|
||||
setenv PSI_LIBMODULES "$env(PSI_PREFIX)/$env(PSI_CONFIG_DIR)/libmodules.tcl"
|
||||
|
||||
if { ! [info exists env(PSI_LIBMODULES) ] } {
|
||||
puts stderr "Module cannot be loaded, because the shell environment is not setup correctly."
|
||||
exit 42
|
||||
}
|
||||
39
scripts/Bootstrap/profile.bash
Normal file
39
scripts/Bootstrap/profile.bash
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
#############################################################################
|
||||
# read Pmodules configuration
|
||||
#
|
||||
_init_env_file="$(dirname ${BASH_SOURCE})/environment.bash"
|
||||
if [[ ! -r "${_init_env_file}" ]]; then
|
||||
echo "Oops: cannot initialize Modules!"
|
||||
echo "${_init_env_file}: file does not exist or is not readable."
|
||||
return 1
|
||||
fi
|
||||
source "${_init_env_file}"
|
||||
unset _init_env_file
|
||||
|
||||
############################################################################
|
||||
# check configuration
|
||||
#
|
||||
if [[ ! -d ${PSI_PREFIX} ]] || [[ ! -d ${PMODULES_HOME} ]]; then
|
||||
echo "Oops: cannot initialize module environment !"
|
||||
return 1
|
||||
fi
|
||||
|
||||
############################################################################
|
||||
# inititialize Pmodules for bash
|
||||
#
|
||||
_init_bash="${PMODULES_HOME}/init/bash"
|
||||
if [[ ! -r "${_init_bash}" ]]; then
|
||||
echo "Oops: cannot initialize Modules!"
|
||||
echo "${_init_bash}: File does not exist or is not readable."
|
||||
return 1
|
||||
fi
|
||||
source "${_init_bash}"
|
||||
unset _init_bash
|
||||
|
||||
# Local Variables:
|
||||
# mode: sh
|
||||
# sh-basic-offset: 8
|
||||
# tab-width: 8
|
||||
# End:
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source $(dirname $0)/../../lib/libem.bash
|
||||
source $(dirname $0)/../../../lib/libem.bash
|
||||
|
||||
function em.pre_configure() {
|
||||
./autogen.sh
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
cat <<EOF > "${MODULE_SRCDIR}/make.inc"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
cat <<EOF > "${MODULE_SRCDIR}/make.inc"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
cat <<EOF > "${MODULE_SRCDIR}/make.inc"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
cat <<EOF > "${MODULE_SRCDIR}/SuiteSparse_config/SuiteSparse_config.mk"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
# :TODO: detect compiler
|
||||
TOOLSET=gcc
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
case ${OS} in
|
||||
Darwin )
|
||||
@@ -6,7 +6,7 @@
|
||||
# and remove these strings.
|
||||
#
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
case ${OS} in
|
||||
Darwin )
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.pre_configure() {
|
||||
./autogen.sh
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.pre_configure() {
|
||||
:
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
(cd "${MODULE_SRCDIR}" && ./autogen.sh)
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
CC=$MPICC CXX=$MPICXX cmake \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
module use unstable
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
cat <<EOF > "${MODULE_SRCDIR}/make.inc"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
CC=$MPICC
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
CC=$MPICC
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
module use unstable
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
CC=$MPICC
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
declare -rx AR=ar
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
case ${OS} in
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}/bootstrap" --prefix="${PREFIX}"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
em.add_to_family 'Programming'
|
||||
em.set_runtime_dependencies ""
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Lua cannot be build in a seperate directory!
|
||||
#
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
function em.build() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
|
||||
make -j ${JOBS}
|
||||
}
|
||||
|
||||
em.supported_os ''
|
||||
em.add_to_family 'Programming'
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
em.cleanup_src
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
:
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
em.add_to_family 'System'
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
:
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
:
|
||||
}
|
||||
|
||||
function em.build() {
|
||||
case ${OS} in
|
||||
Linux )
|
||||
declare -x LDFLAGS="-lintl -liconv"
|
||||
;;
|
||||
Darwin )
|
||||
declare -x LDFLAGS="-lintl -liconv -framework CoreFoundation"
|
||||
;;
|
||||
esac
|
||||
|
||||
cd "${MODULE_SRCDIR}"
|
||||
make -e
|
||||
}
|
||||
|
||||
function em.install() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
declare -x DESTDIR="${PREFIX}"
|
||||
declare -x prefix=''
|
||||
make -e install
|
||||
}
|
||||
|
||||
function em.cleanup_build() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
make -e realclean
|
||||
}
|
||||
|
||||
em.add_to_family 'Tools'
|
||||
em.make_all
|
||||
|
||||
# Local Variables:
|
||||
# mode: sh
|
||||
# sh-basic-offset: 8
|
||||
# tab-width: 8
|
||||
# End:
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
:
|
||||
}
|
||||
|
||||
function em.build() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
|
||||
|
||||
install -m 0755 -d "${PREFIX}/include"
|
||||
install -m 0755 -d "${PREFIX}/lib"
|
||||
install -m 0755 -d "${DOCDIR}/lapack"
|
||||
|
||||
(
|
||||
cp make.inc.blas BLAS/make.inc
|
||||
cd BLAS
|
||||
make -e -j3 || exit 1
|
||||
install -m 0644 libblas.a "${PREFIX}/lib" || exit 1
|
||||
) || exit 1
|
||||
|
||||
(
|
||||
cp make.inc.cblas CBLAS/Makefile.in
|
||||
cd CBLAS
|
||||
make -e || exit 1
|
||||
install -m 0644 include/* "${PREFIX}/include" || exit 1
|
||||
install -m 0644 lib/* "${PREFIX}/lib" || exit 1
|
||||
) || exit 1
|
||||
(
|
||||
cp make.inc.lapack lapack/make.inc
|
||||
cd lapack
|
||||
make -e -j3 || exit 1
|
||||
make -e -j3 lapackelib || exit 1
|
||||
install -m 0644 lapacke/include/* "${PREFIX}/include" || exit 1
|
||||
install -m 0644 lib*.a "${PREFIX}/lib" || exit 1
|
||||
install -m 0444 README LICENSE "${DOCDIR}/lapack"
|
||||
) || exit 1
|
||||
}
|
||||
|
||||
function em.install() {
|
||||
:
|
||||
}
|
||||
|
||||
em.add_to_family 'Compiler'
|
||||
em.set_runtime_dependencies "${COMPILER}"
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
em.cleanup_src
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
cd "${MODULE_SRCDIR}"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
TCL_VERSION='8.6.3'
|
||||
TCL_DIR="${PSI_PREFIX}/Programming/Tcl/${TCL_VERSION}"
|
||||
|
||||
PATH="${TCL_DIR}/bin:${PATH}"
|
||||
|
||||
case ${OS} in
|
||||
Linux )
|
||||
declare -x LIBS="-lz -lpthread"
|
||||
;;
|
||||
Darwin )
|
||||
declare -x LIBS="-lz -framework CoreFoundation"
|
||||
;;
|
||||
esac
|
||||
|
||||
function em.configure() {
|
||||
CPPFLAGS="-DUSE_INTERP_ERRORLINE" "${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PSI_PREFIX}/${MODULE_FAMILY}" \
|
||||
--with-module-path="${PSI_PREFIX}/${PSI_MODULES_ROOT}" \
|
||||
--with-tcl="${TCL_DIR}/lib" \
|
||||
--without-x \
|
||||
|| exit 1
|
||||
}
|
||||
# fake module command
|
||||
module() {
|
||||
:
|
||||
}
|
||||
|
||||
# use system gcc to compile
|
||||
declare -rx CC=gcc
|
||||
|
||||
em.add_to_family 'Tools'
|
||||
em.set_build_dependencies "Tcl/${TCL_VERSION}"
|
||||
em.make_all
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
em.add_to_family 'Tools'
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
module use 'Libraries'
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
--disable-java \
|
||||
--disable-threads \
|
||||
--disable-shared \
|
||||
--enable-relocatable \
|
||||
--disable-openmp \
|
||||
--disable-acl \
|
||||
--disable-curses \
|
||||
--with-included-gettext \
|
||||
--without-libiconv-prefix \
|
||||
--without-libintl-prefix \
|
||||
--with-included-libxml \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
em.add_to_family 'Tools'
|
||||
em.set_build_dependencies "${COMPILER}"
|
||||
em.make_all
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../../lib/libem.bash"
|
||||
source "$(dirname $0)/../../../lib/libem.bash"
|
||||
|
||||
function em.configure() {
|
||||
"${MODULE_SRCDIR}"/configure \
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/lib.bash"
|
||||
|
||||
change_release() {
|
||||
local m=$1
|
||||
local with_modules=()
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
while (( $# > 0 )); do
|
||||
with_modules+=( "--with=$1" )
|
||||
shift
|
||||
done
|
||||
"$(dirname $0)/${m%/*}.build" "${m#*/}" "${with_modules[@]}" "--release=${release}"
|
||||
}
|
||||
|
||||
declare usecmd="${PSI_PREFIX}/${PSI_CONFIG_DIR}/init/extensions/use.bash"
|
||||
declare searchcmd="${PSI_PREFIX}/${PSI_CONFIG_DIR}/init/extensions/search.bash"
|
||||
|
||||
# :FIXME: this does not work ...
|
||||
#eval "${usecmd} deprecated"
|
||||
#eval "${usecmd} unstable"
|
||||
|
||||
release=''
|
||||
with_modules=()
|
||||
modules=()
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
--release=* )
|
||||
release=${1/--release=}
|
||||
;;
|
||||
--with=*/* )
|
||||
with_modules+=( ${1} )
|
||||
;;
|
||||
-* )
|
||||
die 1 "$1: illegal argument"
|
||||
;;
|
||||
*/* )
|
||||
modules+=( $1 )
|
||||
;;
|
||||
* )
|
||||
die 1 "$1: illegal argument"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
#[[ -z ${from_release} ]] && die 1 "--from-release missing"
|
||||
[[ -z ${release} ]] && die 1 "--release missing"
|
||||
while read -a tokens ; do
|
||||
echo "${tokens[@]}"
|
||||
change_release "${tokens[@]}"
|
||||
done < <("${searchcmd}" "${modules[@]}" --no-header -a "${with_modules[@]}" 2>&1)
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname $0)/../lib/lib.bash"
|
||||
|
||||
family=$1
|
||||
shift
|
||||
|
||||
modules=$(egrep -l "[:space:]*[\"\']$family[\"\']" "$(dirname $0)"/*.build || :)
|
||||
|
||||
for m in ${modules}; do
|
||||
"$m" "$@"
|
||||
done
|
||||
Reference in New Issue
Block a user