gnu: Add OrfM.
[guix.git] / doc.am
blob14343ceacbfbb0af71edcbe8c0a3957cf5d5ffea
1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
5 # This file is part of GNU Guix.
7 # GNU Guix is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or (at
10 # your option) any later version.
12 # GNU Guix is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
20 info_TEXINFOS = doc/guix.texi
21 EXTRA_DIST +=                                   \
22   doc/emacs.texi                                \
23   doc/fdl-1.3.texi                              \
24   doc/images/bootstrap-graph.dot                \
25   doc/images/bootstrap-graph.eps                \
26   doc/images/bootstrap-graph.pdf
28 OS_CONFIG_EXAMPLES_TEXI =                       \
29   doc/os-config-bare-bones.texi                 \
30   doc/os-config-desktop.texi
32 # Bundle this file so that makeinfo finds it in out-of-source-tree builds.
33 BUILT_SOURCES        += $(OS_CONFIG_EXAMPLES_TEXI)
34 EXTRA_DIST           += $(OS_CONFIG_EXAMPLES_TEXI)
35 MAINTAINERCLEANFILES  = $(OS_CONFIG_EXAMPLES_TEXI)
37 doc/os-config-%.texi: gnu/system/examples/%.tmpl
38         $(MKDIR_P) "`dirname "$@"`"
39         cp "$<" "$@"
41 infoimagedir = $(infodir)/images
42 dist_infoimage_DATA = doc/images/bootstrap-graph.png
44 # Try hard to obtain an image size and aspect that's reasonable for inclusion
45 # in an Info or PDF document.
46 DOT_OPTIONS =                                   \
47   -Gratio=.9 -Gnodesep=.005 -Granksep=.00005    \
48   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
50 .dot.png:
51         $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
52         mv "$@.tmp" "$@"
54 .dot.pdf:
55         $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
56         mv "$@.tmp" "$@"
58 .dot.eps:
59         $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
60         mv "$@.tmp" "$@"
62 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
63 # Extending").  Using the `-local' rules is imperfect, because they may be
64 # triggered after the main rule.  Oh, well.
65 pdf-local: $(top_srcdir)/doc/images/bootstrap-graph.pdf
66 info-local: $(top_srcdir)/doc/images/bootstrap-graph.png
67 ps-local: $(top_srcdir)/doc/images/bootstrap-graph.eps
70 # Manual pages.
72 doc/guix.1: scripts/guix
73         -LANGUAGE= $(top_builddir)/pre-inst-env \
74           $(HELP2MAN) --output="$@" guix
76 doc/guix-daemon.1: guix-daemon
77         -LANGUAGE= $(top_builddir)/pre-inst-env \
78           $(HELP2MAN) --output="$@" guix-daemon
80 define subcommand-manual-target
82 doc/guix-$(1).1: scripts/guix guix/scripts/$(1).go
83         -LANGUAGE= $(top_builddir)/pre-inst-env         \
84           $(HELP2MAN) --output="$$@" "guix $(1)"
86 endef
88 SUBCOMMANDS :=                                  \
89   archive                                       \
90   build                                         \
91   download                                      \
92   environment                                   \
93   gc                                            \
94   hash                                          \
95   import                                        \
96   lint                                          \
97   package                                       \
98   publish                                       \
99   pull                                          \
100   refresh                                       \
101   system
103 $(eval $(foreach subcommand,$(SUBCOMMANDS),                     \
104           $(call subcommand-manual-target,$(subcommand))))
106 dist_man1_MANS =                                \
107   doc/guix.1                                    \
108   doc/guix-daemon.1                             \
109   $(SUBCOMMANDS:%=doc/guix-%.1)