guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: build: Build and install manual pages.


From: Ludovic Courtès
Subject: 01/01: build: Build and install manual pages.
Date: Mon, 01 Jun 2015 21:21:28 +0000

civodul pushed a commit to branch master
in repository guix.

commit 52eca736f6b8fedb7d0cc4dd281059f672d88734
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jun 1 22:37:54 2015 +0200

    build: Build and install manual pages.
    
    * configure.ac: Use 'AM_MISSING_PROG' for 'help2man'.
    * doc.am (subcommand-manual-target, SUBCOMMANDS, dist_man1_MANS): New
      variables.
      (doc/guix-$(1).1, doc/guix.1): New targets.
---
 configure.ac |    3 +++
 doc.am       |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6979752..aea1401 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,6 +182,9 @@ dnl `dot' (from the Graphviz package) is only needed for 
maintainers.
 dnl See `HACKING' for more info.
 AM_MISSING_PROG([DOT], [dot])
 
+dnl Manual pages.
+AM_MISSING_PROG([HELP2MAN], [help2man])
+
 AC_CONFIG_FILES([Makefile
                  po/guix/Makefile.in
                  po/packages/Makefile.in
diff --git a/doc.am b/doc.am
index df85cfe..f7f4841 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]