1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 # This file is part of GNU Guix.
8 # GNU Guix is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or (at
11 # your option) any later version.
13 # GNU Guix is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 info_TEXINFOS = doc/guix.texi
24 doc/images/bootstrap-graph.dot \
25 doc/images/bootstrap-packages.dot \
26 doc/images/coreutils-graph.dot \
27 doc/images/coreutils-bag-graph.dot \
28 doc/images/service-graph.dot \
29 doc/images/dmd-graph.dot
31 DOT_VECTOR_GRAPHICS = \
32 $(DOT_FILES:%.dot=%.eps) \
33 $(DOT_FILES:%.dot=%.pdf)
36 doc/contributing.texi \
40 $(DOT_VECTOR_GRAPHICS) \
41 doc/images/coreutils-size-map.eps \
42 doc/environment-gdb.scm \
45 OS_CONFIG_EXAMPLES_TEXI = \
46 doc/os-config-bare-bones.texi \
47 doc/os-config-desktop.texi
49 # Bundle this file so that makeinfo finds it in out-of-source-tree builds.
50 BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
51 EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
52 MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
54 doc/os-config-%.texi: gnu/system/examples/%.tmpl
55 $(MKDIR_P) "`dirname "$@"`"
58 infoimagedir = $(infodir)/images
59 dist_infoimage_DATA = \
60 $(DOT_FILES:%.dot=%.png) \
61 doc/images/coreutils-size-map.png
63 # Try hard to obtain an image size and aspect that's reasonable for inclusion
64 # in an Info or PDF document.
66 -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
67 -Nfontsize=9 -Nheight=.1 -Nwidth=.1
70 $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
71 mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
74 $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
75 mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
78 $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
79 mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
82 convert "$<" "$@-tmp.eps"
85 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
86 # Extending"). Using the `-local' rules is imperfect, because they may be
87 # triggered after the main rule. Oh, well.
88 pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
89 info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
90 ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
91 $(top_srcdir)/doc/images/coreutils-size-map.eps
97 doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
98 -LANGUAGE= $(top_builddir)/pre-inst-env \
99 $(HELP2MAN) --output="$@" guix
101 # Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
102 # for people building from a tarball.
103 doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
104 -LANGUAGE= $(top_builddir)/pre-inst-env \
105 $(HELP2MAN) --output="$@" guix-daemon
107 define subcommand-manual-target
109 doc/guix-$(1).1: guix/scripts/$(1).scm
110 -LANGUAGE= $(top_builddir)/pre-inst-env \
111 $(HELP2MAN) --output="$$@" "guix $(1)"
133 $(eval $(foreach subcommand,$(SUBCOMMANDS), \
134 $(call subcommand-manual-target,$(subcommand))))
138 $(SUBCOMMANDS:%=doc/guix-%.1)