scripts: Add 'guix home'.
[jackhill/guix/guix.git] / Makefile.am
CommitLineData
233e7676 1# GNU Guix --- Functional package management for GNU
10612d61 2# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
f2499672 3# Copyright © 2013 Andreas Enge <andreas@enge.fr>
7994250f 4# Copyright © 2015, 2017 Alex Kost <alezost@gmail.com>
cba386c1 5# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
274fa491 6# Copyright © 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
960887b2 7# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
a6c642ef 8# Copyright © 2017 Leo Famulari <leo@famulari.name>
205794c8 9# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
59bcffa3 10# Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
3d0aa7f7 11# Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
3c986a7d 12# Copyright © 2018 Nikita <nikita@n0.is>
b9fe8fd6 13# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
bba0fa24 14# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
53f316ab 15# Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
4e4c3114 16# Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
a16eb6c5 17# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
89e05a69 18# Copyright © 2021 Andrew Tropin <andrew@trop.in>
af51c820 19#
233e7676 20# This file is part of GNU Guix.
af51c820 21#
233e7676 22# GNU Guix is free software; you can redistribute it and/or modify it
af51c820
LC
23# under the terms of the GNU General Public License as published by
24# the Free Software Foundation; either version 3 of the License, or (at
25# your option) any later version.
26#
233e7676 27# GNU Guix is distributed in the hope that it will be useful, but
af51c820
LC
28# WITHOUT ANY WARRANTY; without even the implied warranty of
29# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30# GNU General Public License for more details.
31#
32# You should have received a copy of the GNU General Public License
233e7676 33# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
af51c820 34
b9fe8fd6
JL
35MSGMERGE_UPDATE = @MSGMERGE@ --update
36
cba386c1
ML
37bin_SCRIPTS = scripts/guix
38
39# Handle substitution of fully-expanded Autoconf variables.
40do_subst = $(SED) \
41 -e 's,[@]GUILE[@],$(GUILE),g' \
42 -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
43 -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
fd247542 44 -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \
cba386c1
ML
45 -e 's,[@]localedir[@],$(localedir),g'
46
47scripts/guix: scripts/guix.in Makefile
48 $(AM_V_at)rm -f $@ $@-t
49 $(AM_V_at)$(MKDIR_P) "$(@D)"
50 $(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
51 $(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
14a1c319 52
880fe019
LC
53# This is our variant of the 'guile' executable, one that doesn't complain
54# about locales.
55pkglibexec_PROGRAMS = guile
56guile_SOURCES = gnu/packages/aux-files/guile-launcher.c
57guile_LDADD = $(GUILE_LIBS)
58guile_CFLAGS = $(GUILE_CFLAGS)
59
60# Have the 'guix' command refer to our 'guile'.
61install-exec-hook:
62 $(SED) -i "$(DESTDIR)$(bindir)/guix" \
63 -e 's,^#![[:graph:]]\+,#!$(pkglibexecdir)/guile,g'
64
58867ae7
MW
65nodist_noinst_SCRIPTS = \
66 pre-inst-env \
67 test-env
68
4aabc8ea
LC
69# Modules that are not compiled but are installed nonetheless, such as
70# build-side modules with unusual dependencies.
b8396f96 71MODULES_NOT_COMPILED = \
554b30d2 72 guix/build/po.scm \
b8396f96 73 guix/man-db.scm
4aabc8ea 74
03d0e2d2 75include gnu/local.mk
b9fe8fd6 76include po/doc/local.mk
d516736c 77
af51c820 78MODULES = \
4c0c4db0 79 guix/base16.scm \
ddc29a78 80 guix/base32.scm \
e9c6c584 81 guix/base64.scm \
6776af04 82 guix/ci.scm \
7a18c3cc 83 guix/cpio.scm \
787da810 84 guix/deprecation.scm \
6776af04 85 guix/docker.scm \
c0cd1b3e 86 guix/records.scm \
43408e30 87 guix/openpgp.scm \
8b420f74 88 guix/pki.scm \
8c348825 89 guix/progress.scm \
958dd3ce 90 guix/combinators.scm \
f9704f17 91 guix/memoization.scm \
73fbb904 92 guix/utils.scm \
d326767e 93 guix/sets.scm \
7ca87354 94 guix/modules.scm \
de1355f1 95 guix/download.scm \
cd903ef7 96 guix/discovery.scm \
3feb8464 97 guix/android-repo-download.scm \
4ac69ea1 98 guix/bzr-download.scm \
9b5b5c17 99 guix/git-download.scm \
c4e48b68 100 guix/hg-download.scm \
de2bfe90 101 guix/swh.scm \
b860f382 102 guix/monads.scm \
b9b86078 103 guix/monad-repl.scm \
21b679f6 104 guix/gexp.scm \
cc4ecc2d 105 guix/profiles.scm \
0f41c26f
LC
106 guix/serialization.scm \
107 guix/nar.scm \
681af174 108 guix/narinfo.scm \
af51c820 109 guix/derivations.scm \
7adf9b84 110 guix/grafts.scm \
92a4087b 111 guix/repl.scm \
f68b3ba1 112 guix/transformations.scm \
2ca299ca 113 guix/inferior.scm \
fe634eaf 114 guix/describe.scm \
20507347 115 guix/quirks.scm \
0d39a3b9 116 guix/channels.scm \
22189ed1 117 guix/gnu-maintenance.scm \
eaae07ec 118 guix/self.scm \
112692c0 119 guix/substitutes.scm \
0a7c5a09 120 guix/upstream.scm \
838d78e3 121 guix/licenses.scm \
f363c836 122 guix/lint.scm \
f14c933d 123 guix/glob.scm \
7441f1db 124 guix/git.scm \
41f443c9 125 guix/git-authenticate.scm \
8fb58371 126 guix/graph.scm \
2ea2aac6 127 guix/cache.scm \
0eef7551 128 guix/cve.scm \
1563d6c7 129 guix/workers.scm \
b18f45c2 130 guix/ipfs.scm \
208f7cd1 131 guix/build-system.scm \
436515cd 132 guix/build-system/android-ndk.scm \
5f7a1a4d 133 guix/build-system/ant.scm \
4b3cb7f4 134 guix/build-system/cargo.scm \
64f032d7 135 guix/build-system/chicken.scm \
1e5b79e5 136 guix/build-system/clojure.scm \
c6bded8a 137 guix/build-system/cmake.scm \
65e862d1 138 guix/build-system/dub.scm \
6e8986c8 139 guix/build-system/dune.scm \
e9137a53 140 guix/build-system/emacs.scm \
3d90fa98 141 guix/build-system/font.scm \
91525b48 142 guix/build-system/go.scm \
07c101e2 143 guix/build-system/meson.scm \
88c8f247 144 guix/build-system/minify.scm \
3df48515 145 guix/build-system/minetest.scm \
a1b30f99 146 guix/build-system/asdf.scm \
e90e6404 147 guix/build-system/copy.scm \
be3425e5 148 guix/build-system/glib-or-gtk.scm \
208f7cd1 149 guix/build-system/gnu.scm \
2a3b1b32 150 guix/build-system/guile.scm \
ce6fc7d6 151 guix/build-system/haskell.scm \
a44a535e 152 guix/build-system/julia.scm \
ce631299 153 guix/build-system/linux-module.scm \
55b90c90 154 guix/build-system/maven.scm \
09a1f92f 155 guix/build-system/node.scm \
08fd1ebe 156 guix/build-system/perl.scm \
40506d5d 157 guix/build-system/python.scm \
e1bdab4f 158 guix/build-system/renpy.scm \
e6876cb9 159 guix/build-system/ocaml.scm \
b6d852ce 160 guix/build-system/qt.scm \
a677c726 161 guix/build-system/waf.scm \
f8f3bef6 162 guix/build-system/r.scm \
4e4c3114 163 guix/build-system/rakudo.scm \
c08f9818 164 guix/build-system/ruby.scm \
3d0aa7f7 165 guix/build-system/scons.scm \
205794c8 166 guix/build-system/texlive.scm \
be13fbfa 167 guix/build-system/trivial.scm \
457dd86d 168 guix/ftp-client.scm \
3b8258c5 169 guix/http-client.scm \
0fdd3bea 170 guix/gnupg.scm \
d5d16686 171 guix/elf.scm \
03870da8 172 guix/profiling.scm \
af51c820 173 guix/store.scm \
89328d24 174 guix/cvs-download.scm \
b3acf365 175 guix/svn-download.scm \
5d9f9ad6 176 guix/colors.scm \
37eed374 177 guix/i18n.scm \
1b5ee3bd 178 guix/diagnostics.scm \
073c34d7 179 guix/ui.scm \
dc0f74e5 180 guix/status.scm \
436515cd 181 guix/build/android-ndk-build-system.scm \
5f7a1a4d 182 guix/build/ant-build-system.scm \
62cab99c 183 guix/build/download.scm \
37ce440d 184 guix/build/download-nar.scm \
4b3cb7f4 185 guix/build/cargo-build-system.scm \
7d141788 186 guix/build/cargo-utils.scm \
64f032d7 187 guix/build/chicken-build-system.scm \
c6bded8a 188 guix/build/cmake-build-system.scm \
65e862d1 189 guix/build/dub-build-system.scm \
6e8986c8 190 guix/build/dune-build-system.scm \
e9137a53 191 guix/build/emacs-build-system.scm \
07c101e2 192 guix/build/meson-build-system.scm \
88c8f247 193 guix/build/minify-build-system.scm \
3d90fa98 194 guix/build/font-build-system.scm \
91525b48 195 guix/build/go-build-system.scm \
3feb8464 196 guix/build/android-repo.scm \
a1b30f99 197 guix/build/asdf-build-system.scm \
4ac69ea1 198 guix/build/bzr.scm \
e90e6404 199 guix/build/copy-build-system.scm \
9b5b5c17 200 guix/build/git.scm \
c4e48b68 201 guix/build/hg.scm \
be3425e5 202 guix/build/glib-or-gtk-build-system.scm \
9c9407f7 203 guix/build/gnu-bootstrap.scm \
af51c820 204 guix/build/gnu-build-system.scm \
fe12c345 205 guix/build/gnu-dist.scm \
2a3b1b32 206 guix/build/guile-build-system.scm \
55b90c90 207 guix/build/maven-build-system.scm \
3df48515 208 guix/build/minetest-build-system.scm \
09a1f92f 209 guix/build/node-build-system.scm \
08fd1ebe 210 guix/build/perl-build-system.scm \
40506d5d 211 guix/build/python-build-system.scm \
e6876cb9 212 guix/build/ocaml-build-system.scm \
b6d852ce 213 guix/build/qt-build-system.scm \
f8f3bef6 214 guix/build/r-build-system.scm \
e1bdab4f 215 guix/build/renpy-build-system.scm \
4e4c3114 216 guix/build/rakudo-build-system.scm \
c08f9818 217 guix/build/ruby-build-system.scm \
3d0aa7f7 218 guix/build/scons-build-system.scm \
205794c8 219 guix/build/texlive-build-system.scm \
a677c726 220 guix/build/waf-build-system.scm \
9fd6c2ba 221 guix/build/haskell-build-system.scm \
a44a535e 222 guix/build/julia-build-system.scm \
ce631299 223 guix/build/linux-module-build-system.scm \
6fd1a796 224 guix/build/store-copy.scm \
a4bb1892 225 guix/build/json.scm \
7708c0b5 226 guix/build/pack.scm \
1273d44a 227 guix/build/utils.scm \
c8c88afa 228 guix/build/union.scm \
611adb1e 229 guix/build/profiles.scm \
2890ad33 230 guix/build/compile.scm \
3309e3a1 231 guix/build/rpath.scm \
89328d24 232 guix/build/cvs.scm \
b3acf365 233 guix/build/svn.scm \
875715ca 234 guix/build/syscalls.scm \
15aa2c38 235 guix/build/gremlin.scm \
93c33389 236 guix/build/debug-link.scm \
1e5b79e5 237 guix/build/clojure-build-system.scm \
53f316ab 238 guix/build/clojure-utils.scm \
75f3b1a1 239 guix/build/emacs-utils.scm \
59135f0d 240 guix/build/java-utils.scm \
a1b30f99 241 guix/build/lisp-utils.scm \
3d3bc413
JL
242 guix/build/maven/java.scm \
243 guix/build/maven/plugin.scm \
244 guix/build/maven/pom.scm \
fb59e275 245 guix/build/graft.scm \
f2e4805b 246 guix/build/bournish.scm \
2098d024 247 guix/build/qt-utils.scm \
f13f60cb 248 guix/build/make-bootstrap.scm \
e89431bf 249 guix/search-paths.scm \
e3ce5d70 250 guix/packages.scm \
a4154748 251 guix/import/cabal.scm \
6776af04 252 guix/import/cpan.scm \
e1248602 253 guix/import/cran.scm \
6776af04 254 guix/import/crate.scm \
bdc298ec 255 guix/import/egg.scm \
7f74a931 256 guix/import/elpa.scm \
6776af04
EB
257 guix/import/gem.scm \
258 guix/import/github.scm \
259 guix/import/gnome.scm \
260 guix/import/gnu.scm \
02e2e093 261 guix/import/go.scm \
6776af04
EB
262 guix/import/hackage.scm \
263 guix/import/json.scm \
d1dce0c3 264 guix/import/kde.scm \
ae031d45 265 guix/import/launchpad.scm \
467e874a 266 guix/import/minetest.scm \
6776af04
EB
267 guix/import/opam.scm \
268 guix/import/print.scm \
269 guix/import/pypi.scm \
6776af04 270 guix/import/stackage.scm \
afbc9419 271 guix/import/texlive.scm \
6776af04 272 guix/import/utils.scm \
88981dd3 273 guix/scripts.scm \
de1355f1 274 guix/scripts/download.scm \
94d92c77 275 guix/scripts/perform-download.scm \
de1355f1 276 guix/scripts/build.scm \
760c60d6 277 guix/scripts/archive.scm \
de1355f1
LC
278 guix/scripts/import.scm \
279 guix/scripts/package.scm \
d824cfba
LC
280 guix/scripts/install.scm \
281 guix/scripts/remove.scm \
282 guix/scripts/upgrade.scm \
da56f109 283 guix/scripts/search.scm \
aeb51370 284 guix/scripts/show.scm \
de1355f1
LC
285 guix/scripts/gc.scm \
286 guix/scripts/hash.scm \
239c2266 287 guix/scripts/pack.scm \
de1355f1 288 guix/scripts/pull.scm \
63eb2b89 289 guix/scripts/processes.scm \
2c74fde0 290 guix/scripts/substitute.scm \
526382ff 291 guix/scripts/authenticate.scm \
de1355f1 292 guix/scripts/refresh.scm \
2ca299ca 293 guix/scripts/repl.scm \
bd747018 294 guix/scripts/describe.scm \
523e4896 295 guix/scripts/system.scm \
0649321d 296 guix/scripts/system/search.scm \
5c793753 297 guix/scripts/system/reconfigure.scm \
89e05a69 298 guix/scripts/home.scm \
b4f5e0e8 299 guix/scripts/lint.scm \
d23c20f1 300 guix/scripts/challenge.scm \
6776af04 301 guix/scripts/import/crate.scm \
e1248602 302 guix/scripts/import/cran.scm \
bdc298ec 303 guix/scripts/import/egg.scm \
6776af04
EB
304 guix/scripts/import/elpa.scm \
305 guix/scripts/import/gem.scm \
7047133f 306 guix/scripts/import/gnu.scm \
02e2e093 307 guix/scripts/import/go.scm \
a4154748 308 guix/scripts/import/hackage.scm \
6776af04 309 guix/scripts/import/json.scm \
467e874a 310 guix/scripts/import/minetest.scm \
6776af04
EB
311 guix/scripts/import/opam.scm \
312 guix/scripts/import/pypi.scm \
313 guix/scripts/import/stackage.scm \
afbc9419 314 guix/scripts/import/texlive.scm \
372c4bbc 315 guix/scripts/environment.scm \
aff8ce7c 316 guix/scripts/publish.scm \
39bee8a2 317 guix/scripts/edit.scm \
fcc58db6 318 guix/scripts/size.scm \
a9871278
LC
319 guix/scripts/git.scm \
320 guix/scripts/git/authenticate.scm \
88856916 321 guix/scripts/graph.scm \
6776af04 322 guix/scripts/weather.scm \
32efa254
DT
323 guix/scripts/container.scm \
324 guix/scripts/container/exec.scm \
5cbb832f 325 guix/scripts/deploy.scm \
f675f8de 326 guix/scripts/time-machine.scm \
e3ce5d70 327 guix.scm \
d516736c 328 $(GNU_SYSTEM_MODULES)
af51c820 329
987a29ba
LC
330if HAVE_GUILE_SSH
331
332MODULES += \
f11c444d 333 guix/ssh.scm \
9d8ab803 334 guix/remote.scm \
285f63e8
LC
335 guix/scripts/copy.scm \
336 guix/store/ssh.scm
987a29ba
LC
337
338endif HAVE_GUILE_SSH
339
35a32fef
MO
340if HAVE_GUILE_AVAHI
341
342MODULES += \
343 guix/avahi.scm \
344 guix/scripts/discover.scm
345
346endif HAVE_GUILE_AVAHI
347
49e6291a
LC
348if BUILD_DAEMON_OFFLOAD
349
350MODULES += \
351 guix/scripts/offload.scm
352
353endif BUILD_DAEMON_OFFLOAD
354
7f9d184d
CR
355# Scheme implementation of the build daemon and related functionality.
356STORE_MODULES = \
bf5bf577 357 guix/store/database.scm \
72eda062
LC
358 guix/store/deduplication.scm \
359 guix/store/roots.scm
7f9d184d 360
7f9d184d 361MODULES += $(STORE_MODULES)
7f9d184d 362
17ab08bc 363# Internal modules with test suite support.
873f6f13
LC
364dist_noinst_DATA = \
365 guix/tests.scm \
366 guix/tests/http.scm \
c83eedba
LC
367 guix/tests/git.scm \
368 guix/tests/gnupg.scm
c1bc358f 369
7994250f
AK
370# Auxiliary files for packages.
371AUX_FILES = \
a7e70ec2 372 gnu/packages/aux-files/chromium/master-preferences.json \
59d04f63 373 gnu/packages/aux-files/emacs/guix-emacs.el \
53b51b44 374 gnu/packages/aux-files/guix.vim \
8b2b027d
LF
375 gnu/packages/aux-files/linux-libre/5.14-arm.conf \
376 gnu/packages/aux-files/linux-libre/5.14-arm64.conf \
377 gnu/packages/aux-files/linux-libre/5.14-i686.conf \
378 gnu/packages/aux-files/linux-libre/5.14-x86_64.conf \
627db561
LF
379 gnu/packages/aux-files/linux-libre/5.13-arm.conf \
380 gnu/packages/aux-files/linux-libre/5.13-arm64.conf \
381 gnu/packages/aux-files/linux-libre/5.13-i686.conf \
382 gnu/packages/aux-files/linux-libre/5.13-x86_64.conf \
66b5bc31
LF
383 gnu/packages/aux-files/linux-libre/5.10-arm.conf \
384 gnu/packages/aux-files/linux-libre/5.10-arm64.conf \
385 gnu/packages/aux-files/linux-libre/5.10-i686.conf \
386 gnu/packages/aux-files/linux-libre/5.10-x86_64.conf \
952820c5 387 gnu/packages/aux-files/linux-libre/5.4-arm.conf \
952820c5
MW
388 gnu/packages/aux-files/linux-libre/5.4-arm64.conf \
389 gnu/packages/aux-files/linux-libre/5.4-i686.conf \
390 gnu/packages/aux-files/linux-libre/5.4-x86_64.conf \
ce7ceef3
MW
391 gnu/packages/aux-files/linux-libre/4.19-arm.conf \
392 gnu/packages/aux-files/linux-libre/4.19-arm64.conf \
393 gnu/packages/aux-files/linux-libre/4.19-i686.conf \
394 gnu/packages/aux-files/linux-libre/4.19-x86_64.conf \
c114c9c5
MW
395 gnu/packages/aux-files/linux-libre/4.14-arm.conf \
396 gnu/packages/aux-files/linux-libre/4.14-i686.conf \
397 gnu/packages/aux-files/linux-libre/4.14-x86_64.conf \
7994250f
AK
398 gnu/packages/aux-files/linux-libre/4.9-i686.conf \
399 gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \
400 gnu/packages/aux-files/linux-libre/4.4-i686.conf \
401 gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \
64562321 402 gnu/packages/aux-files/pack-audit.c \
47a60325 403 gnu/packages/aux-files/run-in-namespace.c
1959fb04 404
ebc32b31
LC
405# Templates, examples.
406EXAMPLES = \
df2a9616 407 gnu/system/examples/asus-c201.tmpl \
36ffaca2 408 gnu/system/examples/bare-bones.tmpl \
59bcffa3 409 gnu/system/examples/bare-hurd.tmpl \
9f1e39d1 410 gnu/system/examples/beaglebone-black.tmpl \
d038b674 411 gnu/system/examples/desktop.tmpl \
a6c642ef 412 gnu/system/examples/lightweight-desktop.tmpl \
1b0d2b2a 413 gnu/system/examples/docker-image.tmpl \
a6c642ef 414 gnu/system/examples/vm-image.tmpl
ebc32b31 415
17ab08bc 416GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
af51c820 417
4aabc8ea 418nobase_dist_guilemodule_DATA = \
10612d61
LC
419 guix/d3.v3.js \
420 guix/graph.js \
3931c761 421 guix/store/schema.sql \
4aabc8ea 422 $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \
74574fd1 423 $(MISC_DISTRO_FILES)
9437fd73
LC
424nobase_nodist_guilemodule_DATA = guix/config.scm
425nobase_nodist_guileobject_DATA = $(GOBJECTS)
800cdeef 426
70a9c720
LC
427# Handy way to remove the .go files without removing all the rest.
428clean-go:
429 -$(RM) -f $(GOBJECTS)
92becc3f 430 @find . -path ./test-tmp -prune -o -name '*.go' -print | \
cdf26f40
EB
431 if test -t 1; then \
432 xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \
433 else \
434 xargs -r echo "warning: stray .go files:"; \
435 fi
70a9c720 436
af51c820 437
bb251307
LC
438# Test extensions; has to be unconditional.
439TEST_EXTENSIONS = .scm .sh
440
441if CAN_RUN_TESTS
442
30dd8310 443SCM_TESTS = \
12277003 444 tests/accounts.scm \
4c0c4db0 445 tests/base16.scm \
ddc29a78 446 tests/base32.scm \
e9c6c584 447 tests/base64.scm \
9d449b94 448 tests/boot-parameters.scm \
12277003
RV
449 tests/bournish.scm \
450 tests/builders.scm \
451 tests/build-utils.scm \
452 tests/cache.scm \
453 tests/challenge.scm \
af12790b 454 tests/channels.scm \
12277003
RV
455 tests/combinators.scm \
456 tests/containers.scm \
6776af04 457 tests/cpan.scm \
7a18c3cc 458 tests/cpio.scm \
12277003 459 tests/cran.scm \
6776af04 460 tests/crate.scm \
12277003
RV
461 tests/cve.scm \
462 tests/debug-link.scm \
463 tests/derivations.scm \
cd903ef7 464 tests/discovery.scm \
bdc298ec 465 tests/egg.scm \
7f74a931 466 tests/elpa.scm \
12277003
RV
467 tests/file-systems.scm \
468 tests/gem.scm \
21b679f6 469 tests/gexp.scm \
873f6f13 470 tests/git.scm \
c83eedba 471 tests/git-authenticate.scm \
12277003
RV
472 tests/glob.scm \
473 tests/gnu-maintenance.scm \
474 tests/grafts.scm \
475 tests/graph.scm \
15aa2c38 476 tests/gremlin.scm \
12277003
RV
477 tests/hackage.scm \
478 tests/import-utils.scm \
479 tests/inferior.scm \
aff8ce7c 480 tests/lint.scm \
467e874a 481 tests/minetest.scm \
12277003
RV
482 tests/modules.scm \
483 tests/monads.scm \
484 tests/nar.scm \
5658ae8a 485 tests/networking.scm \
6776af04 486 tests/opam.scm \
43408e30 487 tests/openpgp.scm \
12277003 488 tests/packages.scm \
850edd77 489 tests/pack.scm \
12277003
RV
490 tests/pki.scm \
491 tests/print.scm \
492 tests/processes.scm \
493 tests/profiles.scm \
494 tests/publish.scm \
6776af04 495 tests/pypi.scm \
12277003
RV
496 tests/records.scm \
497 tests/scripts.scm \
12277003
RV
498 tests/search-paths.scm \
499 tests/services.scm \
db6b9d2f 500 tests/services/file-sharing.scm \
a77e3a58 501 tests/services/configuration.scm \
d3e439e3 502 tests/services/linux.scm \
10f55470 503 tests/services/telephony.scm \
12277003
RV
504 tests/sets.scm \
505 tests/size.scm \
12277003 506 tests/status.scm \
c5a2e1ff 507 tests/store-database.scm \
12277003
RV
508 tests/store-deduplication.scm \
509 tests/store-roots.scm \
510 tests/store.scm \
511 tests/substitute.scm \
512 tests/swh.scm \
513 tests/syscalls.scm \
514 tests/system.scm \
515 tests/texlive.scm \
f68b3ba1 516 tests/transformations.scm \
12277003
RV
517 tests/ui.scm \
518 tests/union.scm \
519 tests/upstream.scm \
520 tests/utils.scm \
521 tests/uuid.scm \
4c0c65ac 522 tests/workers.scm
30dd8310 523
38d337a5
MC
524if HAVE_GUILE_LIB
525SCM_TESTS += tests/go.scm
0f853ab7
MC
526else
527EXTRA_DIST += tests/go.scm
38d337a5
MC
528endif
529
069d2bf2
LC
530if BUILD_DAEMON_OFFLOAD
531SCM_TESTS += tests/offload.scm
532else
533EXTRA_DIST += tests/offload.scm
534endif
535
30dd8310 536SH_TESTS = \
0afdc485 537 tests/guix-build.sh \
96915a44 538 tests/guix-build-branch.sh \
37d19403 539 tests/guix-download.sh \
fe8ff028 540 tests/guix-gc.sh \
a9871278 541 tests/guix-git-authenticate.sh \
ccbce848 542 tests/guix-hash.sh \
272c0709 543 tests/guix-pack.sh \
08f41083 544 tests/guix-pack-localstatedir.sh \
b07014f5 545 tests/guix-pack-relocatable.sh \
0820098d 546 tests/guix-package.sh \
d824cfba 547 tests/guix-package-aliases.sh \
57b86237 548 tests/guix-package-net.sh \
c1202fb1 549 tests/guix-system.sh \
760c60d6 550 tests/guix-archive.sh \
dd7c013d 551 tests/guix-authenticate.sh \
cad25264 552 tests/guix-environment.sh \
f535dcbe 553 tests/guix-environment-container.sh \
88856916 554 tests/guix-graph.sh \
bd747018 555 tests/guix-describe.sh \
c924e541 556 tests/guix-repl.sh \
dd7c013d 557 tests/guix-lint.sh
af51c820 558
30dd8310
LC
559TESTS = $(SCM_TESTS) $(SH_TESTS)
560
a9edb211 561AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
352ec143 562
4d9ed584
LC
563SCM_LOG_DRIVER = \
564 $(top_builddir)/test-env --quiet-stderr \
565 $(GUILE) --no-auto-compile -e main \
566 $(top_srcdir)/build-aux/test-driver.scm
567
a9edb211 568AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
97298ffa 569
69cfce50 570SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
97298ffa 571AM_SH_LOG_FLAGS = -x -e
af51c820 572
3a33730a
LC
573# Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
574# could end up removing files from the store while they are being used by
575# other instances of the daemon.
576tests/guix-gc.log: \
577 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
578 $(SCM_TESTS:%.scm=%.log)
579
bb251307
LC
580else !CAN_RUN_TESTS
581
582TESTS =
583SH_TESTS =
584SCM_TESTS =
585
586# Automake always generates a 'check' target, so better not override it.
587check-local:
588 @echo
589 @echo "Cannot run tests because file name limits would be exceeded." >&2
590 @echo "Look for 'length' in the 'config.log' file for details." >&2
591 @echo
592 @exit 1
593
594endif !CAN_RUN_TESTS
595
4f024ef3 596check-system: $(GOBJECTS)
e9f693d0 597 $(AM_V_at)$(top_builddir)/pre-inst-env \
5ec4156b 598 guix build -m $(top_srcdir)/etc/system-tests.scm -K
e9f693d0 599
3a8bfebe 600# Public keys used to sign substitutes.
d9a0bd4c 601dist_pkgdata_DATA = \
d283bb96 602 etc/substitutes/berlin.guix.gnu.org.pub \
757e633d 603 etc/substitutes/ci.guix.gnu.org.pub \
26499816
CB
604 etc/substitutes/ci.guix.info.pub \
605 etc/substitutes/bordeaux.guix.gnu.org.pub
3a33730a 606
ee3e157d 607# Bash completion file.
bba0fa24
OP
608dist_bashcompletion_DATA = etc/completion/bash/guix \
609 etc/completion/bash/guix-daemon
ee3e157d 610
96dbc930
ELB
611# Zsh completion file.
612dist_zshcompletion_DATA = etc/completion/zsh/_guix
613
b83fc85f 614# Fish completion file.
615dist_fishcompletion_DATA = etc/completion/fish/guix.fish
616
b617a9fe 617# SELinux policy
d4031410 618nodist_selinux_policy_DATA = etc/guix-daemon.cil
b617a9fe 619
b9fe8fd6 620EXTRA_DIST += \
81f61c17
LC
621 HACKING \
622 ROADMAP \
623 TODO \
e15fcdd1 624 CODE-OF-CONDUCT \
81f61c17 625 .dir-locals.el \
627e61f1 626 .guix-authorizations \
dcc90d15 627 .guix-channel \
c92e5612 628 scripts/guix.in \
6f4e8693 629 etc/guix-install.sh \
90ca791a 630 etc/news.scm \
f292c501 631 etc/release-manifest.scm \
5ec4156b 632 etc/system-tests.scm \
4b9b8b2e 633 etc/historical-authorizations \
f81ac34d 634 build-aux/build-self.scm \
de6af327 635 build-aux/compile-all.scm \
45265d55 636 build-aux/cuirass/hurd-manifest.scm \
81f61c17 637 build-aux/check-final-inputs-self-contained.scm \
1ad5209d 638 build-aux/check-channel-news.scm \
2cfc8d69 639 build-aux/compile-as-derivation.scm \
1c2ae810 640 build-aux/generate-authors.scm \
3cf0dbda 641 build-aux/test-driver.scm \
94fa8d76 642 build-aux/update-guix-package.scm \
920803fb 643 build-aux/update-NEWS.scm \
81f61c17
LC
644 tests/test.drv \
645 tests/signing-key.pub \
646 tests/signing-key.sec \
74afaa37 647 tests/cve-sample.json \
43408e30
LC
648 tests/civodul.key \
649 tests/rsa.key \
650 tests/dsa.key \
651 tests/ed25519.key \
652 tests/ed25519.sec \
c83eedba
LC
653 tests/ed25519bis.key \
654 tests/ed25519bis.sec \
81f61c17
LC
655 build-aux/config.rpath \
656 bootstrap \
ccadafdc 657 doc/build.scm \
ed795c06 658 $(TESTS)
d7672884 659
49e6291a
LC
660if !BUILD_DAEMON_OFFLOAD
661
662EXTRA_DIST += \
663 guix/scripts/offload.scm
664
665endif !BUILD_DAEMON_OFFLOAD
666
667
30dd8310 668CLEANFILES = \
cba386c1 669 $(bin_SCRIPTS) \
30dd8310 670 $(GOBJECTS) \
9bff16b3 671 $(SCM_TESTS:tests/%.scm=%.log)
af51c820 672
28561d85
LC
673# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
674# $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
675# there that are newer than the local .scm files (for instance because the
676# user ran 'make install' recently). When that happens, we end up loading
677# those previously-installed .go files, which may be stale, thereby breaking
d92e23dc
LC
678# the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly
679# stale files from ~/.cache/guile/ccache.
de6af327 680%.go: make-go ; @:
ef82ba9d
LC
681make-go: make-core-go make-packages-go make-system-go make-cli-go
682
683# Define a rule to build a subset of the .go files.
684define guile-compilation-rule
685
686$(1): $(2)
687 $(AM_V_at)echo "Compiling Scheme modules..." ; \
688 unset GUILE_LOAD_COMPILED_PATH ; \
689 XDG_CACHE_HOME=/nowhere \
690 host=$(host) srcdir="$(top_srcdir)" \
691 $(top_builddir)/pre-inst-env \
692 $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
693 --no-auto-compile \
694 -s "$(top_srcdir)"/build-aux/compile-all.scm \
695 --total $(words $(MODULES)) \
696 --completed $(3) \
697 $$(filter %.scm,$$^)
698
699.PHONY: $(1)
700
701endef
702
703# Split compilation in several steps, each of which building a subset of
704# $(MODULES). The main goal is to reduce peak memory consumption, as reported
705# in <https://issues.guix.gnu.org/48963>. Each 'eval' call below creates a
706# 'make-*-go' phony target that builds the corresponding subset.
707
0a02abde 708MODULES_CORE = guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES)))
ef82ba9d 709MODULES_PACKAGES = $(filter gnu/packages/%,$(MODULES))
0a02abde 710MODULES_SYSTEM = gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES)))
ef82ba9d
LC
711MODULES_CLI = $(filter guix/scripts/%,$(MODULES))
712
713$(eval $(call guile-compilation-rule,make-core-go, \
714 $(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \
715 0))
716
717$(eval $(call guile-compilation-rule,make-packages-go, \
718 $(MODULES_PACKAGES) make-core-go, \
719 $(words $(MODULES_CORE))))
720
721$(eval $(call guile-compilation-rule,make-system-go, \
722 $(MODULES_SYSTEM) make-packages-go make-core-go, \
723 $(words $(MODULES_CORE) $(MODULES_PACKAGES))))
724
725$(eval $(call guile-compilation-rule,make-cli-go, \
726 $(MODULES_CLI) make-system-go make-packages-go make-core-go, \
727 $(words $(MODULES_CORE) $(MODULES_PACKAGES) $(MODULES_SYSTEM))))
af51c820
LC
728
729SUFFIXES = .go
730
731# Make sure source files are installed first, so that the mtime of
732# installed compiled files is greater than that of installed source
733# files. See
734# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
735# for details.
9437fd73 736guix_install_go_files = install-nobase_nodist_guileobjectDATA
af51c820 737$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
f68b0893 738
6005bd07 739# The above trick doesn't work for 'config.go' because both 'config.scm' and
9437fd73 740# 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it
6005bd07 741# special treatment.
92d00ca4 742install-data-hook:
9437fd73 743 touch "$(DESTDIR)$(guileobjectdir)/guix/config.go"
6005bd07 744
5d95ac91
LC
745# Commit corresponding to the 'v1.0.0' tag.
746commit_v1_0_0 = 6298c3ffd9654d3231a6f25390b056483e8f407c
1e43ab2c 747
96bf434c
LC
748# Introduction of the 'guix' channel. Keep in sync with (guix channels)!
749channel_intro_commit = 9edb3f66fd807b096b48283debdcddccfea34bad
750channel_intro_signer = BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA
751
1dba0b45 752# Authenticate the current Git checkout by checking signatures on every commit.
ef6596a2 753GUIX_GIT_KEYRING = origin/keyring
1dba0b45 754authenticate:
1e43ab2c 755 $(AM_V_at)echo "Authenticating Git checkout..." ; \
1dba0b45 756 guix git authenticate \
ef6596a2 757 --keyring=$(GUIX_GIT_KEYRING) \
96bf434c
LC
758 --cache-key=channels/guix --stats \
759 "$(channel_intro_commit)" "$(channel_intro_signer)"
1e43ab2c 760
2cfc8d69
LC
761# Assuming Guix is already installed and the daemon is up and running, this
762# rule builds from $(srcdir), creating and building derivations.
763as-derivation:
764 $(AM_V_at)echo "Building Guix in Guix..." ; \
765 $(GUILE) --no-auto-compile \
766 "$(top_srcdir)/build-aux/compile-as-derivation.scm" \
767 "$(abs_top_srcdir)"
6005bd07 768
ee764179 769SUBDIRS = po/guix po/packages
931c132a 770BUILT_SOURCES =
a9424c08 771
03d0e2d2 772include doc/local.mk
568717fd 773
c2033df4
LC
774if BUILD_DAEMON
775
03d0e2d2 776include nix/local.mk
c2033df4
LC
777
778endif BUILD_DAEMON
779
f68b0893 780ACLOCAL_AMFLAGS = -I m4
ef5f5c86
LC
781
782# Pass an explicit '--localstatedir' so that configure does not error out if
ddce2d3a
LC
783# it finds an existing installation with a different localstatedir. Inherit
784# 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to
785# repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short
786# enough for shebangs.
e76bdf8b 787AM_DISTCHECK_CONFIGURE_FLAGS = \
ef5f5c86 788 --localstatedir="$$dc_install_base/var" \
d388c2c4 789 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
14af289e 790 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
ddce2d3a
LC
791 --enable-daemon \
792 ac_cv_guix_test_root="$(GUIX_TEST_ROOT)"
0e993428 793
e9926f80 794# The self-contained tarball.
9d3fb6c7 795guix-binary.%.tar.xz:
33349e91 796 $(AM_V_GEN)GUIX_PACKAGE_PATH= \
1cfa6bcc 797 tarball=`$(top_builddir)/pre-inst-env guix pack -C xz \
98148830 798 --fallback \
808084e9 799 -s "$*" --localstatedir --profile-name=current-guix \
c8b1799f 800 guix` ; \
239c2266 801 cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
9d3fb6c7
LC
802
803
f995f710
MC
804# The dependency on doc-pot-update is to generate the .pot files, which are
805# not checked in.
806dist: doc-pot-update
b3f4df3f 807
1f1a0050 808dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
a8ac45b1
AK
809dist-hook: assert-no-store-file-names
810
81f61c17 811distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
e793178a 812
e6860b5e
LC
813EXTRA_DIST += $(top_srcdir)/.version
814BUILT_SOURCES += $(top_srcdir)/.version
c6e8f40f
LC
815$(top_srcdir)/.version: config.status
816 $(AM_V_GEN)echo $(VERSION) > "$@-t" && mv "$@-t" "$@"
e6860b5e
LC
817
818gen-tarball-version:
819 echo $(VERSION) > "$(distdir)/.tarball-version"
820
1f1a0050 821gen-ChangeLog:
e71ad29d 822 $(AM_V_GEN)if test -d .git; then \
e793178a 823 $(top_srcdir)/build-aux/gitlog-to-changelog \
1f1a0050 824 > $(distdir)/ChangeLog.tmp; \
e793178a 825 rm -f $(distdir)/ChangeLog; \
1f1a0050 826 mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
e793178a
LC
827 fi
828
a8ac45b1 829gen-AUTHORS:
e71ad29d 830 $(AM_V_GEN)if test -d .git; then \
ac140f79
LC
831 rm -f "$(distdir)/AUTHORS"; \
832 $(top_builddir)/pre-inst-env "$(GUILE)" \
833 "$(top_srcdir)/build-aux/generate-authors.scm" \
834 "$(top_srcdir)" "$(distdir)/AUTHORS"; \
835 fi
a8ac45b1 836
08b14ab2
LC
837# Like 'dist', but regenerate 'configure' so we get an up-to-date
838# 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to
839# do that whenever a 'dist' target is used.)
840dist-with-updated-version:
841 @echo "Running './bootstrap' for new version string..."
842 $(top_srcdir)/bootstrap
843 $(MAKE) $(AM_MAKEFLAGS) $(top_srcdir)/.version dist
844
845.PHONY: dist-with-updated-version
846
334dce14
LC
847\f
848#
849# Release management.
850#
851
852releasedir = release-$(PACKAGE_VERSION)
853
854PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
855
856# List of source tarballs produced. This must be kept in sync with the
857# 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'.
858SOURCE_TARBALLS = \
859 $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
860
861# Systems supported by Guix.
a16eb6c5
CM
862SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \
863 powerpc64le-linux
334dce14
LC
864
865# Guix binary tarballs.
866BINARY_TARBALLS = \
867 $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz)
868
13f62aef
LC
869# Systems supported by Guix System.
870GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
334dce14 871
13f62aef
LC
872# Systems for which we build Guix VMs.
873GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux
a6c642ef 874
13f62aef
LC
875# Prefix of the Guix installation image file name.
876GUIX_SYSTEM_IMAGE_BASE = guix-system-install-$(PACKAGE_VERSION)
334dce14 877
13f62aef
LC
878# Prefix of the Guix VM image file name.
879GUIX_SYSTEM_VM_IMAGE_BASE = guix-system-vm-image-$(PACKAGE_VERSION)
a6c642ef 880
dbab5eb8
LC
881# Flags for 'guix system vm-image'. By default create a VM image that appears
882# to have a 20G hard disk.
883GUIX_SYSTEM_VM_IMAGE_FLAGS ?= --image-size=30G
884
35a09fd9
LC
885# Return the sequence of '-s' flags for the given systems.
886system_flags = $(foreach system,$(1),-s $(system))
887
334dce14
LC
888# The release process works in several phases:
889#
54dc9d36 890# 0. We assume the developer created a 'vX.Y.Z' tag.
334dce14 891# 1. Build the source tarball.
54dc9d36 892# 2. Update the 'guix' package so that it corresponds to the 'vX.Y.Z' tag.
334dce14
LC
893# 3. Build the binary tarballs for that 'guix' package.
894# 4. Update the 'guix' package again.
54dc9d36
MC
895# 5. Build the installation and VM images. The images will run 'guix'
896# corresponding to 'vX.Y.Z' + 1 commit, and they will install 'vX.Y.Z'.
334dce14
LC
897#
898# This 'release' target takes care of everything and copies the resulting
899# files to $(releasedir).
73c791b8
LC
900#
901# XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext
902# issue described at <https://savannah.gnu.org/bugs/index.php?51027>.
86811312 903release: dist-with-updated-version all
2a396266
LC
904 @if ! git diff-index --quiet HEAD; then \
905 echo "There are uncommitted changes; stopping." >&2 ; \
906 exit 1 ; \
907 fi
334dce14
LC
908 $(MKDIR_P) "$(releasedir)"
909 rm -f "$(releasedir)"/*
910 mv $(SOURCE_TARBALLS) "$(releasedir)"
54dc9d36 911# Bump the Guix package version and build it.
3de898b4
MC
912 GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \
913 $(top_builddir)/pre-inst-env "$(GUILE)" \
914 $(top_srcdir)/build-aux/update-guix-package.scm \
915 "`git rev-parse HEAD`" "$(PACKAGE_VERSION)"
334dce14
LC
916 git add $(top_srcdir)/gnu/packages/package-management.scm
917 git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)."
c8b1799f 918 $(top_builddir)/pre-inst-env guix build guix \
35a09fd9 919 $(call system_flags,$(SUPPORTED_SYSTEMS)) \
98148830 920 -v1 --no-grafts --fallback
54dc9d36 921# Generate the binary release tarballs.
334dce14
LC
922 rm -f $(BINARY_TARBALLS)
923 $(MAKE) $(BINARY_TARBALLS)
924 for system in $(SUPPORTED_SYSTEMS) ; do \
925 mv "guix-binary.$$system.tar.xz" \
926 "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \
927 done
54dc9d36 928# Bump the Guix package version and build it (again).
3de898b4
MC
929 GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \
930 $(top_builddir)/pre-inst-env "$(GUILE)" \
931 $(top_srcdir)/build-aux/update-guix-package.scm \
932 "`git rev-parse HEAD`"
334dce14
LC
933 git add $(top_srcdir)/gnu/packages/package-management.scm
934 git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`."
35a09fd9
LC
935 $(top_builddir)/pre-inst-env guix build guix \
936 $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \
98148830 937 -v1 --no-grafts --fallback
54dc9d36 938# Generate the ISO installation images.
13f62aef 939 for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \
334dce14 940 image=`$(top_builddir)/pre-inst-env \
7aeef7ee 941 guix system image -t iso9660 \
313f4926 942 --label="GUIX_$${system}_$(VERSION)" \
98148830 943 --system=$$system --fallback \
334dce14
LC
944 gnu/system/install.scm` ; \
945 if [ ! -f "$$image" ] ; then \
13f62aef 946 echo "failed to produced Guix installation image for $$system" >&2 ; \
334dce14
LC
947 exit 1 ; \
948 fi ; \
82c0f34c
LC
949 cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \
950 mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" \
951 "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso" ; \
334dce14 952 done
54dc9d36 953# Generate the VM images.
13f62aef 954 for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \
a6c642ef 955 image=`$(top_builddir)/pre-inst-env \
7aeef7ee 956 guix system image -t qcow2 $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \
9d0b9c7c 957 --save-provenance \
98148830 958 --system=$$system --fallback \
a6c642ef
LF
959 gnu/system/examples/vm-image.tmpl` ; \
960 if [ ! -f "$$image" ] ; then \
13f62aef 961 echo "failed to produced Guix VM image for $$system" >&2 ; \
a6c642ef
LF
962 exit 1 ; \
963 fi ; \
b1b41a23 964 cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2"; \
a6c642ef 965 done
2a396266
LC
966 @echo
967 @echo "Congratulations! All the release files are now in $(releasedir)."
968 @echo
334dce14 969
94fa8d76
LC
970update-guix-package:
971 git rev-parse HEAD
972 $(top_builddir)/pre-inst-env "$(GUILE)" \
973 $(top_srcdir)/build-aux/update-guix-package.scm \
974 "`git rev-parse HEAD`"
975
920803fb
LC
976# Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>.
977# Package data from this checkout is used by 'update-NEWS.scm'.
978GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance
979
980update-NEWS: $(GOBJECTS)
981 $(top_builddir)/pre-inst-env "$(GUILE)" \
982 $(top_srcdir)/build-aux/update-NEWS.scm \
983 $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data"
984
834129e0 985# Make sure we're not shipping a file that embeds a local /gnu/store file name.
1f1a0050 986assert-no-store-file-names:
e71ad29d 987 $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
69e7322f
LC
988 --exclude=*.info-[0-9] --exclude=*.dot \
989 --exclude=*.eps --exclude-dir=bootstrap \
7bc46ecc
RW
990 --exclude=guix-manual.pot --exclude=guix-manual.*.po \
991 --exclude=guix-cookbook.pot --exclude=guix-cookbook.*.po \
69e7322f 992 --exclude=guix-prettify.el \
1f1a0050 993 --exclude=ChangeLog* \
0b2ea781 994 --exclude=binutils-boot-2.20*.patch \
69e7322f 995 -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
a463ffd9
LC
996 then \
997 echo "error: store file names embedded in the distribution" >&2 ; \
998 exit 1 ; \
999 fi
1000
0bc02bec 1001# Make sure important substitutes are available.
93cba30c 1002assert-binaries-available: $(GOBJECTS)
f292c501
LC
1003 $(AM_V_at)$(top_builddir)/pre-inst-env \
1004 guix weather -m "$(top_srcdir)/etc/release-manifest.scm" \
1005 --display-missing
56fbf262 1006
81f61c17 1007# Make sure the final inputs don't refer to bootstrap tools.
93cba30c 1008assert-final-inputs-self-contained: $(GOBJECTS)
e71ad29d 1009 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
81f61c17
LC
1010 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
1011
1ad5209d
LC
1012# Validate channel news.
1013check-channel-news: $(GOBJECTS)
1014 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
1015 "$(top_srcdir)/build-aux/check-channel-news.scm"
1016
76bea3f8
MO
1017# Compute the Cuirass jobs.
1018cuirass-jobs: $(GOBJECTS)
1019 rm -rf "$@"
1020 $(AM_V_at)$(MKDIR_P) "$@"
89cbec89 1021 $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
76bea3f8 1022 "$(top_srcdir)/build-aux/cuirass/evaluate.scm" "$@"
454caca8 1023
e6860b5e 1024.PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
56fbf262 1025.PHONY: assert-no-store-file-names assert-binaries-available
1ad5209d 1026.PHONY: assert-final-inputs-self-contained check-channel-news
1e43ab2c 1027.PHONY: clean-go make-go as-derivation authenticate
76bea3f8 1028.PHONY: update-guix-package update-NEWS cuirass-jobs release
8c3d8894 1029
61a224ad
LC
1030# Downloading up-to-date PO files.
1031
45549e9f
JL
1032WEBLATE_REPO = https://framagit.org/tyreunom/guix-translations
1033
1034# Shallow clone the Git repository behind Weblate and copy files from it if
1035# they contain at least one translation, and they are well-formed (Scheme
1036# format only), warn otherwise. Copied files are converted to a canonical
1037# form.
1038download-po:
1039 dir=$$(mktemp -d); \
1040 git clone --depth 1 "$(WEBLATE_REPO)" "$$dir/translations"; \
1041 for domain in po/doc po/guix po/packages; do \
1042 for po in "$$dir/translations/$$domain"/*.po; do \
1043 translated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | cut -f1 -d' '); \
1044 target=$$(basename "$$po"); \
1045 target="$$domain/$$target"; \
1046 if msgfmt -c "$$po" && [ "$$translated" != "0" ]; then \
1047 msgfilter --no-wrap -i "$$po" cat > "$$po".tmp; \
1048 mv "$$po".tmp "$$target"; \
1049 echo "copied $$target."; \
1050 else \
1051 echo "WARN: $$target ($$translated translated messages) was not added/updated."; \
1052 fi; \
1053 done; \
1054 done; \
1055 rm -rf "$$dir"
61a224ad
LC
1056.PHONY: download-po
1057
8c3d8894
ML
1058## -------------- ##
1059## Silent rules. ##
1060## -------------- ##
1061
1062AM_V_DL = $(AM_V_DL_$(V))
1063AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
1064AM_V_DL_0 = @echo " DL " $@;
4c48878d
ML
1065
1066AM_V_DOT = $(AM_V_DOT_$(V))
1067AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
1068AM_V_DOT_0 = @echo " DOT " $@;
71ed439b 1069
8dddedf7
ML
1070AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
1071AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
1072AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
b9fe8fd6
JL
1073
1074AM_V_PO4A = $(AM_V_PO4A_$(V))
1075AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
1076AM_V_PO4A_0 = @echo " PO4A" $@;
06c4778a
LC
1077
1078AM_V_POXREF = $(AM_V_POXREF_$(V))
1079AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY))
1080AM_V_POXREF_0 = @echo " POXREF" $@;