mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
Introduce an 'install' target in makefiles to provide an installation process for modules-tcl. Defines installation paths with Makefile variables in order to avoid having a ./configure step. Install paths are set during the 'make' step by passing 'prefix', 'libexecdir', 'mandir', etc arguments to the make command. If no path definitions are passed to the 'make' command, installation will be made in '/usr/local/modules-tcl' by default. Installation paths provided (or set from the default value found in Makefile) are saved at the 'make' step in a .makeinstallpath file. Then at the 'make install' step, this .makeinstallpath file is read and make knows where to install modules-tcl. These paths definitions are also used to translate *.in init script to their installed version. modulecmd.tcl script is by default set to be installed in the libexec directory to follow FHS specification (as this script is an executable but not directly accessed by users).
---------------------------------------
Instructions
---------------------------------------
1. Instruct users to add this to their shell init scripts.
If using sh/bash/ksh/zsh, add this to .profile
eval `tclsh /path/to/modulecmd.tcl sh autoinit`
If using csh/tcsh, add this to .login
eval `tclsh /path/to/modulecmd.tcl csh autoinit`
If using perl, put this in your script
eval `tclsh /path/to/modulecmd.tcl perl autoinit`;
2. edit 'modulerc' as needed to point to the default modulefile
directories. This file is sourced for all users. This file can
be either in the init/ subdirectory, or the same directory as the
modulecmd.tcl, or both (not recommended).
NB. For backwards compatibility, the old init scripts are still here,
but they should be removed as soon as the new autoinit feature is
sufficiently tested.