Merge branch '268-build-system-implement-a-check-mode' into 'master'

Resolve "build-system: implement a check-mode"

Closes #268

See merge request Pmodules/src!245
This commit is contained in:
2024-05-02 17:32:51 +02:00
2 changed files with 7 additions and 41 deletions
-40
View File
@@ -972,46 +972,6 @@ _build_module() {
[[ :${LOADEDMODULES}: =~ :$1: ]]
}
#......................................................................
#
# Initialise environment modules.
#
# Arguments:
# none
#
init_module_environment(){
eval $( "${MODULECMD}" bash use unstable )
eval $( "${MODULECMD}" bash use deprecated )
eval $( "${MODULECMD}" bash purge )
# :FIXME: this is a hack!!!
# shouldn't this be set in the build-script?
if [[ -e "${PMODULES_HOME%%/Tools*}/Libraries" ]]; then
eval $( "${MODULECMD}" bash use Libraries )
fi
if [[ -e "${PMODULES_HOME%%/Tools*}/System" ]]; then
eval $( "${MODULECMD}" bash use System )
fi
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset CPP_INCLUDE_PATH
unset LIBRARY_PATH
unset LD_LIBRARY_PATH
unset DYLD_LIBRARY_PATH
unset CFLAGS
unset CPPFLAGS
unset CXXFLAGS
unset LIBS
unset LDFLAGS
unset CC
unset CXX
unset FC
unset F77
unset F90
}
#......................................................................
#
# Load build- and run-time dependencies.
+7 -1
View File
@@ -48,7 +48,7 @@ else
fi
# for the time being, we still set PATH. Just in case we forgot a binary
PATH='/usr/bin:/bin:/usr/sbin:/sbin'
PATH="${PMODULES_HOME}/bin:/usr/bin:/bin:/usr/sbin:/sbin"
##############################################################################
source "${mydir}/../lib/libpbuild.bash" || \
@@ -188,6 +188,7 @@ declare -A opt_with_dict=()
declare -- opt_config_file=''
declare -- opt_debug='no'
declare -- opt_yaml='yes'
declare -- opt_check_mode='no'
declare -- opt_variant=''
declare -- opt_clean_install='no'
declare -- opt_parent_prefix=''
@@ -285,6 +286,9 @@ parse_args() {
--yaml )
opt_yaml='yes'
;;
--check-mode )
opt_check_mode='yes'
;;
--legacy )
opt_yaml='no'
;;
@@ -1077,6 +1081,7 @@ build_modules_yaml_v1(){
(( ${#opt_with_modules[@]} != 0 )) \
&& [[ "${compiler}" != "${opt_with_modules[0]}" ]] \
&& continue
[[ "${opt_check_mode}" == 'yes' ]] && continue
pbuild.build_module_yaml \
"${module_name}" "${module_version}" \
"$3" \
@@ -1530,6 +1535,7 @@ debug(){
#.............................................................................
# main
init_module_environment
parse_args "$@"
pbuild.jobs "${opt_jobs}"
pbuild.force_rebuild "${opt_force_rebuild}"