Silently include version.inc in main, doc and init Makefiles to avoid
'Makefile:349: version.inc: No such file or directory' warning message
when version.inc needs to be rebuilt prior being loaded.
Print generated file names rather commands executed to generate these
files on makefile build targets. Output when making Modules is this way
simplified. When option `V=1` is passed to make verbose mode is enabled
and executed commands are shown.
Simplified make output does not apply to the install, uninstall, test,
clean, distclean targets and their relatives.
Check at configure step if pre-built documents are available, if found
Sphinx-related makefile rules are inhibited. Otherwise Sphinx
availability is tested and documentation build is disabled if not found.
No more exclusion of project-related or installation documents from git
archive distribution. Enable makefile rules relative to Sphinx
documentation build even if not building from git repository. With
release distribution tarballs nothing changes as document is pre-built
in these archives. When working from a `git archive` export, these
Sphinx rules will help to build docs.
If no sphinx-build found, warn user but still make it possible to build
and install Modules (without the documentation).
Enables to install Modules from git repository for test purpose on
systems where python-sphinx is not available in regular pakage
repositories.
Add the possibility to setup a site-specific configuration Tcl script
which will be sourced at the start of modulecmd.tcl. This site-specific
Tcl script enables to supersede global variable and procedure definition
made in modulecmd.tcl. This way local adaptations can be made without
editing the modulecmd.tcl script.
'--etcdir' configure option is added to specify the location of the
site-specific configuration script.
Use sed instead of perl in configure and Makefile scripts as perl is not
required anymore to build documentation. sed is a lighter requirement to
build and install software.
Change makefile to build doc with sphinx rather pod. Docs are now
pregenerated in dist-tarball, to avoid requiring documentation build
tool when installing from these dist-tarball.
Adapt travis conf & RPM spec file to the new documentation build
process.
Introduce a version.inc file sourced by Makefiles, that holds release
number and build information. Makefiles use these information to set
correct version number in manpages and modulecmd.tcl script.
version.inc is present in dist tarball. This file is generated from
version.inc.in file by main Makefile when working in git repository.
Release information are retrieved from the tags of the git repository.
Release number corresponds to last git tag set. Build number is the
result of the 'git describe' command: this information helps to know
from what git branch and commit the current build is made of.
Introduce '--enable-compat-version' configure argument to configure and
build compatibility (C) version in addition to main version.
This compatibility version is located in the 'compat' directory, which
is automatically populated with 'c-master' git branch if we work in the
git repository.
'configure' script is adapted to run the compatibility version relative
configure script. Unknown command-line arguments are passed down to this
script, which raise error if these arguments are not known there either.
Some compatibility version configure script argument are also
incompatible in this dual installation mode, so an error is raised
(--enable-versioning for instance).
Build process will generate and install modulecmd-compat, module-compat.1
and modulefile-compat.4 from this compatibility version. 'compat' suffix
enables clear distinction with main version files.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Make use of './configure' information to set a precise tclsh shebang on
modulecmd.tcl script. This change requires to move modulecmd.tcl to
modulecmd.tcl.in within repository.
Shebang is set to '@TCLSHDIR@/tclsh' rather just '@TCLSH@' in
modulecmd.tcl.in to help forge code determines that this file is a Tcl
script.
Generate a shared 'Makefile.inc' file rather all 'Makefile's at
configure time. Avoid init/Makefile being rebuilt by initscript '%.in'
rules.
Correct 'all' rule typo in doc/Makefile.
Enforce '.modulespath' symlink creation when usecverdotmodulespath is
enabled.
Add a 'configure' shell script to generate Makefiles, rather than
choosing installtion directories or enabled features a the 'make' step.
By doing so, installation process is clearer and closer to build
conventions.
Use a custom 'configure' shell script rather than using autoconf and
automake tool suites in order to keep good readability of Makefiles.
Moreover our build use case is relatively small since nothing is
complied so there is no real benefit of using autoconf/automake.
Adapt Makefiles to this 'configure' change and add 'distclean' target.
Build a distribution tarball from the git repository content with the
'dist' make target.
Add gitattributes to exclude git-specific and website-specific content
in distribution tarball. Also exclude user home directory template from
dist tarball as its content has a very large size and may not apply to
everybody.
Adapt parts of Makefiles to behave correctly when ran from a
distribution tarball, not from the git repository.
Use same process than init scripts to translate module documentation
from configure-like pattern (@prefix@, @initdir@, etc) to the path name
chosen for installation.
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).
Separate documentation generation in a dedicated Makefile put in the doc
directory. Generate documentation in a more 'Makefile' fashion, with
a target per document file.