mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
When --enable-versioning is set at configure time, deploy the setup of the MODULE_VERSION and MODULE_VERSION_STACK environment variables in modulecmd.tcl and in a version-specific modulefile. This version-specific modulefile is deployed in a @baseprefix@/versions modulepath directory, which is also created specifically for versioning installation mode. MODULE_VERSION and MODULE_VERSION_STACK environment variables setup in modulecmd.tcl is commented if versioning installation mode is not enabled rather deleted to guaranty consistency across code coverage tests (same code line numbering whatever the installation options set). version-specific modulefile is a bit different than the one used before <4.0 as now module version is initialized when loading this module by calling the autoinit action on the modulecmd.tcl script. These version-specific modulefiles enable to switch from one module version to another but there is an incompatibility of initialization between Modules 3.2 and Modules >=4. Switching from Modules 3.2 to Modules >4 will be possible, but not going back from >4 to version 3.2.
27 lines
716 B
Plaintext
27 lines
716 B
Plaintext
#%Module1.0#####################################################################
|
|
##
|
|
## modules modulefile
|
|
##
|
|
proc ModulesHelp { } {
|
|
global version prefix
|
|
|
|
puts stderr "\tmodules - loads the modules software & application environment"
|
|
puts stderr "\n\tThis adds $prefix/* to several of the"
|
|
puts stderr "\tenvironment variables."
|
|
puts stderr "\n\tVersion $version\n"
|
|
}
|
|
|
|
module-whatis "loads the modules environment"
|
|
|
|
# for Tcl script use only
|
|
set version @VERSION@
|
|
set prefix @prefix@
|
|
|
|
|
|
setenv MODULESHOME $prefix
|
|
prepend-path PATH @bindir@
|
|
prepend-path MANPATH @mandir@
|
|
|
|
# enable module versioning modulepath
|
|
@VERSIONING@module use @baseprefix@/versions
|