Commit Graph

49 Commits

Author SHA1 Message Date
Xavier Delaruelle
09e9251e18 install: remove compat version-related rules 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
b41655eb30 install: silently include version.inc in Makefiles
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.
2021-02-17 16:04:04 +01:00
Xavier Delaruelle
cfa6995fa8 install: doc cannot be built in parallel 2021-02-17 16:04:04 +01:00
Xavier Delaruelle
5473b7f17d install: silent compat version make build 2021-02-17 16:04:04 +01:00
Xavier Delaruelle
7518083803 install: no include of version.inc for 'clean' make goals 2021-02-17 16:04:04 +01:00
Xavier Delaruelle
798f454a93 install: put 'all' rule first in doc Makefile 2021-02-17 16:04:04 +01:00
Xavier Delaruelle
d3b45ff648 install: build ../version.inc from init/doc Makefiles
Add makefile rule to build ../version.inc file if missing from the init
and doc Makefiles.
2021-02-17 16:04:04 +01:00
Xavier Delaruelle
6f82545fa9 install: no print directory change for build make targets
Pass the --no-print-directory option to the make commands which are
silenced by default.
2021-02-17 16:04:04 +01:00
Xavier Delaruelle
94df593f4a install: pretty print on makefile build targets
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.
2021-02-17 16:04:03 +01:00
Xavier Delaruelle
bd91faedca install: improve doc-related makefile rules 2021-02-17 16:03:01 +01:00
Xavier Delaruelle
976e92c584 install: no html doc build if docs are pre-built
Disable the Makefile rules to build the HTML documentation in case if
the documentation is found pre-built in the dist archive.
2021-02-06 13:03:35 +01:00
Xavier Delaruelle
ed38a98c6c install: need sphinx if dist does not contain prebuilt doc
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.
2020-01-31 08:08:24 +01:00
Xavier Delaruelle
ea931f13d3 install: no exclude of doc files from git archive dist
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.
2020-01-31 06:39:06 +01:00
Xavier Delaruelle
0a2fbed5e2 install: do not clean ml.1 on 'make clean' if pre-built 2020-01-29 20:31:30 +01:00
Xavier Delaruelle
7eb91c142d doc: transform INSTALL-win.txt into INSTALL-win.rst 2020-01-17 21:39:22 +01:00
Xavier Delaruelle
39658239d7 doc/rpm: add ml man page 2020-01-09 20:38:50 +01:00
Xavier Delaruelle
c15785234b install: fix CONTRIBUTING guide build and install 2019-03-23 06:57:05 +01:00
Xavier Delaruelle
474814cbb1 install: give ability to install without doc built
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.
2018-01-24 08:19:30 +01:00
Xavier Delaruelle
2d6dd7c9e6 doc/Makefile: Use $(MAKE) variable for recursive cmds 2018-01-22 20:46:25 +01:00
Xavier Delaruelle
353b9d662c Introduce @etcdir@/siteconfig.tcl script
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.
2017-12-23 18:22:20 +01:00
Xavier Delaruelle
29f9afe7c6 doc: migrate NEWS doc from TXT to RST 2017-10-14 09:40:29 +02:00
Xavier Delaruelle
897084023f doc: migrate INSTALL doc from TXT to RST 2017-10-14 09:29:42 +02:00
Xavier Delaruelle
2f6bf21b77 doc: migrate MIGRATING doc from MD to RST
To integrate it into sphinx process and make it available on the Web.
2017-10-14 09:29:42 +02:00
Xavier Delaruelle
7d93c42f32 install: use rm rather sphinx to clean built docs 2017-10-09 07:16:48 +02:00
Xavier Delaruelle
7de4c10bcc install: use sed rather perl for substitutions
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.
2017-10-07 17:57:08 +02:00
Xavier Delaruelle
e80f170de8 install: broader usage of makefile translate-in-script 2017-10-07 16:15:52 +02:00
Xavier Delaruelle
b1dc5ea1e2 install: rm doc BUILD_DIR if exists only 2017-10-07 16:13:50 +02:00
Xavier Delaruelle
eb5849ec92 install: adapt doc build process to sphinx
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.
2017-10-07 15:11:19 +02:00
Xavier Delaruelle
af3e6401da install: set manpage date to modules build date 2017-09-30 22:03:37 +02:00
Xavier Delaruelle
762eb282c0 install: make doc only install man and txt
No install of HTML files, so no need to build them at make install.
2017-09-30 21:56:28 +02:00
Xavier Delaruelle
429215f9b7 install: handle version number through git tags
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.
2017-09-30 21:47:26 +02:00
Xavier Delaruelle
8ec675c299 Release of version 4.0.0-beta
Adapt testsuite to take new release name in account.
2017-09-25 18:23:48 +02:00
Xavier Delaruelle
2a430cdd8c doc: rename diff_with_c-version to diff_v3_v4 2017-09-25 18:23:48 +02:00
Xavier Delaruelle
ad3ad5c98d Rename Modules-Tcl > Modules in docs and install scripts 2017-09-15 06:15:07 +02:00
Xavier Delaruelle
1cdae156ff install: --enable-compat-version to build compat vers
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.
2017-09-13 06:12:49 +02:00
Xavier Delaruelle
9006a3baab install: avoid make to rebuild Makefile.inc 2017-09-03 15:56:08 +02:00
Xavier Delaruelle
ec0f3eb2e2 More standard shebang for modulecmd.tcl
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.
2017-08-17 19:47:35 +02:00
Xavier Delaruelle
b6d4404153 install: fix Makefile generation flaws
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.
2017-08-11 23:13:05 +02:00
Xavier Delaruelle
b47c4407fe install: introduce a 'configure' step
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.
2017-03-06 06:09:15 +01:00
Xavier Delaruelle
a15e1f9e5c install: add a 'dist' make 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.
2017-03-06 06:09:15 +01:00
Xavier Delaruelle
e4398d4c4d install: add an 'uninstall' make target 2017-03-06 06:09:15 +01:00
Xavier Delaruelle
a8207ff45f install: add modulefilesdir configuration option
@modulefilesdir@ enables to set the default system-wide modulefiles
directory as described in module.1 man page.
2017-03-06 06:09:14 +01:00
Xavier Delaruelle
1c9b4bdc2c doc: adapt module doc to path used for install
Use same process than init scripts to translate module documentation
from configure-like pattern (@prefix@, @initdir@, etc) to the path name
chosen for installation.
2017-03-06 05:37:49 +01:00
Xavier Delaruelle
e3d5dc5642 doc: make a txt version of diff_with_c-version doc
And include this txt version in the documentation directory made for
installation.
2017-03-06 05:37:38 +01:00
Xavier Delaruelle
99668416d8 Introduce an installation process
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).
2017-03-06 05:32:37 +01:00
Xavier Delaruelle
6fd30568f4 doc: Introduce diff_with_c-version.pod document 2017-02-02 06:41:27 +01:00
Xavier Delaruelle
de1d8be2b7 doc: add a minimal css file to render html docs 2017-02-02 06:41:27 +01:00
Xavier Delaruelle
eb018d840e doc: use .pod extension for POD documents
This way these files are automatically recognized as POD files and
the appropriate syntax highlight mode is automatically set.
2017-01-20 15:24:41 -06:00
Xavier Delaruelle
39627107a7 Create a doc-specific Makefile
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.
2017-01-20 15:24:36 -06:00