diff --git a/CHANGELOG.md b/CHANGELOG.md index d95ca37..b913166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,11 @@ * The number of directory components to be removed while un-taring can now be configured in the YAML configuration file. If not specified, 1 is used as default. (issue #252) +* Arguments to CMake/autotools can now be append to the default + arguments with the 'configure_args+' key in the YAML + configuration file. Patch-files can be appended with the + 'patch_file+' key and doc-files with 'docfiles+'. + (issue #257) ## Version 1.1.18 ### modulecmd diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index b348596..85031d3 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -633,12 +633,15 @@ declare -A Yaml_default_config=( ["compile_in_sourcetree"]='no' # !!str ["configure_with"]='auto' # !!str ["configure_args"]='' # !!seq of strings + ["configure_args+"]='' # !!seq of strings ["default_variant"]='' # !!str ["docfiles"]='' # !!seq of strings + ["docfiles+"]='' # !!seq of strings ["group"]='Tools' # !!str ["group_deps"]='' # !!map ["overlay"]='base' # !!str ["patch_files"]='' # !!seq + ["patch_files+"]='' # !!seq ["relstage"]='unstable' # !!str ["runtime_deps"]='' # !!seq of strings ["script"]='build' # !!str @@ -805,6 +808,16 @@ build_modules_yaml_v1(){ get_seq "${yaml_input}" value "${key}" cfg[${key,,}]="${value}" ;; + 'configure_args+' | 'docfiles+' | 'patch_files+' ) + get_seq "${yaml_input}" value "${key}" + key="${key:0:-1}" + if [[ -z "${cfg[${key,,}]}" ]]; then + cfg[${key,,}]="${value}" + else + cfg[${key,,}]+=$'\n'"${value}" + fi + ;; + * ) std::die 3 "%s '%s' in %s" \ "Oops unhandled key" \