check-available-binaries: Use 'substitutable-paths'.
[guix.git] / doc.am
blob02b80ec7b5b6412c3475af3f01567172607d5686
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
21 EXTRA_DIST +=                                   \
22   doc/contributing.texi                         \
23   doc/emacs.texi                                \
24   doc/fdl-1.3.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 "$@"`"
42         cp "$<" "$@"
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.
51 DOT_OPTIONS =                                   \
52   -Gratio=.9 -Gnodesep=.005 -Granksep=.00005    \
53   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
55 .dot.png:
56         $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
57         mv "$@.tmp" "$@"
59 .dot.pdf:
60         $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
61         mv "$@.tmp" "$@"
63 .dot.eps:
64         $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
65         mv "$@.tmp" "$@"
67 .png.eps:
68         convert "$<" "$@-tmp.eps"
69         mv "$@-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
78 dvi-local: ps-local
81 # Manual pages.
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)"
99 endef
101 SUBCOMMANDS :=                                  \
102   archive                                       \
103   build                                         \
104   download                                      \
105   edit                                          \
106   environment                                   \
107   gc                                            \
108   hash                                          \
109   import                                        \
110   lint                                          \
111   package                                       \
112   publish                                       \
113   pull                                          \
114   refresh                                       \
115   size                                          \
116   system
118 $(eval $(foreach subcommand,$(SUBCOMMANDS),                     \
119           $(call subcommand-manual-target,$(subcommand))))
121 dist_man1_MANS =                                \
122   doc/guix.1                                    \
123   $(SUBCOMMANDS:%=doc/guix-%.1)
125 if BUILD_DAEMON
127 dist_man1_MANS +=                               \
128   doc/guix-daemon.1
130 endif