mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-07-03 12:20:49 +02:00
implement overlay support in build-system
This commit is contained in:
@@ -246,7 +246,7 @@ set_full_module_name_and_prefix() {
|
||||
# set full module name
|
||||
fully_qualified_module_name=$( join_by '/' "${name[@]}" )
|
||||
# set PREFIX of module
|
||||
PREFIX="${PMODULES_ROOT}/${GROUP}/"
|
||||
PREFIX="${overlay}/${GROUP}/"
|
||||
local -i i=0
|
||||
for ((i=${#name[@]}-1; i >= 0; i--)); do
|
||||
PREFIX+="${name[i]}/"
|
||||
@@ -916,7 +916,7 @@ pbuild::make_all() {
|
||||
return
|
||||
fi
|
||||
# assemble name of modulefile
|
||||
local dst="${PMODULES_ROOT}/"
|
||||
local dst="${overlay}/"
|
||||
dst+="${GROUP}/"
|
||||
dst+="${PMODULES_MODULEFILES_DIR}/"
|
||||
dst+="${fully_qualified_module_name}"
|
||||
@@ -932,7 +932,7 @@ pbuild::make_all() {
|
||||
}
|
||||
|
||||
install_release_file() {
|
||||
local dst="${PMODULES_ROOT}/"
|
||||
local dst="${overlay}/"
|
||||
dst+="${GROUP}/"
|
||||
dst+="${PMODULES_MODULEFILES_DIR}/"
|
||||
dst+="${fully_qualified_module_name}"
|
||||
@@ -1082,7 +1082,7 @@ pbuild::make_all() {
|
||||
fi
|
||||
|
||||
# assemble name of modulefile
|
||||
local dst="${PMODULES_ROOT}/"
|
||||
local dst="${overlay}/"
|
||||
dst+="${GROUP}/"
|
||||
dst+="${PMODULES_MODULEFILES_DIR}/"
|
||||
dst+="${fully_qualified_module_name}"
|
||||
@@ -1262,7 +1262,7 @@ pbuild.bootstrap() {
|
||||
|
||||
MODULECMD=$(which true)
|
||||
GROUP='Tools'
|
||||
PREFIX="${PMODULES_ROOT}/${GROUP}/Pmodules/${PMODULES_VERSION}"
|
||||
PREFIX="${overlay}/${GROUP}/Pmodules/${PMODULES_VERSION}"
|
||||
|
||||
C_INCLUDE_PATH="${PREFIX}/include"
|
||||
CPLUS_INCLUDE_PATH="${PREFIX}/include"
|
||||
|
||||
+11
-1
@@ -67,7 +67,7 @@ BUILD-STEPS OPTIONS:
|
||||
--all
|
||||
Run throu all steps including cleanup.
|
||||
|
||||
--update-modulefiles
|
||||
-update-modulefiles
|
||||
Only install the modulefile and set the release.
|
||||
|
||||
MISCELLANEOUS OPTIONS:
|
||||
@@ -111,6 +111,8 @@ MISCELLANEOUS OPTIONS:
|
||||
--tmpdir
|
||||
Directory used for building a module.
|
||||
|
||||
--overlay
|
||||
Install in this overlay. Defaults to '${PMODULES_ROOT}'.
|
||||
"
|
||||
exit 1
|
||||
}
|
||||
@@ -126,6 +128,7 @@ declare opt_all_variants='no'
|
||||
declare opt_bootstrap='no'
|
||||
# array collecting all modules specified on the command line via '--with=module'
|
||||
declare -a opt_with_modules=()
|
||||
declare overlay=''
|
||||
declare build_config='modbuild.conf'
|
||||
declare system="$(uname -s)"
|
||||
|
||||
@@ -225,6 +228,12 @@ parse_args() {
|
||||
--update-modulefiles )
|
||||
pbuild.update_modulefiles 'yes'
|
||||
;;
|
||||
--overlay )
|
||||
overlay=$2
|
||||
;;
|
||||
--overlay=* )
|
||||
overlay=${1*=}
|
||||
;;
|
||||
-* )
|
||||
std::die 1 "Invalid option -- '$1'"
|
||||
;;
|
||||
@@ -379,6 +388,7 @@ source "${build_config}" || \
|
||||
source libpbuild.bash || \
|
||||
std::die 3 "Oops: Cannot source library -- '$_'"
|
||||
|
||||
[[ -z "${overlay}" ]] && overlay=${PMODULES_ROOT}
|
||||
|
||||
declare -r BUILD_SCRIPT
|
||||
declare -r BUILDBLOCK_DIR
|
||||
|
||||
Reference in New Issue
Block a user