gnu: r-wgcna: Move to (gnu packages bioconductor).
[jackhill/guix/guix.git] / Makefile.am
1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 # Copyright © 2015, 2017 Alex Kost <alezost@gmail.com>
5 # Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
6 # Copyright © 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
7 # Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
8 # Copyright © 2017 Leo Famulari <leo@famulari.name>
9 # Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
10 # Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
11 # Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
12 # Copyright © 2018 Nikita <nikita@n0.is>
13 # Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
14 # Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
15 # Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
16 # Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
17 #
18 # This file is part of GNU Guix.
19 #
20 # GNU Guix is free software; you can redistribute it and/or modify it
21 # under the terms of the GNU General Public License as published by
22 # the Free Software Foundation; either version 3 of the License, or (at
23 # your option) any later version.
24 #
25 # GNU Guix is distributed in the hope that it will be useful, but
26 # WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 # GNU General Public License for more details.
29 #
30 # You should have received a copy of the GNU General Public License
31 # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33 MSGMERGE_UPDATE = @MSGMERGE@ --update
34
35 bin_SCRIPTS = scripts/guix
36
37 # Handle substitution of fully-expanded Autoconf variables.
38 do_subst = $(SED) \
39 -e 's,[@]GUILE[@],$(GUILE),g' \
40 -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
41 -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
42 -e 's,[@]localedir[@],$(localedir),g'
43
44 scripts/guix: scripts/guix.in Makefile
45 $(AM_V_at)rm -f $@ $@-t
46 $(AM_V_at)$(MKDIR_P) "$(@D)"
47 $(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
48 $(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
49
50 nodist_noinst_SCRIPTS = \
51 pre-inst-env \
52 test-env
53
54 # Modules that are not compiled but are installed nonetheless, such as
55 # build-side modules with unusual dependencies.
56 MODULES_NOT_COMPILED = \
57 guix/build/po.scm \
58 guix/man-db.scm
59
60 include gnu/local.mk
61 include po/doc/local.mk
62
63 MODULES = \
64 guix/base16.scm \
65 guix/base32.scm \
66 guix/base64.scm \
67 guix/ci.scm \
68 guix/cpio.scm \
69 guix/deprecation.scm \
70 guix/docker.scm \
71 guix/records.scm \
72 guix/openpgp.scm \
73 guix/pki.scm \
74 guix/progress.scm \
75 guix/combinators.scm \
76 guix/memoization.scm \
77 guix/utils.scm \
78 guix/sets.scm \
79 guix/modules.scm \
80 guix/download.scm \
81 guix/discovery.scm \
82 guix/android-repo-download.scm \
83 guix/bzr-download.scm \
84 guix/git-download.scm \
85 guix/hg-download.scm \
86 guix/swh.scm \
87 guix/monads.scm \
88 guix/monad-repl.scm \
89 guix/gexp.scm \
90 guix/profiles.scm \
91 guix/serialization.scm \
92 guix/nar.scm \
93 guix/derivations.scm \
94 guix/grafts.scm \
95 guix/repl.scm \
96 guix/inferior.scm \
97 guix/describe.scm \
98 guix/quirks.scm \
99 guix/channels.scm \
100 guix/gnu-maintenance.scm \
101 guix/self.scm \
102 guix/upstream.scm \
103 guix/licenses.scm \
104 guix/lint.scm \
105 guix/glob.scm \
106 guix/git.scm \
107 guix/git-authenticate.scm \
108 guix/graph.scm \
109 guix/cache.scm \
110 guix/cve.scm \
111 guix/workers.scm \
112 guix/build-system.scm \
113 guix/build-system/android-ndk.scm \
114 guix/build-system/ant.scm \
115 guix/build-system/cargo.scm \
116 guix/build-system/clojure.scm \
117 guix/build-system/cmake.scm \
118 guix/build-system/dub.scm \
119 guix/build-system/dune.scm \
120 guix/build-system/emacs.scm \
121 guix/build-system/font.scm \
122 guix/build-system/go.scm \
123 guix/build-system/meson.scm \
124 guix/build-system/minify.scm \
125 guix/build-system/asdf.scm \
126 guix/build-system/copy.scm \
127 guix/build-system/glib-or-gtk.scm \
128 guix/build-system/gnu.scm \
129 guix/build-system/guile.scm \
130 guix/build-system/haskell.scm \
131 guix/build-system/julia.scm \
132 guix/build-system/linux-module.scm \
133 guix/build-system/maven.scm \
134 guix/build-system/node.scm \
135 guix/build-system/perl.scm \
136 guix/build-system/python.scm \
137 guix/build-system/ocaml.scm \
138 guix/build-system/qt.scm \
139 guix/build-system/waf.scm \
140 guix/build-system/r.scm \
141 guix/build-system/rakudo.scm \
142 guix/build-system/ruby.scm \
143 guix/build-system/scons.scm \
144 guix/build-system/texlive.scm \
145 guix/build-system/trivial.scm \
146 guix/ftp-client.scm \
147 guix/http-client.scm \
148 guix/gnupg.scm \
149 guix/elf.scm \
150 guix/profiling.scm \
151 guix/store.scm \
152 guix/cvs-download.scm \
153 guix/svn-download.scm \
154 guix/colors.scm \
155 guix/i18n.scm \
156 guix/diagnostics.scm \
157 guix/ui.scm \
158 guix/status.scm \
159 guix/build/android-ndk-build-system.scm \
160 guix/build/ant-build-system.scm \
161 guix/build/download.scm \
162 guix/build/download-nar.scm \
163 guix/build/cargo-build-system.scm \
164 guix/build/cargo-utils.scm \
165 guix/build/cmake-build-system.scm \
166 guix/build/dub-build-system.scm \
167 guix/build/dune-build-system.scm \
168 guix/build/emacs-build-system.scm \
169 guix/build/meson-build-system.scm \
170 guix/build/minify-build-system.scm \
171 guix/build/font-build-system.scm \
172 guix/build/go-build-system.scm \
173 guix/build/android-repo.scm \
174 guix/build/asdf-build-system.scm \
175 guix/build/bzr.scm \
176 guix/build/copy-build-system.scm \
177 guix/build/git.scm \
178 guix/build/hg.scm \
179 guix/build/glib-or-gtk-build-system.scm \
180 guix/build/gnu-bootstrap.scm \
181 guix/build/gnu-build-system.scm \
182 guix/build/gnu-dist.scm \
183 guix/build/guile-build-system.scm \
184 guix/build/maven-build-system.scm \
185 guix/build/node-build-system.scm \
186 guix/build/perl-build-system.scm \
187 guix/build/python-build-system.scm \
188 guix/build/ocaml-build-system.scm \
189 guix/build/qt-build-system.scm \
190 guix/build/r-build-system.scm \
191 guix/build/rakudo-build-system.scm \
192 guix/build/ruby-build-system.scm \
193 guix/build/scons-build-system.scm \
194 guix/build/texlive-build-system.scm \
195 guix/build/waf-build-system.scm \
196 guix/build/haskell-build-system.scm \
197 guix/build/julia-build-system.scm \
198 guix/build/linux-module-build-system.scm \
199 guix/build/store-copy.scm \
200 guix/build/json.scm \
201 guix/build/utils.scm \
202 guix/build/union.scm \
203 guix/build/profiles.scm \
204 guix/build/compile.scm \
205 guix/build/rpath.scm \
206 guix/build/cvs.scm \
207 guix/build/svn.scm \
208 guix/build/syscalls.scm \
209 guix/build/gremlin.scm \
210 guix/build/debug-link.scm \
211 guix/build/clojure-build-system.scm \
212 guix/build/clojure-utils.scm \
213 guix/build/emacs-utils.scm \
214 guix/build/java-utils.scm \
215 guix/build/lisp-utils.scm \
216 guix/build/maven/java.scm \
217 guix/build/maven/plugin.scm \
218 guix/build/maven/pom.scm \
219 guix/build/graft.scm \
220 guix/build/bournish.scm \
221 guix/build/qt-utils.scm \
222 guix/build/make-bootstrap.scm \
223 guix/search-paths.scm \
224 guix/packages.scm \
225 guix/import/cabal.scm \
226 guix/import/cpan.scm \
227 guix/import/cran.scm \
228 guix/import/crate.scm \
229 guix/import/elpa.scm \
230 guix/import/gem.scm \
231 guix/import/github.scm \
232 guix/import/gnome.scm \
233 guix/import/gnu.scm \
234 guix/import/hackage.scm \
235 guix/import/json.scm \
236 guix/import/kde.scm \
237 guix/import/launchpad.scm \
238 guix/import/opam.scm \
239 guix/import/print.scm \
240 guix/import/pypi.scm \
241 guix/import/snix.scm \
242 guix/import/stackage.scm \
243 guix/import/texlive.scm \
244 guix/import/utils.scm \
245 guix/scripts.scm \
246 guix/scripts/download.scm \
247 guix/scripts/perform-download.scm \
248 guix/scripts/build.scm \
249 guix/scripts/archive.scm \
250 guix/scripts/import.scm \
251 guix/scripts/package.scm \
252 guix/scripts/install.scm \
253 guix/scripts/remove.scm \
254 guix/scripts/upgrade.scm \
255 guix/scripts/search.scm \
256 guix/scripts/show.scm \
257 guix/scripts/gc.scm \
258 guix/scripts/hash.scm \
259 guix/scripts/pack.scm \
260 guix/scripts/pull.scm \
261 guix/scripts/processes.scm \
262 guix/scripts/substitute.scm \
263 guix/scripts/authenticate.scm \
264 guix/scripts/refresh.scm \
265 guix/scripts/repl.scm \
266 guix/scripts/describe.scm \
267 guix/scripts/system.scm \
268 guix/scripts/system/search.scm \
269 guix/scripts/system/reconfigure.scm \
270 guix/scripts/lint.scm \
271 guix/scripts/challenge.scm \
272 guix/scripts/import/crate.scm \
273 guix/scripts/import/cran.scm \
274 guix/scripts/import/elpa.scm \
275 guix/scripts/import/gem.scm \
276 guix/scripts/import/gnu.scm \
277 guix/scripts/import/hackage.scm \
278 guix/scripts/import/json.scm \
279 guix/scripts/import/nix.scm \
280 guix/scripts/import/opam.scm \
281 guix/scripts/import/pypi.scm \
282 guix/scripts/import/stackage.scm \
283 guix/scripts/import/texlive.scm \
284 guix/scripts/environment.scm \
285 guix/scripts/publish.scm \
286 guix/scripts/edit.scm \
287 guix/scripts/size.scm \
288 guix/scripts/git.scm \
289 guix/scripts/git/authenticate.scm \
290 guix/scripts/graph.scm \
291 guix/scripts/weather.scm \
292 guix/scripts/container.scm \
293 guix/scripts/container/exec.scm \
294 guix/scripts/deploy.scm \
295 guix/scripts/time-machine.scm \
296 guix.scm \
297 $(GNU_SYSTEM_MODULES)
298
299 if HAVE_GUILE_SSH
300
301 MODULES += \
302 guix/ssh.scm \
303 guix/remote.scm \
304 guix/scripts/copy.scm \
305 guix/store/ssh.scm
306
307 endif HAVE_GUILE_SSH
308
309 if BUILD_DAEMON_OFFLOAD
310
311 MODULES += \
312 guix/scripts/offload.scm
313
314 endif BUILD_DAEMON_OFFLOAD
315
316 # Scheme implementation of the build daemon and related functionality.
317 STORE_MODULES = \
318 guix/store/database.scm \
319 guix/store/deduplication.scm \
320 guix/store/roots.scm
321
322 MODULES += $(STORE_MODULES)
323
324 # Internal modules with test suite support.
325 dist_noinst_DATA = \
326 guix/tests.scm \
327 guix/tests/http.scm \
328 guix/tests/git.scm \
329 guix/tests/gnupg.scm
330
331 # Auxiliary files for packages.
332 AUX_FILES = \
333 gnu/packages/aux-files/chromium/master-preferences.json \
334 gnu/packages/aux-files/emacs/guix-emacs.el \
335 gnu/packages/aux-files/linux-libre/5.8-arm.conf \
336 gnu/packages/aux-files/linux-libre/5.8-arm64.conf \
337 gnu/packages/aux-files/linux-libre/5.8-i686.conf \
338 gnu/packages/aux-files/linux-libre/5.8-x86_64.conf \
339 gnu/packages/aux-files/linux-libre/5.4-arm.conf \
340 gnu/packages/aux-files/linux-libre/5.4-arm64.conf \
341 gnu/packages/aux-files/linux-libre/5.4-i686.conf \
342 gnu/packages/aux-files/linux-libre/5.4-x86_64.conf \
343 gnu/packages/aux-files/linux-libre/4.19-arm.conf \
344 gnu/packages/aux-files/linux-libre/4.19-arm64.conf \
345 gnu/packages/aux-files/linux-libre/4.19-i686.conf \
346 gnu/packages/aux-files/linux-libre/4.19-x86_64.conf \
347 gnu/packages/aux-files/linux-libre/4.14-arm.conf \
348 gnu/packages/aux-files/linux-libre/4.14-i686.conf \
349 gnu/packages/aux-files/linux-libre/4.14-x86_64.conf \
350 gnu/packages/aux-files/linux-libre/4.9-i686.conf \
351 gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \
352 gnu/packages/aux-files/linux-libre/4.4-i686.conf \
353 gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \
354 gnu/packages/aux-files/pack-audit.c \
355 gnu/packages/aux-files/run-in-namespace.c
356
357 # Templates, examples.
358 EXAMPLES = \
359 gnu/system/examples/asus-c201.tmpl \
360 gnu/system/examples/bare-bones.tmpl \
361 gnu/system/examples/bare-hurd.tmpl \
362 gnu/system/examples/beaglebone-black.tmpl \
363 gnu/system/examples/desktop.tmpl \
364 gnu/system/examples/lightweight-desktop.tmpl \
365 gnu/system/examples/docker-image.tmpl \
366 gnu/system/examples/vm-image.tmpl
367
368 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
369
370 nobase_dist_guilemodule_DATA = \
371 guix/store/schema.sql \
372 $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \
373 $(MISC_DISTRO_FILES)
374 nobase_nodist_guilemodule_DATA = guix/config.scm
375 nobase_nodist_guileobject_DATA = $(GOBJECTS)
376
377 # Handy way to remove the .go files without removing all the rest.
378 clean-go:
379 -$(RM) -f $(GOBJECTS)
380 @find . -path ./test-tmp -prune -o -name '*.go' -print | \
381 if test -t 1; then \
382 xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \
383 else \
384 xargs -r echo "warning: stray .go files:"; \
385 fi
386
387
388 # Test extensions; has to be unconditional.
389 TEST_EXTENSIONS = .scm .sh
390
391 if CAN_RUN_TESTS
392
393 SCM_TESTS = \
394 tests/accounts.scm \
395 tests/base16.scm \
396 tests/base32.scm \
397 tests/base64.scm \
398 tests/bournish.scm \
399 tests/builders.scm \
400 tests/build-utils.scm \
401 tests/cache.scm \
402 tests/challenge.scm \
403 tests/channels.scm \
404 tests/combinators.scm \
405 tests/containers.scm \
406 tests/cpan.scm \
407 tests/cpio.scm \
408 tests/cran.scm \
409 tests/crate.scm \
410 tests/cve.scm \
411 tests/debug-link.scm \
412 tests/derivations.scm \
413 tests/discovery.scm \
414 tests/elpa.scm \
415 tests/file-systems.scm \
416 tests/gem.scm \
417 tests/gexp.scm \
418 tests/git.scm \
419 tests/git-authenticate.scm \
420 tests/glob.scm \
421 tests/gnu-maintenance.scm \
422 tests/grafts.scm \
423 tests/graph.scm \
424 tests/gremlin.scm \
425 tests/hackage.scm \
426 tests/import-utils.scm \
427 tests/inferior.scm \
428 tests/lint.scm \
429 tests/modules.scm \
430 tests/monads.scm \
431 tests/nar.scm \
432 tests/networking.scm \
433 tests/offload.scm \
434 tests/opam.scm \
435 tests/openpgp.scm \
436 tests/packages.scm \
437 tests/pack.scm \
438 tests/pki.scm \
439 tests/print.scm \
440 tests/processes.scm \
441 tests/profiles.scm \
442 tests/publish.scm \
443 tests/pypi.scm \
444 tests/records.scm \
445 tests/scripts.scm \
446 tests/scripts-build.scm \
447 tests/search-paths.scm \
448 tests/services.scm \
449 tests/services/linux.scm \
450 tests/sets.scm \
451 tests/size.scm \
452 tests/snix.scm \
453 tests/status.scm \
454 tests/store-database.scm \
455 tests/store-deduplication.scm \
456 tests/store-roots.scm \
457 tests/store.scm \
458 tests/substitute.scm \
459 tests/swh.scm \
460 tests/syscalls.scm \
461 tests/system.scm \
462 tests/texlive.scm \
463 tests/ui.scm \
464 tests/union.scm \
465 tests/upstream.scm \
466 tests/utils.scm \
467 tests/uuid.scm \
468 tests/workers.scm
469
470 SH_TESTS = \
471 tests/guix-build.sh \
472 tests/guix-build-branch.sh \
473 tests/guix-download.sh \
474 tests/guix-gc.sh \
475 tests/guix-git-authenticate.sh \
476 tests/guix-hash.sh \
477 tests/guix-pack.sh \
478 tests/guix-pack-localstatedir.sh \
479 tests/guix-pack-relocatable.sh \
480 tests/guix-package.sh \
481 tests/guix-package-aliases.sh \
482 tests/guix-package-net.sh \
483 tests/guix-system.sh \
484 tests/guix-archive.sh \
485 tests/guix-authenticate.sh \
486 tests/guix-environment.sh \
487 tests/guix-environment-container.sh \
488 tests/guix-graph.sh \
489 tests/guix-describe.sh \
490 tests/guix-repl.sh \
491 tests/guix-lint.sh
492
493 TESTS = $(SCM_TESTS) $(SH_TESTS)
494
495 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
496
497 SCM_LOG_DRIVER = \
498 $(top_builddir)/test-env --quiet-stderr \
499 $(GUILE) --no-auto-compile -e main \
500 $(top_srcdir)/build-aux/test-driver.scm
501
502 AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
503
504 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
505 AM_SH_LOG_FLAGS = -x -e
506
507 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
508 # could end up removing files from the store while they are being used by
509 # other instances of the daemon.
510 tests/guix-gc.log: \
511 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
512 $(SCM_TESTS:%.scm=%.log)
513
514 else !CAN_RUN_TESTS
515
516 TESTS =
517 SH_TESTS =
518 SCM_TESTS =
519
520 # Automake always generates a 'check' target, so better not override it.
521 check-local:
522 @echo
523 @echo "Cannot run tests because file name limits would be exceeded." >&2
524 @echo "Look for 'length' in the 'config.log' file for details." >&2
525 @echo
526 @exit 1
527
528 endif !CAN_RUN_TESTS
529
530 check-system: $(GOBJECTS)
531 $(AM_V_at)$(top_builddir)/pre-inst-env \
532 guix build -m $(top_srcdir)/etc/system-tests.scm -K
533
534 # Public keys used to sign substitutes.
535 dist_pkgdata_DATA = \
536 etc/substitutes/berlin.guix.gnu.org.pub \
537 etc/substitutes/ci.guix.gnu.org.pub \
538 etc/substitutes/ci.guix.info.pub
539
540 # Bash completion file.
541 dist_bashcompletion_DATA = etc/completion/bash/guix \
542 etc/completion/bash/guix-daemon
543
544 # Zsh completion file.
545 dist_zshcompletion_DATA = etc/completion/zsh/_guix
546
547 # Fish completion file.
548 dist_fishcompletion_DATA = etc/completion/fish/guix.fish
549
550 # SELinux policy
551 dist_selinux_policy_DATA = etc/guix-daemon.cil
552
553 EXTRA_DIST += \
554 HACKING \
555 ROADMAP \
556 TODO \
557 CODE-OF-CONDUCT \
558 .dir-locals.el \
559 .guix-channel \
560 scripts/guix.in \
561 etc/guix-install.sh \
562 etc/news.scm \
563 etc/release-manifest.scm \
564 etc/system-tests.scm \
565 etc/historical-authorizations \
566 build-aux/build-self.scm \
567 build-aux/compile-all.scm \
568 build-aux/hydra/evaluate.scm \
569 build-aux/hydra/gnu-system.scm \
570 build-aux/hydra/guix.scm \
571 build-aux/hydra/guix-modular.scm \
572 build-aux/cuirass/gnu-system.scm \
573 build-aux/cuirass/guix-modular.scm \
574 build-aux/cuirass/hydra-to-cuirass.scm \
575 build-aux/check-final-inputs-self-contained.scm \
576 build-aux/check-channel-news.scm \
577 build-aux/compile-as-derivation.scm \
578 build-aux/generate-authors.scm \
579 build-aux/test-driver.scm \
580 build-aux/update-guix-package.scm \
581 build-aux/update-NEWS.scm \
582 d3.v3.js \
583 graph.js \
584 tests/test.drv \
585 tests/signing-key.pub \
586 tests/signing-key.sec \
587 tests/cve-sample.json \
588 tests/civodul.key \
589 tests/rsa.key \
590 tests/dsa.key \
591 tests/ed25519.key \
592 tests/ed25519.sec \
593 tests/ed25519bis.key \
594 tests/ed25519bis.sec \
595 build-aux/config.rpath \
596 bootstrap \
597 doc/build.scm \
598 $(TESTS)
599
600 if !BUILD_DAEMON_OFFLOAD
601
602 EXTRA_DIST += \
603 guix/scripts/offload.scm
604
605 endif !BUILD_DAEMON_OFFLOAD
606
607
608 CLEANFILES = \
609 $(bin_SCRIPTS) \
610 $(GOBJECTS) \
611 $(SCM_TESTS:tests/%.scm=%.log)
612
613 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
614 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
615 # there that are newer than the local .scm files (for instance because the
616 # user ran 'make install' recently). When that happens, we end up loading
617 # those previously-installed .go files, which may be stale, thereby breaking
618 # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly
619 # stale files from ~/.cache/guile/ccache.
620 %.go: make-go ; @:
621 make-go: $(MODULES) guix/config.scm $(dist_noinst_DATA)
622 $(AM_V_at)echo "Compiling Scheme modules..." ; \
623 unset GUILE_LOAD_COMPILED_PATH ; \
624 XDG_CACHE_HOME=/nowhere \
625 host=$(host) srcdir="$(top_srcdir)" \
626 $(top_builddir)/pre-inst-env \
627 $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
628 --no-auto-compile \
629 -s "$(top_srcdir)"/build-aux/compile-all.scm $^
630
631 SUFFIXES = .go
632
633 # Make sure source files are installed first, so that the mtime of
634 # installed compiled files is greater than that of installed source
635 # files. See
636 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
637 # for details.
638 guix_install_go_files = install-nobase_nodist_guileobjectDATA
639 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
640
641 # The above trick doesn't work for 'config.go' because both 'config.scm' and
642 # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it
643 # special treatment.
644 install-data-hook:
645 touch "$(DESTDIR)$(guileobjectdir)/guix/config.go"
646
647 # Commit corresponding to the 'v1.0.0' tag.
648 commit_v1_0_0 = 6298c3ffd9654d3231a6f25390b056483e8f407c
649
650 # Introduction of the 'guix' channel. Keep in sync with (guix channels)!
651 channel_intro_commit = 9edb3f66fd807b096b48283debdcddccfea34bad
652 channel_intro_signer = BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA
653
654 # Authenticate the current Git checkout by checking signatures on every commit.
655 authenticate:
656 $(AM_V_at)echo "Authenticating Git checkout..." ; \
657 guix git authenticate \
658 --cache-key=channels/guix --stats \
659 "$(channel_intro_commit)" "$(channel_intro_signer)"
660
661 # Assuming Guix is already installed and the daemon is up and running, this
662 # rule builds from $(srcdir), creating and building derivations.
663 as-derivation:
664 $(AM_V_at)echo "Building Guix in Guix..." ; \
665 $(GUILE) --no-auto-compile \
666 "$(top_srcdir)/build-aux/compile-as-derivation.scm" \
667 "$(abs_top_srcdir)"
668
669 SUBDIRS = po/guix po/packages
670 BUILT_SOURCES =
671
672 include doc/local.mk
673
674 if BUILD_DAEMON
675
676 include nix/local.mk
677
678 endif BUILD_DAEMON
679
680 ACLOCAL_AMFLAGS = -I m4
681
682 # Pass an explicit '--localstatedir' so that configure does not error out if
683 # it finds an existing installation with a different localstatedir. Inherit
684 # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to
685 # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short
686 # enough for shebangs.
687 AM_DISTCHECK_CONFIGURE_FLAGS = \
688 --localstatedir="$$dc_install_base/var" \
689 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
690 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
691 --with-nix-prefix="$(NIX_PREFIX)" \
692 --enable-daemon \
693 ac_cv_guix_test_root="$(GUIX_TEST_ROOT)"
694
695 # Name of the 'guix' package shipped in the binary tarball.
696 GUIX_FOR_BINARY_TARBALL = guile3.0-guix
697
698 # The self-contained tarball.
699 guix-binary.%.tar.xz:
700 $(AM_V_GEN)GUIX_PACKAGE_PATH= \
701 tarball=`$(top_builddir)/pre-inst-env guix pack -C xz \
702 --fallback \
703 -s "$*" --localstatedir --profile-name=current-guix \
704 $(GUIX_FOR_BINARY_TARBALL)` ; \
705 cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
706
707
708 dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
709 dist-hook: assert-no-store-file-names
710 dist-hook: doc-po-update
711
712 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
713
714 EXTRA_DIST += $(top_srcdir)/.version
715 BUILT_SOURCES += $(top_srcdir)/.version
716 $(top_srcdir)/.version:
717 echo $(VERSION) > "$@-t" && mv "$@-t" "$@"
718
719 gen-tarball-version:
720 echo $(VERSION) > "$(distdir)/.tarball-version"
721
722 gen-ChangeLog:
723 $(AM_V_GEN)if test -d .git; then \
724 $(top_srcdir)/build-aux/gitlog-to-changelog \
725 > $(distdir)/ChangeLog.tmp; \
726 rm -f $(distdir)/ChangeLog; \
727 mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
728 fi
729
730 gen-AUTHORS:
731 $(AM_V_GEN)if test -d .git; then \
732 rm -f "$(distdir)/AUTHORS"; \
733 $(top_builddir)/pre-inst-env "$(GUILE)" \
734 "$(top_srcdir)/build-aux/generate-authors.scm" \
735 "$(top_srcdir)" "$(distdir)/AUTHORS"; \
736 fi
737
738 # Like 'dist', but regenerate 'configure' so we get an up-to-date
739 # 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to
740 # do that whenever a 'dist' target is used.)
741 dist-with-updated-version:
742 @echo "Running './bootstrap' for new version string..."
743 $(top_srcdir)/bootstrap
744 $(MAKE) $(AM_MAKEFLAGS) $(top_srcdir)/.version dist
745
746 .PHONY: dist-with-updated-version
747
748 \f
749 #
750 # Release management.
751 #
752
753 releasedir = release-$(PACKAGE_VERSION)
754
755 PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
756
757 # List of source tarballs produced. This must be kept in sync with the
758 # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'.
759 SOURCE_TARBALLS = \
760 $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
761
762 # Systems supported by Guix.
763 SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux
764
765 # Guix binary tarballs.
766 BINARY_TARBALLS = \
767 $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz)
768
769 # Systems supported by Guix System.
770 GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
771
772 # Systems for which we build Guix VMs.
773 GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux
774
775 # Prefix of the Guix installation image file name.
776 GUIX_SYSTEM_IMAGE_BASE = guix-system-install-$(PACKAGE_VERSION)
777
778 # Prefix of the Guix VM image file name.
779 GUIX_SYSTEM_VM_IMAGE_BASE = guix-system-vm-image-$(PACKAGE_VERSION)
780
781 # Flags for 'guix system vm-image'. By default create a VM image that appears
782 # to have a 20G hard disk.
783 GUIX_SYSTEM_VM_IMAGE_FLAGS ?= --image-size=30G
784
785 # Return the sequence of '-s' flags for the given systems.
786 system_flags = $(foreach system,$(1),-s $(system))
787
788 # The release process works in several phases:
789 #
790 # 0. We assume the developer created a 'vX.Y' tag.
791 # 1. Build the source tarball.
792 # 2. Update the 'guix' package so that it corresponds to the 'vX.Y' tag.
793 # 3. Build the binary tarballs for that 'guix' package.
794 # 4. Update the 'guix' package again.
795 # 5. Build the installation images. The images will run 'guix'
796 # corresponding to 'vX.Y' + 1 commit, and they will install 'vX.Y'.
797 #
798 # This 'release' target takes care of everything and copies the resulting
799 # files to $(releasedir).
800 #
801 # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext
802 # issue described at <https://savannah.gnu.org/bugs/index.php?51027>.
803 release: dist-with-updated-version
804 cd po; git checkout .
805 @if ! git diff-index --quiet HEAD; then \
806 echo "There are uncommitted changes; stopping." >&2 ; \
807 exit 1 ; \
808 fi
809 $(MKDIR_P) "$(releasedir)"
810 rm -f "$(releasedir)"/*
811 mv $(SOURCE_TARBALLS) "$(releasedir)"
812 $(top_builddir)/pre-inst-env "$(GUILE)" \
813 $(top_srcdir)/build-aux/update-guix-package.scm \
814 "`git rev-parse HEAD`" "$(PACKAGE_VERSION)"
815 git add $(top_srcdir)/gnu/packages/package-management.scm
816 git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)."
817 $(top_builddir)/pre-inst-env guix build $(GUIX_FOR_BINARY_TARBALL) \
818 $(call system_flags,$(SUPPORTED_SYSTEMS)) \
819 -v1 --no-grafts --fallback
820 rm -f $(BINARY_TARBALLS)
821 $(MAKE) $(BINARY_TARBALLS)
822 for system in $(SUPPORTED_SYSTEMS) ; do \
823 mv "guix-binary.$$system.tar.xz" \
824 "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \
825 done
826 $(top_builddir)/pre-inst-env "$(GUILE)" \
827 $(top_srcdir)/build-aux/update-guix-package.scm \
828 "`git rev-parse HEAD`"
829 git add $(top_srcdir)/gnu/packages/package-management.scm
830 git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`."
831 $(top_builddir)/pre-inst-env guix build guix \
832 $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \
833 -v1 --no-grafts --fallback
834 for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \
835 image=`$(top_builddir)/pre-inst-env \
836 guix system disk-image \
837 --file-system-type=iso9660 \
838 --label="GUIX_$${system}_$(VERSION)" \
839 --system=$$system --fallback \
840 gnu/system/install.scm` ; \
841 if [ ! -f "$$image" ] ; then \
842 echo "failed to produced Guix installation image for $$system" >&2 ; \
843 exit 1 ; \
844 fi ; \
845 xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" ; \
846 mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" \
847 "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz" ; \
848 done
849 for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \
850 image=`$(top_builddir)/pre-inst-env \
851 guix system vm-image $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \
852 --save-provenance \
853 --system=$$system --fallback \
854 gnu/system/examples/vm-image.tmpl` ; \
855 if [ ! -f "$$image" ] ; then \
856 echo "failed to produced Guix VM image for $$system" >&2 ; \
857 exit 1 ; \
858 fi ; \
859 xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz.tmp" ; \
860 mv "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz.tmp" \
861 "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz" ; \
862 done
863 @echo
864 @echo "Congratulations! All the release files are now in $(releasedir)."
865 @echo
866
867 update-guix-package:
868 git rev-parse HEAD
869 $(top_builddir)/pre-inst-env "$(GUILE)" \
870 $(top_srcdir)/build-aux/update-guix-package.scm \
871 "`git rev-parse HEAD`"
872
873 # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>.
874 # Package data from this checkout is used by 'update-NEWS.scm'.
875 GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance
876
877 update-NEWS: $(GOBJECTS)
878 $(top_builddir)/pre-inst-env "$(GUILE)" \
879 $(top_srcdir)/build-aux/update-NEWS.scm \
880 $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data"
881
882 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
883 assert-no-store-file-names:
884 $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
885 --exclude=*.info-[0-9] --exclude=*.dot \
886 --exclude=*.eps --exclude-dir=bootstrap \
887 --exclude=guix-manual.pot --exclude=guix-manual.*.po \
888 --exclude=guix-cookbook.pot --exclude=guix-cookbook.*.po \
889 --exclude=guix-prettify.el \
890 --exclude=ChangeLog* \
891 --exclude=binutils-boot-2.20*.patch \
892 -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
893 then \
894 echo "error: store file names embedded in the distribution" >&2 ; \
895 exit 1 ; \
896 fi
897
898 # Make sure important substitutes are available.
899 assert-binaries-available: $(GOBJECTS)
900 $(AM_V_at)$(top_builddir)/pre-inst-env \
901 guix weather -m "$(top_srcdir)/etc/release-manifest.scm" \
902 --display-missing
903
904 # Make sure the final inputs don't refer to bootstrap tools.
905 assert-final-inputs-self-contained: $(GOBJECTS)
906 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
907 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
908
909 # Validate channel news.
910 check-channel-news: $(GOBJECTS)
911 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
912 "$(top_srcdir)/build-aux/check-channel-news.scm"
913
914 # Compute the Hydra jobs and write them in the target file.
915 hydra-jobs.scm: $(GOBJECTS)
916 $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
917 $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
918 "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
919 "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
920 $(AM_V_at)mv "$@.tmp" "$@"
921
922 # Compute the Cuirass jobs and write them in the target file.
923 cuirass-jobs.scm: $(GOBJECTS)
924 $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
925 $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
926 "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
927 "$(top_srcdir)/build-aux/cuirass/gnu-system.scm" \
928 cuirass > "$@.tmp"
929 $(AM_V_at)mv "$@.tmp" "$@"
930
931 .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
932 .PHONY: assert-no-store-file-names assert-binaries-available
933 .PHONY: assert-final-inputs-self-contained check-channel-news
934 .PHONY: clean-go make-go as-derivation authenticate
935 .PHONY: update-guix-package update-NEWS release
936
937 # Downloading up-to-date PO files.
938
939 # make-download-po-rule DOMAIN DIRECTORY [FILE-NAME-PREFIX]
940 define make-download-po-rule
941
942 download-po.$(1):
943 if [ -f "$(top_srcdir)/$(2)/LINGUAS" ]; then \
944 LINGUAS="`grep -v '^[[:blank:]]*#' < $(top_srcdir)/$(2)/LINGUAS`" ; \
945 else \
946 LINGUAS="`(cd $(top_srcdir)/$(2); \
947 for i in *.po; do echo $$$$i; done) | cut -d . -f 2`" ; \
948 fi ; \
949 for lang in $$$$LINGUAS; do \
950 if wget -nv -O "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" \
951 "https://translationproject.org/latest/$(1)/$$$$lang.po" ; \
952 then \
953 mv "$(top_srcdir)/$(2)/$(3)$$$$lang.po"{.tmp,} ; \
954 else \
955 rm "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" ; \
956 fi ; \
957 done
958
959 .PHONY: download-po.$(1)
960
961 endef
962
963 $(eval $(call make-download-po-rule,guix,po/guix))
964 $(eval $(call make-download-po-rule,guix-packages,po/packages))
965 $(eval $(call make-download-po-rule,guix-manual,po/doc,guix-manual.))
966
967 download-po: $(foreach domain,guix guix-packages guix-manual,download-po.$(domain))
968 .PHONY: download-po
969
970 ## -------------- ##
971 ## Silent rules. ##
972 ## -------------- ##
973
974 AM_V_DL = $(AM_V_DL_$(V))
975 AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
976 AM_V_DL_0 = @echo " DL " $@;
977
978 AM_V_DOT = $(AM_V_DOT_$(V))
979 AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
980 AM_V_DOT_0 = @echo " DOT " $@;
981
982 AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
983 AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
984 AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
985
986 AM_V_PO4A = $(AM_V_PO4A_$(V))
987 AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
988 AM_V_PO4A_0 = @echo " PO4A" $@;
989
990 AM_V_POXREF = $(AM_V_POXREF_$(V))
991 AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY))
992 AM_V_POXREF_0 = @echo " POXREF" $@;