mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
install: add --disable-compressed-changelog option
Some checks failed
easybuild-tests / framework (Tcl) (push) Has been cancelled
lint-tests / lint-all (push) Has been cancelled
linux-tests / tcl86-nolibtclenvmodules (push) Has been cancelled
linux-tests / tcl85-nolibtclenvmodules (push) Has been cancelled
linux-tests / tcl85-2 (push) Has been cancelled
linux-tests / tcl86 (push) Has been cancelled
linux-tests / tcl85 (push) Has been cancelled
linux-tests / tcl87 (push) Has been cancelled
linux-tests / tcl90 (push) Has been cancelled
windows-tests / native-cmd (push) Has been cancelled
windows-tests / native-pwsh (push) Has been cancelled
windows-tests / cygwin (push) Has been cancelled
windows-tests / msys (push) Has been cancelled
Some checks failed
easybuild-tests / framework (Tcl) (push) Has been cancelled
lint-tests / lint-all (push) Has been cancelled
linux-tests / tcl86-nolibtclenvmodules (push) Has been cancelled
linux-tests / tcl85-nolibtclenvmodules (push) Has been cancelled
linux-tests / tcl85-2 (push) Has been cancelled
linux-tests / tcl86 (push) Has been cancelled
linux-tests / tcl85 (push) Has been cancelled
linux-tests / tcl87 (push) Has been cancelled
linux-tests / tcl90 (push) Has been cancelled
windows-tests / native-cmd (push) Has been cancelled
windows-tests / native-pwsh (push) Has been cancelled
windows-tests / cygwin (push) Has been cancelled
windows-tests / msys (push) Has been cancelled
Add option to control if ChangeLog documentation file should be installed compressed or not. Useful for installation on Gentoo where compression is handled by distribution mechanisms. Fixes #592 Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
This commit is contained in:
@@ -11,4 +11,4 @@ ignore-words-list = ans,ot,ue,fo,haa,varius,tthe,tbe,nin,desig,matchin,compre,in
|
||||
# lib/autom4te.cache/*
|
||||
# skip retrieved content: icdiff, lib/tcl.m4, tcl8.3.5, spack, miniconda3, OpenFOAM-dev
|
||||
# skip pdf papers: doc/paper/*.pdf
|
||||
skip = .git,ChangeLog.gz,modulecmd*.tcl,*doc/build,icdiff,*lib/tcl.m4,tcl8.3.5,spack,miniconda3,OpenFOAM-dev,modules.sum,modules.log,*lib/config.sub,*lib/config.guess,*lib/config.status,*lib/configure,*lib/autom4te.cache/*,*doc/paper/*.pdf
|
||||
skip = .git,ChangeLog*,modulecmd*.tcl,*doc/build,icdiff,*lib/tcl.m4,tcl8.3.5,spack,miniconda3,OpenFOAM-dev,modules.sum,modules.log,*lib/config.sub,*lib/config.guess,*lib/config.status,*lib/configure,*lib/autom4te.cache/*,*doc/paper/*.pdf
|
||||
|
||||
2
.github/workflows/linux_tests.yaml
vendored
2
.github/workflows/linux_tests.yaml
vendored
@@ -132,7 +132,7 @@ jobs:
|
||||
tcl85-2:
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
CONFIGURE_OPTS: --with-tclsh=tclsh8.5 --prefix=/tmp/modules --with-tcl=/usr/local/lib --enable-quarantine-support --enable-silent-shell-debug-support --enable-modulespath --with-pager=more --with-dark-background-colors=hi --with-locked-configs=implicit_default --enable-wa-277 --enable-advanced-version-spec --disable-ml --disable-implicit-requirement --enable-set-shell-startup --enable-path-entry-reorder
|
||||
CONFIGURE_OPTS: --with-tclsh=tclsh8.5 --prefix=/tmp/modules --with-tcl=/usr/local/lib --enable-quarantine-support --enable-silent-shell-debug-support --enable-modulespath --with-pager=more --with-dark-background-colors=hi --with-locked-configs=implicit_default --enable-wa-277 --enable-advanced-version-spec --disable-ml --disable-implicit-requirement --enable-set-shell-startup --enable-path-entry-reorder --disable-compressed-changelog
|
||||
COVERAGE: y
|
||||
EXTRA_SCRIPT_PRETEST: make install-testinitrc-1 install-testetcrc install-testmodspath
|
||||
EXTRA_SCRIPT_POSTTEST: make uninstall-testconfig
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,5 @@
|
||||
/modulecmd.tcl
|
||||
/ChangeLog.gz
|
||||
/ChangeLog*
|
||||
/README
|
||||
/Makefile.inc
|
||||
/version.inc
|
||||
|
||||
@@ -554,6 +554,15 @@ instance :instopt:`--disable-set-manpath<--enable-set-manpath>`):
|
||||
.. versionchanged:: 5.0
|
||||
Configuration option default set to ``yes``
|
||||
|
||||
.. instopt:: --enable-compressed-changelog
|
||||
|
||||
Control if ``ChangeLog`` documentation file should be installed in a
|
||||
compressed format or not. (default=yes)
|
||||
|
||||
.. only:: html or latex
|
||||
|
||||
.. versionadded:: 5.7
|
||||
|
||||
.. instopt:: --enable-conflict-unload
|
||||
|
||||
Apply automated unload of conflicting modulefiles when loading a module.
|
||||
|
||||
36
Makefile
36
Makefile
@@ -56,7 +56,13 @@ ifneq ($(wildcard Makefile.inc),Makefile.inc)
|
||||
endif
|
||||
include Makefile.inc
|
||||
|
||||
INSTALL_PREREQ := modulecmd.tcl ChangeLog.gz README script/add.modules \
|
||||
ifeq ($(compressedchangelog),y)
|
||||
CHANGELOG := ChangeLog.gz
|
||||
else
|
||||
CHANGELOG := ChangeLog
|
||||
endif
|
||||
|
||||
INSTALL_PREREQ := modulecmd.tcl $(CHANGELOG) README script/add.modules \
|
||||
script/modulecmd
|
||||
TEST_PREREQ := $(MODULECMD)
|
||||
ifeq ($(COVERAGE),y)
|
||||
@@ -580,17 +586,19 @@ modulecmd.tcl: tcl/cache.tcl tcl/coll.tcl tcl/envmngt.tcl tcl/init.tcl \
|
||||
|
||||
# generate an empty changelog file if not working from git repository
|
||||
ifeq ($(wildcard .git),.git)
|
||||
ChangeLog.gz: script/gitlog2changelog.py
|
||||
ChangeLog: script/gitlog2changelog.py
|
||||
$(ECHO_GEN)
|
||||
script/gitlog2changelog.py
|
||||
gzip -f -9 ChangeLog
|
||||
else
|
||||
ChangeLog.gz:
|
||||
ChangeLog:
|
||||
$(ECHO_GEN)
|
||||
echo "Please refer to the NEWS document to learn about main changes" >ChangeLog
|
||||
gzip -f -9 ChangeLog
|
||||
echo "Please refer to the NEWS document to learn about main changes" >$@
|
||||
endif
|
||||
|
||||
ChangeLog.gz: ChangeLog
|
||||
$(ECHO_GEN)
|
||||
gzip --keep --force -9 $<
|
||||
|
||||
README:
|
||||
$(ECHO_GEN)
|
||||
sed -e '181,187d' -e '1,10d' -e 's|\[\(.*\?\)\]\[[0-9]\]|\1|' $@.md > $@
|
||||
@@ -723,7 +731,7 @@ endif
|
||||
ifeq ($(docinstall),y)
|
||||
$(INSTALL_DIR) '$(DESTDIR)$(docdir)'
|
||||
$(INSTALL_DATA) COPYING.GPLv2 '$(DESTDIR)$(docdir)/'
|
||||
$(INSTALL_DATA) ChangeLog.gz '$(DESTDIR)$(docdir)/'
|
||||
$(INSTALL_DATA) $(CHANGELOG) '$(DESTDIR)$(docdir)/'
|
||||
$(INSTALL_DATA) README '$(DESTDIR)$(docdir)/'
|
||||
endif
|
||||
ifeq ($(vimaddons),y)
|
||||
@@ -800,7 +808,7 @@ ifeq ($(nagelfaraddons),y)
|
||||
-rmdir -p '$(DESTDIR)$(nagelfardatadir)'
|
||||
endif
|
||||
ifeq ($(docinstall),y)
|
||||
rm -f $(foreach docfile,ChangeLog.gz README COPYING.GPLv2,'$(DESTDIR)$(docdir)/$(docfile)')
|
||||
rm -f $(foreach docfile,$(CHANGELOG) README COPYING.GPLv2,'$(DESTDIR)$(docdir)/$(docfile)')
|
||||
ifeq ($(builddoc),n)
|
||||
rmdir '$(DESTDIR)$(docdir)'
|
||||
endif
|
||||
@@ -827,12 +835,12 @@ endif
|
||||
|
||||
# include pre-generated documents not to require documentation build
|
||||
# tools when installing from dist tarball
|
||||
dist-tar: ChangeLog.gz share/rpm/environment-modules.spec pkgdoc
|
||||
dist-tar: $(CHANGELOG) share/rpm/environment-modules.spec pkgdoc
|
||||
$(ECHO_GEN2) $(DIST_PREFIX).tar
|
||||
git archive --prefix=$(DIST_PREFIX)/ --worktree-attributes \
|
||||
-o $(DIST_PREFIX).tar HEAD
|
||||
tar -rf $(DIST_PREFIX).tar --transform 's,^,$(DIST_PREFIX)/,' \
|
||||
lib/configure lib/config.h.in $(DIST_AUTORECONF_EXTRA) ChangeLog.gz \
|
||||
lib/configure lib/config.h.in $(DIST_AUTORECONF_EXTRA) $(CHANGELOG) \
|
||||
doc/build/MIGRATING.txt doc/build/changes.txt doc/build/INSTALL.txt \
|
||||
doc/build/INSTALL-win.txt doc/build/NEWS.txt doc/build/CONTRIBUTING.txt \
|
||||
doc/build/module.1.in doc/build/ml.1 doc/build/envml.1 \
|
||||
@@ -850,7 +858,7 @@ dist-bzip2: dist-tar
|
||||
dist: dist-gzip
|
||||
|
||||
# dist zip ball for Windows platform with all pre-generated relevant files
|
||||
dist-win: modulecmd.tcl ChangeLog.gz README pkgdoc
|
||||
dist-win: modulecmd.tcl $(CHANGELOG) README pkgdoc
|
||||
$(ECHO_GEN2) $(DIST_WIN_PREFIX).zip
|
||||
$(INSTALL_DIR) $(DIST_WIN_PREFIX)
|
||||
$(INSTALL_DIR) $(DIST_WIN_PREFIX)/libexec
|
||||
@@ -861,7 +869,7 @@ dist-win: modulecmd.tcl ChangeLog.gz README pkgdoc
|
||||
$(INSTALL_PROGRAM) script/envml.cmd $(DIST_WIN_PREFIX)/bin/
|
||||
$(INSTALL_DIR) $(DIST_WIN_PREFIX)/doc
|
||||
$(INSTALL_DATA) COPYING.GPLv2 $(DIST_WIN_PREFIX)/doc/
|
||||
$(INSTALL_DATA) ChangeLog.gz $(DIST_WIN_PREFIX)/doc/
|
||||
$(INSTALL_DATA) $(CHANGELOG) $(DIST_WIN_PREFIX)/doc/
|
||||
$(INSTALL_DATA) README $(DIST_WIN_PREFIX)/doc/
|
||||
$(INSTALL_DATA) doc/build/MIGRATING.txt $(DIST_WIN_PREFIX)/doc/
|
||||
$(INSTALL_DATA) doc/build/INSTALL-win.txt $(DIST_WIN_PREFIX)/doc/
|
||||
@@ -892,7 +900,7 @@ clean:
|
||||
rm -rf coverage
|
||||
# do not clean generated docs if not in git repository
|
||||
ifeq ($(wildcard .git),.git)
|
||||
rm -f ChangeLog.gz
|
||||
rm -f ChangeLog*
|
||||
endif
|
||||
rm -f README
|
||||
rm -f modulecmd.tcl
|
||||
@@ -1138,7 +1146,7 @@ $(V).SILENT: initdir pkgdoc doc version.inc share/rpm/environment-modules.spec \
|
||||
tcl/cache.tcl_i tcl/coll.tcl_i tcl/envmngt.tcl_i tcl/init.tcl_i tcl/interp.tcl_i \
|
||||
tcl/main.tcl_i tcl/mfcmd.tcl_i tcl/modfind.tcl_i tcl/modeval.tcl_i \
|
||||
tcl/modscan.tcl_i tcl/modspec.tcl_i tcl/report.tcl_i tcl/subcmd.tcl_i \
|
||||
tcl/util.tcl_i ChangeLog.gz README script/add.modules \
|
||||
tcl/util.tcl_i ChangeLog ChangeLog.gz README script/add.modules \
|
||||
script/gitlog2changelog.py script/modulecmd \
|
||||
lib/libtclenvmodules$(SHLIB_SUFFIX) lib/libtestutil-closedir$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-getpwuid$(SHLIB_SUFFIX) lib/libtestutil-getgroups$(SHLIB_SUFFIX) \
|
||||
|
||||
@@ -63,6 +63,8 @@ initconfin := @initconfin@
|
||||
builddoc := @builddoc@
|
||||
# able to use manpath cmd to get currently set manpath
|
||||
usemanpath := @usemanpath@
|
||||
# compress ChangeLog file
|
||||
compressedchangelog := @compressedchangelog@
|
||||
|
||||
# logger setup
|
||||
loggedevents := @loggedevents@
|
||||
|
||||
4
NEWS.rst
4
NEWS.rst
@@ -50,6 +50,10 @@ Modules 5.7.0 (not yet released)
|
||||
* Doc: add manual page for :ref:`modulecmd(1)` command.
|
||||
* Make :mfcmd:`getenv` modulefile command available from module rc file
|
||||
evaluation context. (fix issue #588)
|
||||
* Install: add installation option
|
||||
:instopt:`--disable-compressed-changelog<--enable-compressed-changelog>` to
|
||||
cope with packaging process handling documentation file compression at their
|
||||
level. (fix issue #592)
|
||||
|
||||
|
||||
.. _5.6 release notes:
|
||||
|
||||
11
configure
vendored
11
configure
vendored
@@ -41,7 +41,7 @@ listterseoutput editor variantshortcut bashcompletiondir fishcompletiondir \
|
||||
zshcompletiondir tcllinter tcllinteropts nagelfardatadir nagelfaraddons \
|
||||
stickypurge uniquenameloaded abortonerror sourcecache logger loggeropts \
|
||||
loggedevents conflictunload spideroutput spiderterseoutput spiderindepth \
|
||||
emacsdatadir emacsaddons requirevia"
|
||||
emacsdatadir emacsaddons requirevia compressedchangelog"
|
||||
libarglist=()
|
||||
|
||||
# flags to know if argument has been specified on command-line
|
||||
@@ -88,6 +88,7 @@ PYTHON=python
|
||||
SPHINXBUILD=sphinx-build
|
||||
builddoc=y
|
||||
usemanpath=y
|
||||
compressedchangelog=y
|
||||
PS='ps'
|
||||
BASENAME='basename'
|
||||
RMDIR_IGN_NON_EMPTY='rmdir'
|
||||
@@ -251,6 +252,9 @@ Optional Features:
|
||||
--enable-color control colored output. \`yes' equals to the \`auto'
|
||||
color mode. \`no' equals to the \`never' color mode
|
||||
[yes]
|
||||
--enable-compressed-changelog
|
||||
install \`ChangeLog' file in a compressed format
|
||||
[yes]
|
||||
--enable-conflict-unload
|
||||
set modulecmd.tcl to automatically unload modules
|
||||
that conflict with modules to load and the dependent
|
||||
@@ -735,6 +739,9 @@ for arg in "$@"; do
|
||||
--enable-doc-install*|--disable-doc-install)
|
||||
# shellcheck disable=SC2034
|
||||
docinstall=$(get_feature_value "$arg") ;;
|
||||
--enable-compressed-changelog*|--disable-compressed-changelog)
|
||||
# shellcheck disable=SC2034
|
||||
compressedchangelog=$(get_feature_value "$arg") ;;
|
||||
--enable-vim-addons*|--disable-vim-addons)
|
||||
# shellcheck disable=SC2034
|
||||
vimaddons=$(get_feature_value "$arg") ;;
|
||||
@@ -1086,7 +1093,7 @@ else
|
||||
fi
|
||||
|
||||
# gzip is mandatory if installing from git repository to build ChangeLog.gz
|
||||
if [ $work_from_git_repo -eq 0 ]; then
|
||||
if [ "$compressedchangelog" = 'y' ] && [ $work_from_git_repo -eq 0 ]; then
|
||||
check_requirement gzip
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user