Commit Graph

3 Commits

Author SHA1 Message Date
Xavier Delaruelle
ff145a56fc init: mention possible config set in modulerc 2019-07-05 21:42:34 +02:00
Xavier Delaruelle
3fe71c0d74 Relax magic cookie constraint on source command
As files sourced by a 'module source' command may be managed outside of
the modulefile environment, relax the constraint of having a specific
magic cookie at the start of the file to get required clearance before
evaluation. This is typicaly helpful for the initialization modulerc
file that may loose its magic cookie after some manual edits.

Add non-regression tests in 090-source of 70-maint suite.
2017-04-17 21:29:45 +02:00
Xavier Delaruelle
6fa0b5d950 init: generate modulerc and .modulespath configs
Add makefile rules to generate the modulerc and .modulespath
configuration files. modulerc is generated in any case. By default it
hosts the MODULEPATH and LOADEDMODULES definition passed to the Makefile
with the 'modulepath' and 'loadedmodules' argument.

The 'setdotmodulespath' Makefile argument is also introduced. When set
to 'y', the .modulespath is generated and hosts the MODULEPATH
definition. In this case, modulerc config file only gets the
LOADEDMODULES definition or is set empty if no value is passed to the
'loadedmodules' argument.
2017-03-06 06:09:14 +01:00