summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-04-05 06:37:54 (GMT)
committerAlexey Neyman <stilor@att.net>2018-04-07 19:03:17 (GMT)
commit20e8402779db3d47856b45b31e5f3d76c8554a55 (patch)
tree440162bd18e25bd7b7965c5080efa42fb677e520 /Makefile.am
parentb670aaf1ad5ed2531079a7992b6feb87c0b3b9ea (diff)
Compress the manpage
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 88ac882..cfe5210 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,9 @@ man1_MANS = docs/ct-ng.1
# paths.sh generated by configure
nobase_dist_pkgdata_DATA = $(verbatim_data) paths.sh
+# ct-ng, as renamed by the installation
+ctng_progname = `echo ct-ng | sed '$(transform)'`
+
USER_MANUAL_FILES = \
docs/manual/1_Introduction.md \
docs/manual/2_Installation.md \
@@ -44,7 +47,7 @@ do_subst = ( @SED@ \
-e 's,[@]docdir[@],$(docdir),g' \
-e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
-e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' \
- -e 's,[@]progname[@],'`echo ct-ng | sed '$(transform)'`',g' \
+ -e 's,[@]progname[@],'$(ctng_progname)',g' \
| $(SHELL) config.status --file=- )
ct-ng: ct-ng.in Makefile
@@ -56,5 +59,12 @@ docs/ct-ng.1: docs/ct-ng.1.in Makefile
bash-completion/ct-ng: bash-completion/ct-ng.in Makefile
$(AM_V_GEN)$(MKDIR_P) bash-completion && $(do_subst) < $< >$@-t && mv -f $@-t $@
+# automake doesn't offer an option to compress manpages, do it after installation
+install-data-hook:
+ gzip -9 $(DESTDIR)$(man1dir)/$(ctng_progname).1
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(man1dir)/$(ctng_progname).1.gz
+
dist-hook: maintainer/download-docs.sh
$< $(top_distdir) $(USER_MANUAL_FILES)