Commit | Line | Data |
---|---|---|
575ed8d5 | 1 | # GNU Guix --- Functional package management for GNU |
36629097 | 2 | # Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
409c5733 | 3 | # Copyright © 2012, 2013, 2014, 2015, 2016, 2017 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> |
523790d1 | 6 | # Copyright © 2016, 2018 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 | ||
c0d2e7b1 | 23 | info_TEXINFOS = %D%/guix.texi |
88856916 | 24 | |
523790d1 ML |
25 | %C%_guix_TEXINFOS = \ |
26 | %D%/contributing.texi \ | |
27 | %D%/fdl-1.3.texi | |
28 | ||
88856916 | 29 | DOT_FILES = \ |
c0d2e7b1 ML |
30 | %D%/images/bootstrap-graph.dot \ |
31 | %D%/images/bootstrap-packages.dot \ | |
32 | %D%/images/coreutils-graph.dot \ | |
33 | %D%/images/coreutils-bag-graph.dot \ | |
34 | %D%/images/service-graph.dot \ | |
35 | %D%/images/shepherd-graph.dot | |
88856916 LC |
36 | |
37 | DOT_VECTOR_GRAPHICS = \ | |
38 | $(DOT_FILES:%.dot=%.eps) \ | |
39 | $(DOT_FILES:%.dot=%.pdf) | |
40 | ||
a9424c08 | 41 | EXTRA_DIST += \ |
c0d2e7b1 | 42 | %D%/htmlxref.cnf \ |
88856916 LC |
43 | $(DOT_FILES) \ |
44 | $(DOT_VECTOR_GRAPHICS) \ | |
c0d2e7b1 ML |
45 | %D%/images/coreutils-size-map.eps \ |
46 | %D%/environment-gdb.scm \ | |
47 | %D%/package-hello.scm | |
575ed8d5 | 48 | |
dd51caac | 49 | OS_CONFIG_EXAMPLES_TEXI = \ |
c0d2e7b1 ML |
50 | %D%/os-config-bare-bones.texi \ |
51 | %D%/os-config-desktop.texi \ | |
52 | %D%/os-config-lightweight-desktop.texi | |
dd51caac | 53 | |
931c132a | 54 | # Bundle this file so that makeinfo finds it in out-of-source-tree builds. |
dd51caac LC |
55 | BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) |
56 | EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI) | |
57 | MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI) | |
931c132a | 58 | |
c0d2e7b1 | 59 | %D%/os-config-%.texi: gnu/system/examples/%.tmpl |
e71ad29d | 60 | $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \ |
931c132a LC |
61 | cp "$<" "$@" |
62 | ||
575ed8d5 | 63 | infoimagedir = $(infodir)/images |
a8f996c6 | 64 | dist_infoimage_DATA = \ |
88856916 | 65 | $(DOT_FILES:%.dot=%.png) \ |
c0d2e7b1 | 66 | %D%/images/coreutils-size-map.png |
575ed8d5 AE |
67 | |
68 | # Try hard to obtain an image size and aspect that's reasonable for inclusion | |
69 | # in an Info or PDF document. | |
54461ce7 LC |
70 | DOT_OPTIONS = \ |
71 | -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \ | |
575ed8d5 AE |
72 | -Nfontsize=9 -Nheight=.1 -Nwidth=.1 |
73 | ||
74 | .dot.png: | |
4c48878d | 75 | $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ |
ce9a3042 | 76 | mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" |
575ed8d5 | 77 | |
54461ce7 | 78 | .dot.pdf: |
4c48878d | 79 | $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ |
ce9a3042 | 80 | mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" |
54461ce7 | 81 | |
575ed8d5 | 82 | .dot.eps: |
4c48878d | 83 | $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ |
ce9a3042 | 84 | mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" |
575ed8d5 | 85 | |
66c8ea47 | 86 | .png.eps: |
e71ad29d | 87 | $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \ |
66c8ea47 LC |
88 | mv "$@-tmp.eps" "$@" |
89 | ||
c0d2e7b1 | 90 | # We cannot add new dependencies to `%D%/guix.pdf' & co. (info "(automake) |
a9424c08 LC |
91 | # Extending"). Using the `-local' rules is imperfect, because they may be |
92 | # triggered after the main rule. Oh, well. | |
88856916 LC |
93 | pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf) |
94 | info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png) | |
95 | ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \ | |
c0d2e7b1 | 96 | $(top_srcdir)/%D%/images/coreutils-size-map.eps |
66c8ea47 | 97 | dvi-local: ps-local |
52eca736 | 98 | |
36629097 EB |
99 | ## ----------- ## |
100 | ## Man pages. ## | |
101 | ## ----------- ## | |
102 | ||
39118b5e ML |
103 | # The man pages are generated using GNU Help2man. In makefiles rules they |
104 | # depend not on the binary, but on the source files. This usage allows a | |
105 | # manual page to be generated by the maintainer and included in the | |
106 | # distribution without requiring the end-user to have 'help2man' installed. | |
107 | # They are built in $(srcdir) like info manuals. | |
108 | ||
36629097 | 109 | sub_commands_mans = \ |
c0d2e7b1 ML |
110 | $(srcdir)/%D%/guix-archive.1 \ |
111 | $(srcdir)/%D%/guix-build.1 \ | |
112 | $(srcdir)/%D%/guix-challenge.1 \ | |
113 | $(srcdir)/%D%/guix-download.1 \ | |
114 | $(srcdir)/%D%/guix-edit.1 \ | |
115 | $(srcdir)/%D%/guix-environment.1 \ | |
116 | $(srcdir)/%D%/guix-gc.1 \ | |
117 | $(srcdir)/%D%/guix-hash.1 \ | |
118 | $(srcdir)/%D%/guix-import.1 \ | |
119 | $(srcdir)/%D%/guix-lint.1 \ | |
120 | $(srcdir)/%D%/guix-package.1 \ | |
121 | $(srcdir)/%D%/guix-publish.1 \ | |
122 | $(srcdir)/%D%/guix-pull.1 \ | |
123 | $(srcdir)/%D%/guix-refresh.1 \ | |
124 | $(srcdir)/%D%/guix-size.1 \ | |
125 | $(srcdir)/%D%/guix-system.1 | |
52eca736 LC |
126 | |
127 | dist_man1_MANS = \ | |
c0d2e7b1 | 128 | $(srcdir)/%D%/guix.1 \ |
36629097 EB |
129 | $(sub_commands_mans) |
130 | ||
ff853a2a LC |
131 | gen_man = \ |
132 | LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN) \ | |
133 | $(HELP2MANFLAGS) | |
134 | ||
135 | HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) | |
36629097 | 136 | |
c0d2e7b1 | 137 | $(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans) |
92d40a68 | 138 | -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` |
36629097 | 139 | |
39118b5e ML |
140 | # The 'case' ensures the man pages are only generated if the corresponding |
141 | # source script (the first prerequisite) has been changed. The $(GOBJECTS) | |
142 | # prerequisite is solely meant to force these docs to be made only after all | |
143 | # Guile modules have been compiled. | |
c0d2e7b1 | 144 | $(srcdir)/%D%/guix-%.1: guix/scripts/%.scm $(GOBJECTS) |
36629097 EB |
145 | -@case '$?' in \ |
146 | *$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \ | |
147 | $(gen_man) --output="$@" "guix $*";; \ | |
148 | *) : ;; \ | |
149 | esac | |
acec3beb LC |
150 | |
151 | if BUILD_DAEMON | |
152 | ||
c0d2e7b1 | 153 | dist_man1_MANS += $(srcdir)/%D%/guix-daemon.1 |
36629097 | 154 | |
c0d2e7b1 | 155 | $(srcdir)/%D%/guix-daemon.1: nix/nix-daemon/guix-daemon.cc |
36629097 | 156 | -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` |
acec3beb LC |
157 | |
158 | endif |