gnu: Add ruby-rspec-mocks-2.
[guix.git] / doc.am
blob1980cc870e8998f03917858c3f0fbb29c5dc69e3
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
22 DOT_FILES =                                     \
23   doc/images/bootstrap-graph.dot                \
24   doc/images/coreutils-graph.dot                \
25   doc/images/coreutils-bag-graph.dot            \
26   doc/images/service-graph.dot                  \
27   doc/images/dmd-graph.dot
29 DOT_VECTOR_GRAPHICS =                           \
30   $(DOT_FILES:%.dot=%.eps)                      \
31   $(DOT_FILES:%.dot=%.pdf)
33 EXTRA_DIST +=                                   \
34   doc/contributing.texi                         \
35   doc/emacs.texi                                \
36   doc/fdl-1.3.texi                              \
37   $(DOT_FILES)                                  \
38   $(DOT_VECTOR_GRAPHICS)                        \
39   doc/images/coreutils-size-map.eps             \
40   doc/environment-gdb.scm                       \
41   doc/package-hello.scm
43 OS_CONFIG_EXAMPLES_TEXI =                       \
44   doc/os-config-bare-bones.texi                 \
45   doc/os-config-desktop.texi
47 # Bundle this file so that makeinfo finds it in out-of-source-tree builds.
48 BUILT_SOURCES        += $(OS_CONFIG_EXAMPLES_TEXI)
49 EXTRA_DIST           += $(OS_CONFIG_EXAMPLES_TEXI)
50 MAINTAINERCLEANFILES  = $(OS_CONFIG_EXAMPLES_TEXI)
52 doc/os-config-%.texi: gnu/system/examples/%.tmpl
53         $(MKDIR_P) "`dirname "$@"`"
54         cp "$<" "$@"
56 infoimagedir = $(infodir)/images
57 dist_infoimage_DATA =                           \
58   $(DOT_FILES:%.dot=%.png)                      \
59   doc/images/coreutils-size-map.png
61 # Try hard to obtain an image size and aspect that's reasonable for inclusion
62 # in an Info or PDF document.
63 DOT_OPTIONS =                                   \
64   -Gratio=.9 -Gnodesep=.005 -Granksep=.00005    \
65   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
67 .dot.png:
68         $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
69         mv "$@.tmp" "$@"
71 .dot.pdf:
72         $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
73         mv "$@.tmp" "$@"
75 .dot.eps:
76         $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
77         mv "$@.tmp" "$@"
79 .png.eps:
80         convert "$<" "$@-tmp.eps"
81         mv "$@-tmp.eps" "$@"
83 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
84 # Extending").  Using the `-local' rules is imperfect, because they may be
85 # triggered after the main rule.  Oh, well.
86 pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
87 info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
88 ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps)                \
89           $(top_srcdir)/doc/images/coreutils-size-map.eps
90 dvi-local: ps-local
93 # Manual pages.
95 doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
96         -LANGUAGE= $(top_builddir)/pre-inst-env \
97           $(HELP2MAN) --output="$@" guix
99 # Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
100 # for people building from a tarball.
101 doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
102         -LANGUAGE= $(top_builddir)/pre-inst-env \
103           $(HELP2MAN) --output="$@" guix-daemon
105 define subcommand-manual-target
107 doc/guix-$(1).1: guix/scripts/$(1).scm
108         -LANGUAGE= $(top_builddir)/pre-inst-env         \
109           $(HELP2MAN) --output="$$@" "guix $(1)"
111 endef
113 SUBCOMMANDS :=                                  \
114   archive                                       \
115   build                                         \
116   download                                      \
117   edit                                          \
118   environment                                   \
119   gc                                            \
120   hash                                          \
121   import                                        \
122   lint                                          \
123   package                                       \
124   publish                                       \
125   pull                                          \
126   refresh                                       \
127   size                                          \
128   system
130 $(eval $(foreach subcommand,$(SUBCOMMANDS),                     \
131           $(call subcommand-manual-target,$(subcommand))))
133 dist_man1_MANS =                                \
134   doc/guix.1                                    \
135   $(SUBCOMMANDS:%=doc/guix-%.1)
137 if BUILD_DAEMON
139 dist_man1_MANS +=                               \
140   doc/guix-daemon.1
142 endif