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 doc/contributing.texi \
25 doc/images/bootstrap-graph.dot \
26 doc/images/bootstrap-graph.eps \
27 doc/images/bootstrap-graph.pdf \
28 doc/images/coreutils-size-map.eps \
29 doc/environment-gdb.scm
31 OS_CONFIG_EXAMPLES_TEXI = \
32 doc/os-config-bare-bones.texi \
33 doc/os-config-desktop.texi
35 # Bundle this file so that makeinfo finds it in out-of-source-tree builds.
36 BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
37 EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
38 MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
40 doc/os-config-%.texi: gnu/system/examples/%.tmpl
41 $(MKDIR_P) "`dirname "$@"`"
44 infoimagedir = $(infodir)/images
45 dist_infoimage_DATA = \
46 doc/images/bootstrap-graph.png \
47 doc/images/coreutils-size-map.png
49 # Try hard to obtain an image size and aspect that's reasonable for inclusion
50 # in an Info or PDF document.
52 -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
53 -Nfontsize=9 -Nheight=.1 -Nwidth=.1
56 $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
60 $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
64 $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
68 convert "$<" "$@-tmp.eps"
71 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
72 # Extending"). Using the `-local' rules is imperfect, because they may be
73 # triggered after the main rule. Oh, well.
74 pdf-local: $(top_srcdir)/doc/images/bootstrap-graph.pdf
75 info-local: $(top_srcdir)/doc/images/bootstrap-graph.png
76 ps-local: $(top_srcdir)/doc/images/bootstrap-graph.eps \
77 $(top_srcdir)/doc/images/coreutils-size-map.eps
83 doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
84 -LANGUAGE= $(top_builddir)/pre-inst-env \
85 $(HELP2MAN) --output="$@" guix
87 # Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
88 # for people building from a tarball.
89 doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
90 -LANGUAGE= $(top_builddir)/pre-inst-env \
91 $(HELP2MAN) --output="$@" guix-daemon
93 define subcommand-manual-target
95 doc/guix-$(1).1: guix/scripts/$(1).scm
96 -LANGUAGE= $(top_builddir)/pre-inst-env \
97 $(HELP2MAN) --output="$$@" "guix $(1)"
118 $(eval $(foreach subcommand,$(SUBCOMMANDS), \
119 $(call subcommand-manual-target,$(subcommand))))
123 $(SUBCOMMANDS:%=doc/guix-%.1)