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