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
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
28 DOT_VECTOR_GRAPHICS = \
29 $(DOT_FILES:%.dot=%.eps) \
30 $(DOT_FILES:%.dot=%.pdf)
33 doc/contributing.texi \
37 $(DOT_VECTOR_GRAPHICS) \
38 doc/images/coreutils-size-map.eps \
39 doc/environment-gdb.scm \
42 OS_CONFIG_EXAMPLES_TEXI = \
43 doc/os-config-bare-bones.texi \
44 doc/os-config-desktop.texi
46 # Bundle this file so that makeinfo finds it in out-of-source-tree builds.
47 BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
48 EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
49 MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
51 doc/os-config-%.texi: gnu/system/examples/%.tmpl
52 $(MKDIR_P) "`dirname "$@"`"
55 infoimagedir = $(infodir)/images
56 dist_infoimage_DATA = \
57 $(DOT_FILES:%.dot=%.png) \
58 doc/images/coreutils-size-map.png
60 # Try hard to obtain an image size and aspect that's reasonable for inclusion
61 # in an Info or PDF document.
63 -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
64 -Nfontsize=9 -Nheight=.1 -Nwidth=.1
67 $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
71 $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
75 $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
79 convert "$<" "$@-tmp.eps"
82 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
83 # Extending"). Using the `-local' rules is imperfect, because they may be
84 # triggered after the main rule. Oh, well.
85 pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
86 info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
87 ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
88 $(top_srcdir)/doc/images/coreutils-size-map.eps
94 doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
95 -LANGUAGE= $(top_builddir)/pre-inst-env \
96 $(HELP2MAN) --output="$@" guix
98 # Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
99 # for people building from a tarball.
100 doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
101 -LANGUAGE= $(top_builddir)/pre-inst-env \
102 $(HELP2MAN) --output="$@" guix-daemon
104 define subcommand-manual-target
106 doc/guix-$(1).1: guix/scripts/$(1).scm
107 -LANGUAGE= $(top_builddir)/pre-inst-env \
108 $(HELP2MAN) --output="$$@" "guix $(1)"
129 $(eval $(foreach subcommand,$(SUBCOMMANDS), \
130 $(call subcommand-manual-target,$(subcommand))))
134 $(SUBCOMMANDS:%=doc/guix-%.1)