size: Get the item's size from the daemon rather than compute it.
[jackhill/guix/guix.git] / doc.am
CommitLineData
575ed8d5 1# GNU Guix --- Functional package management for GNU
54d6223d 2# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
575ed8d5
AE
3# Copyright © 2013 Andreas Enge <andreas@enge.fr>
4#
5# This file is part of GNU Guix.
6#
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.
11#
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.
16#
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/>.
19
a9424c08
LC
20info_TEXINFOS = doc/guix.texi
21EXTRA_DIST += \
8c01b9d0 22 doc/contributing.texi \
c6fabc5e 23 doc/emacs.texi \
a9424c08
LC
24 doc/fdl-1.3.texi \
25 doc/images/bootstrap-graph.dot \
02c72d16 26 doc/images/bootstrap-graph.eps \
fe36d84e 27 doc/images/bootstrap-graph.pdf \
66c8ea47 28 doc/images/coreutils-size-map.eps \
fe36d84e 29 doc/environment-gdb.scm
575ed8d5 30
dd51caac
LC
31OS_CONFIG_EXAMPLES_TEXI = \
32 doc/os-config-bare-bones.texi \
33 doc/os-config-desktop.texi
34
931c132a 35# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
dd51caac
LC
36BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
37EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
38MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
931c132a 39
dd51caac 40doc/os-config-%.texi: gnu/system/examples/%.tmpl
931c132a
LC
41 $(MKDIR_P) "`dirname "$@"`"
42 cp "$<" "$@"
43
575ed8d5 44infoimagedir = $(infodir)/images
a8f996c6
LC
45dist_infoimage_DATA = \
46 doc/images/bootstrap-graph.png \
47 doc/images/coreutils-size-map.png
575ed8d5
AE
48
49# Try hard to obtain an image size and aspect that's reasonable for inclusion
50# in an Info or PDF document.
54461ce7
LC
51DOT_OPTIONS = \
52 -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
575ed8d5
AE
53 -Nfontsize=9 -Nheight=.1 -Nwidth=.1
54
55.dot.png:
cb9e50f6 56 $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
575ed8d5
AE
57 mv "$@.tmp" "$@"
58
54461ce7
LC
59.dot.pdf:
60 $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
61 mv "$@.tmp" "$@"
62
575ed8d5 63.dot.eps:
cb9e50f6 64 $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
575ed8d5
AE
65 mv "$@.tmp" "$@"
66
66c8ea47
LC
67.png.eps:
68 convert "$<" "$@-tmp.eps"
69 mv "$@-tmp.eps" "$@"
70
a9424c08
LC
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.
02c72d16
LC
74pdf-local: $(top_srcdir)/doc/images/bootstrap-graph.pdf
75info-local: $(top_srcdir)/doc/images/bootstrap-graph.png
66c8ea47
LC
76ps-local: $(top_srcdir)/doc/images/bootstrap-graph.eps \
77 $(top_srcdir)/doc/images/coreutils-size-map.eps
78dvi-local: ps-local
52eca736
LC
79
80\f
81# Manual pages.
82
0af3f404 83doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
52eca736
LC
84 -LANGUAGE= $(top_builddir)/pre-inst-env \
85 $(HELP2MAN) --output="$@" guix
86
0af3f404
LC
87# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
88# for people building from a tarball.
89doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
fb393cd8
LC
90 -LANGUAGE= $(top_builddir)/pre-inst-env \
91 $(HELP2MAN) --output="$@" guix-daemon
92
52eca736
LC
93define subcommand-manual-target
94
0af3f404 95doc/guix-$(1).1: guix/scripts/$(1).scm
52eca736
LC
96 -LANGUAGE= $(top_builddir)/pre-inst-env \
97 $(HELP2MAN) --output="$$@" "guix $(1)"
98
99endef
100
101SUBCOMMANDS := \
102 archive \
103 build \
104 download \
39bee8a2 105 edit \
52eca736
LC
106 environment \
107 gc \
108 hash \
109 import \
110 lint \
111 package \
112 publish \
113 pull \
114 refresh \
fcc58db6 115 size \
52eca736
LC
116 system
117
118$(eval $(foreach subcommand,$(SUBCOMMANDS), \
119 $(call subcommand-manual-target,$(subcommand))))
120
121dist_man1_MANS = \
122 doc/guix.1 \
123 $(SUBCOMMANDS:%=doc/guix-%.1)
acec3beb
LC
124
125if BUILD_DAEMON
126
127dist_man1_MANS += \
128 doc/guix-daemon.1
129
130endif