gnu: xdg-utils: Propagate xprop and xset.
[jackhill/guix/guix.git] / doc.am
CommitLineData
575ed8d5 1# GNU Guix --- Functional package management for GNU
36629097 2# Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
ce9a3042 3# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
575ed8d5 4# Copyright © 2013 Andreas Enge <andreas@enge.fr>
ce9a3042 5# Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
36629097 6# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
575ed8d5
AE
7#
8# This file is part of GNU Guix.
9#
10# GNU Guix is free software; you can redistribute it and/or modify it
11# under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 3 of the License, or (at
13# your option) any later version.
14#
15# GNU Guix is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
a9424c08 23info_TEXINFOS = doc/guix.texi
88856916
LC
24
25DOT_FILES = \
26 doc/images/bootstrap-graph.dot \
d33fa0c7 27 doc/images/bootstrap-packages.dot \
88856916 28 doc/images/coreutils-graph.dot \
0adfe95a 29 doc/images/coreutils-bag-graph.dot \
6f305ea5 30 doc/images/service-graph.dot \
710fa231 31 doc/images/shepherd-graph.dot
88856916
LC
32
33DOT_VECTOR_GRAPHICS = \
34 $(DOT_FILES:%.dot=%.eps) \
35 $(DOT_FILES:%.dot=%.pdf)
36
a9424c08 37EXTRA_DIST += \
49e0ca90 38 doc/htmlxref.cnf \
8c01b9d0 39 doc/contributing.texi \
c6fabc5e 40 doc/emacs.texi \
a9424c08 41 doc/fdl-1.3.texi \
88856916
LC
42 $(DOT_FILES) \
43 $(DOT_VECTOR_GRAPHICS) \
66c8ea47 44 doc/images/coreutils-size-map.eps \
0d279400
DT
45 doc/environment-gdb.scm \
46 doc/package-hello.scm
575ed8d5 47
dd51caac
LC
48OS_CONFIG_EXAMPLES_TEXI = \
49 doc/os-config-bare-bones.texi \
50 doc/os-config-desktop.texi
51
931c132a 52# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
dd51caac
LC
53BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
54EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
55MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
931c132a 56
dd51caac 57doc/os-config-%.texi: gnu/system/examples/%.tmpl
e71ad29d 58 $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
931c132a
LC
59 cp "$<" "$@"
60
575ed8d5 61infoimagedir = $(infodir)/images
a8f996c6 62dist_infoimage_DATA = \
88856916 63 $(DOT_FILES:%.dot=%.png) \
a8f996c6 64 doc/images/coreutils-size-map.png
575ed8d5
AE
65
66# Try hard to obtain an image size and aspect that's reasonable for inclusion
67# in an Info or PDF document.
54461ce7
LC
68DOT_OPTIONS = \
69 -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
575ed8d5
AE
70 -Nfontsize=9 -Nheight=.1 -Nwidth=.1
71
72.dot.png:
4c48878d 73 $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
ce9a3042 74 mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
575ed8d5 75
54461ce7 76.dot.pdf:
4c48878d 77 $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
ce9a3042 78 mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
54461ce7 79
575ed8d5 80.dot.eps:
4c48878d 81 $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
ce9a3042 82 mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
575ed8d5 83
66c8ea47 84.png.eps:
e71ad29d 85 $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
66c8ea47
LC
86 mv "$@-tmp.eps" "$@"
87
a9424c08
LC
88# We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
89# Extending"). Using the `-local' rules is imperfect, because they may be
90# triggered after the main rule. Oh, well.
88856916
LC
91pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
92info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
93ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
66c8ea47
LC
94 $(top_srcdir)/doc/images/coreutils-size-map.eps
95dvi-local: ps-local
52eca736 96
36629097
EB
97## ----------- ##
98## Man pages. ##
99## ----------- ##
100
101sub_commands_mans = \
102 doc/guix-archive.1 \
103 doc/guix-build.1 \
104 doc/guix-challenge.1 \
105 doc/guix-download.1 \
106 doc/guix-edit.1 \
107 doc/guix-environment.1 \
108 doc/guix-gc.1 \
109 doc/guix-hash.1 \
110 doc/guix-import.1 \
111 doc/guix-lint.1 \
112 doc/guix-package.1 \
113 doc/guix-publish.1 \
114 doc/guix-pull.1 \
115 doc/guix-refresh.1 \
116 doc/guix-size.1 \
117 doc/guix-system.1
52eca736
LC
118
119dist_man1_MANS = \
120 doc/guix.1 \
36629097
EB
121 $(sub_commands_mans)
122
123# Man pages are generated using GNU help2man.
ff853a2a
LC
124gen_man = \
125 LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN) \
126 $(HELP2MANFLAGS)
127
128HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
36629097
EB
129
130# Note: Do not depend on 'scripts/guix' since that would trigger a rebuild
131# even for people building from a tarball.
132doc/guix.1: $(sub_commands_mans)
133 -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
134
135# Note: The dependency on $(GOBJECTS) is meant to force these docs to be made
136# only after all Guile modules have been compiled. The 'case' ensures the man
137# pages are only generated if the corresponding script source has been
138# changed.
139doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS)
140 -@case '$?' in \
141 *$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \
142 $(gen_man) --output="$@" "guix $*";; \
143 *) : ;; \
144 esac
acec3beb
LC
145
146if BUILD_DAEMON
147
36629097
EB
148dist_man1_MANS += doc/guix-daemon.1
149
150# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
151# for people building from a tarball.
152doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
153 -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
acec3beb
LC
154
155endif