summaryrefslogtreecommitdiff
path: root/doc.am
diff options
context:
space:
mode:
Diffstat (limited to 'doc.am')
-rw-r--r--doc.am37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc.am b/doc.am
index df85cfe2b0..f7f4841946 100644
--- a/doc.am
+++ b/doc.am
@@ -65,3 +65,40 @@ DOT_OPTIONS = \
pdf-local: $(top_srcdir)/doc/images/bootstrap-graph.pdf
info-local: $(top_srcdir)/doc/images/bootstrap-graph.png
ps-local: $(top_srcdir)/doc/images/bootstrap-graph.eps
+
+
+# Manual pages.
+
+doc/guix.1: $(top_builddir)/scripts/guix
+ -LANGUAGE= $(top_builddir)/pre-inst-env \
+ $(HELP2MAN) --output="$@" guix
+
+define subcommand-manual-target
+
+doc/guix-$(1).1: $(top_srcdir)/guix/scripts/$(1).scm
+ -LANGUAGE= $(top_builddir)/pre-inst-env \
+ $(HELP2MAN) --output="$$@" "guix $(1)"
+
+endef
+
+SUBCOMMANDS := \
+ archive \
+ build \
+ download \
+ environment \
+ gc \
+ hash \
+ import \
+ lint \
+ package \
+ publish \
+ pull \
+ refresh \
+ system
+
+$(eval $(foreach subcommand,$(SUBCOMMANDS), \
+ $(call subcommand-manual-target,$(subcommand))))
+
+dist_man1_MANS = \
+ doc/guix.1 \
+ $(SUBCOMMANDS:%=doc/guix-%.1)