[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Shepherd][PATCH 4/4] doc: Move man pages to the 'doc' directory.
From: |
Mathieu Lirzin |
Subject: |
[Shepherd][PATCH 4/4] doc: Move man pages to the 'doc' directory. |
Date: |
Wed, 27 Jan 2016 21:45:34 +0100 |
* Makefile.am (man-page-target): Delete function.
(dist_man1_MANS, dist_man8_MANS): Prefix each element with 'doc/'.
(shepherd.1): Rename to ...
(doc/shepherd.1): ... this.
(doc/%.1, doc/%.8): New targets.
(gen_man): New variable.
* .gitignore: Update it.
---
.gitignore | 4 ++--
Makefile.am | 27 ++++++++++-----------------
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/.gitignore b/.gitignore
index 111817f..632dafe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,6 @@
*~
,*
.dirstamp
-/*.1
-/*.8
/INSTALL
/aclocal.m4
/autom4te.cache
@@ -13,6 +11,8 @@
/config.scm
/config.status
/configure
+/doc/*.1
+/doc/*.8
/doc/shepherd.info
/doc/stamp-vti
/doc/version.texi
diff --git a/Makefile.am b/Makefile.am
index 52f66d6..41c0f47 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,27 +74,20 @@ AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
+gen_man = $(AM_V_HELP2MAN)LANGUAGE= $(HELP2MAN) $(HELP2MANFLAGS)
-define man-page-target
+doc/shepherd.1: modules/shepherd.scm
+ $(gen_man) --output="$@" "$(top_builddir)/`basename "$@" .1`"
-%.$(1): modules/shepherd/scripts/%.scm
- -$$(AM_V_HELP2MAN)LANGUAGE= \
- $(HELP2MAN) --output="$$@" --section=$(1) \
- $(HELP2MANFLAGS) \
- "$(top_builddir)/`basename "$$@" .$(1)`"
+doc/%.1: modules/shepherd/scripts/%.scm
+ $(gen_man) --output="$@" "$(top_builddir)/`basename "$@" .1`"
-endef
+doc/%.8: modules/shepherd/scripts/%.scm
+ $(gen_man) --section=8 --output="$@" \
+ "$(top_builddir)/`basename "$@" .8`"
-# Create targets for sections 1 and 8.
-$(eval $(foreach section,1 8,$(call man-page-target,$(section))))
-
-shepherd.1: modules/shepherd.scm
- -$(AM_V_HELP2MAN)LANGUAGE= \
- $(HELP2MAN) --output="$@" $(HELP2MANFLAGS) \
- "$(top_builddir)/shepherd"
-
-dist_man1_MANS = shepherd.1 herd.1
-dist_man8_MANS = halt.8 reboot.8
+dist_man1_MANS = doc/shepherd.1 doc/herd.1
+dist_man8_MANS = doc/halt.8 doc/reboot.8
# Things not automatically included in the distribution.
EXTRA_DIST = \