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