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