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>
18 # This file is part of GNU Guix.
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.
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.
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/>.
33 MSGMERGE_UPDATE = @MSGMERGE@ --update
35 bin_SCRIPTS = scripts/guix
37 # Handle substitution of fully-expanded Autoconf variables.
39 -e 's,[@]GUILE[@],$(GUILE),g' \
40 -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
41 -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
42 -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \
43 -e 's,[@]localedir[@],$(localedir),g'
45 scripts/guix: scripts/guix.in Makefile
46 $(AM_V_at)rm -f $@ $@-t
47 $(AM_V_at)$(MKDIR_P) "$(@D)"
48 $(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
49 $(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
51 # This is our variant of the 'guile' executable, one that doesn't complain
53 pkglibexec_PROGRAMS = guile
54 guile_SOURCES = gnu/packages/aux-files/guile-launcher.c
55 guile_LDADD = $(GUILE_LIBS)
56 guile_CFLAGS = $(GUILE_CFLAGS)
58 # Have the 'guix' command refer to our 'guile'.
60 $(SED) -i "$(DESTDIR)$(bindir)/guix" \
61 -e 's,^#![[:graph:]]\+,#!$(pkglibexecdir)/guile,g'
63 nodist_noinst_SCRIPTS = \
67 # Modules that are not compiled but are installed nonetheless, such as
68 # build-side modules with unusual dependencies.
69 MODULES_NOT_COMPILED = \
74 include po/doc/local.mk
82 guix/deprecation.scm \
88 guix/combinators.scm \
89 guix/memoization.scm \
95 guix/android-repo-download.scm \
96 guix/bzr-download.scm \
97 guix/git-download.scm \
98 guix/hg-download.scm \
101 guix/monad-repl.scm \
104 guix/serialization.scm \
106 guix/derivations.scm \
109 guix/transformations.scm \
114 guix/gnu-maintenance.scm \
121 guix/git-authenticate.scm \
126 guix/build-system.scm \
127 guix/build-system/android-ndk.scm \
128 guix/build-system/ant.scm \
129 guix/build-system/cargo.scm \
130 guix/build-system/chicken.scm \
131 guix/build-system/clojure.scm \
132 guix/build-system/cmake.scm \
133 guix/build-system/dub.scm \
134 guix/build-system/dune.scm \
135 guix/build-system/emacs.scm \
136 guix/build-system/font.scm \
137 guix/build-system/go.scm \
138 guix/build-system/meson.scm \
139 guix/build-system/minify.scm \
140 guix/build-system/asdf.scm \
141 guix/build-system/copy.scm \
142 guix/build-system/glib-or-gtk.scm \
143 guix/build-system/gnu.scm \
144 guix/build-system/guile.scm \
145 guix/build-system/haskell.scm \
146 guix/build-system/julia.scm \
147 guix/build-system/linux-module.scm \
148 guix/build-system/maven.scm \
149 guix/build-system/node.scm \
150 guix/build-system/perl.scm \
151 guix/build-system/python.scm \
152 guix/build-system/ocaml.scm \
153 guix/build-system/qt.scm \
154 guix/build-system/waf.scm \
155 guix/build-system/r.scm \
156 guix/build-system/rakudo.scm \
157 guix/build-system/ruby.scm \
158 guix/build-system/scons.scm \
159 guix/build-system/texlive.scm \
160 guix/build-system/trivial.scm \
161 guix/ftp-client.scm \
162 guix/http-client.scm \
167 guix/cvs-download.scm \
168 guix/svn-download.scm \
171 guix/diagnostics.scm \
174 guix/build/android-ndk-build-system.scm \
175 guix/build/ant-build-system.scm \
176 guix/build/download.scm \
177 guix/build/download-nar.scm \
178 guix/build/cargo-build-system.scm \
179 guix/build/cargo-utils.scm \
180 guix/build/chicken-build-system.scm \
181 guix/build/cmake-build-system.scm \
182 guix/build/dub-build-system.scm \
183 guix/build/dune-build-system.scm \
184 guix/build/emacs-build-system.scm \
185 guix/build/meson-build-system.scm \
186 guix/build/minify-build-system.scm \
187 guix/build/font-build-system.scm \
188 guix/build/go-build-system.scm \
189 guix/build/android-repo.scm \
190 guix/build/asdf-build-system.scm \
192 guix/build/copy-build-system.scm \
195 guix/build/glib-or-gtk-build-system.scm \
196 guix/build/gnu-bootstrap.scm \
197 guix/build/gnu-build-system.scm \
198 guix/build/gnu-dist.scm \
199 guix/build/guile-build-system.scm \
200 guix/build/maven-build-system.scm \
201 guix/build/node-build-system.scm \
202 guix/build/perl-build-system.scm \
203 guix/build/python-build-system.scm \
204 guix/build/ocaml-build-system.scm \
205 guix/build/qt-build-system.scm \
206 guix/build/r-build-system.scm \
207 guix/build/rakudo-build-system.scm \
208 guix/build/ruby-build-system.scm \
209 guix/build/scons-build-system.scm \
210 guix/build/texlive-build-system.scm \
211 guix/build/waf-build-system.scm \
212 guix/build/haskell-build-system.scm \
213 guix/build/julia-build-system.scm \
214 guix/build/linux-module-build-system.scm \
215 guix/build/store-copy.scm \
216 guix/build/json.scm \
217 guix/build/utils.scm \
218 guix/build/union.scm \
219 guix/build/profiles.scm \
220 guix/build/compile.scm \
221 guix/build/rpath.scm \
224 guix/build/syscalls.scm \
225 guix/build/gremlin.scm \
226 guix/build/debug-link.scm \
227 guix/build/clojure-build-system.scm \
228 guix/build/clojure-utils.scm \
229 guix/build/emacs-utils.scm \
230 guix/build/java-utils.scm \
231 guix/build/lisp-utils.scm \
232 guix/build/maven/java.scm \
233 guix/build/maven/plugin.scm \
234 guix/build/maven/pom.scm \
235 guix/build/graft.scm \
236 guix/build/bournish.scm \
237 guix/build/qt-utils.scm \
238 guix/build/make-bootstrap.scm \
239 guix/search-paths.scm \
241 guix/import/cabal.scm \
242 guix/import/cpan.scm \
243 guix/import/cran.scm \
244 guix/import/crate.scm \
245 guix/import/elpa.scm \
246 guix/import/gem.scm \
247 guix/import/github.scm \
248 guix/import/gnome.scm \
249 guix/import/gnu.scm \
250 guix/import/hackage.scm \
251 guix/import/json.scm \
252 guix/import/kde.scm \
253 guix/import/launchpad.scm \
254 guix/import/opam.scm \
255 guix/import/print.scm \
256 guix/import/pypi.scm \
257 guix/import/snix.scm \
258 guix/import/stackage.scm \
259 guix/import/texlive.scm \
260 guix/import/utils.scm \
262 guix/scripts/download.scm \
263 guix/scripts/perform-download.scm \
264 guix/scripts/build.scm \
265 guix/scripts/archive.scm \
266 guix/scripts/import.scm \
267 guix/scripts/package.scm \
268 guix/scripts/install.scm \
269 guix/scripts/remove.scm \
270 guix/scripts/upgrade.scm \
271 guix/scripts/search.scm \
272 guix/scripts/show.scm \
273 guix/scripts/gc.scm \
274 guix/scripts/hash.scm \
275 guix/scripts/pack.scm \
276 guix/scripts/pull.scm \
277 guix/scripts/processes.scm \
278 guix/scripts/substitute.scm \
279 guix/scripts/authenticate.scm \
280 guix/scripts/refresh.scm \
281 guix/scripts/repl.scm \
282 guix/scripts/describe.scm \
283 guix/scripts/system.scm \
284 guix/scripts/system/search.scm \
285 guix/scripts/system/reconfigure.scm \
286 guix/scripts/lint.scm \
287 guix/scripts/challenge.scm \
288 guix/scripts/import/crate.scm \
289 guix/scripts/import/cran.scm \
290 guix/scripts/import/elpa.scm \
291 guix/scripts/import/gem.scm \
292 guix/scripts/import/gnu.scm \
293 guix/scripts/import/hackage.scm \
294 guix/scripts/import/json.scm \
295 guix/scripts/import/nix.scm \
296 guix/scripts/import/opam.scm \
297 guix/scripts/import/pypi.scm \
298 guix/scripts/import/stackage.scm \
299 guix/scripts/import/texlive.scm \
300 guix/scripts/environment.scm \
301 guix/scripts/publish.scm \
302 guix/scripts/edit.scm \
303 guix/scripts/size.scm \
304 guix/scripts/git.scm \
305 guix/scripts/git/authenticate.scm \
306 guix/scripts/graph.scm \
307 guix/scripts/weather.scm \
308 guix/scripts/container.scm \
309 guix/scripts/container/exec.scm \
310 guix/scripts/deploy.scm \
311 guix/scripts/time-machine.scm \
313 $(GNU_SYSTEM_MODULES)
320 guix/scripts/copy.scm \
329 guix/scripts/discover.scm
331 endif HAVE_GUILE_AVAHI
333 if BUILD_DAEMON_OFFLOAD
336 guix/scripts/offload.scm
338 endif BUILD_DAEMON_OFFLOAD
340 # Scheme implementation of the build daemon and related functionality.
342 guix/store/database.scm \
343 guix/store/deduplication.scm \
346 MODULES += $(STORE_MODULES)
348 # Internal modules with test suite support.
351 guix/tests/http.scm \
355 # Auxiliary files for packages.
357 gnu/packages/aux-files/chromium/master-preferences.json \
358 gnu/packages/aux-files/emacs/guix-emacs.el \
359 gnu/packages/aux-files/linux-libre/5.9-arm.conf \
360 gnu/packages/aux-files/linux-libre/5.9-arm64.conf \
361 gnu/packages/aux-files/linux-libre/5.9-i686.conf \
362 gnu/packages/aux-files/linux-libre/5.9-x86_64.conf \
363 gnu/packages/aux-files/linux-libre/5.4-arm.conf \
364 gnu/packages/aux-files/linux-libre/5.4-arm64.conf \
365 gnu/packages/aux-files/linux-libre/5.4-i686.conf \
366 gnu/packages/aux-files/linux-libre/5.4-x86_64.conf \
367 gnu/packages/aux-files/linux-libre/4.19-arm.conf \
368 gnu/packages/aux-files/linux-libre/4.19-arm64.conf \
369 gnu/packages/aux-files/linux-libre/4.19-i686.conf \
370 gnu/packages/aux-files/linux-libre/4.19-x86_64.conf \
371 gnu/packages/aux-files/linux-libre/4.14-arm.conf \
372 gnu/packages/aux-files/linux-libre/4.14-i686.conf \
373 gnu/packages/aux-files/linux-libre/4.14-x86_64.conf \
374 gnu/packages/aux-files/linux-libre/4.9-i686.conf \
375 gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \
376 gnu/packages/aux-files/linux-libre/4.4-i686.conf \
377 gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \
378 gnu/packages/aux-files/pack-audit.c \
379 gnu/packages/aux-files/run-in-namespace.c
381 # Templates, examples.
383 gnu/system/examples/asus-c201.tmpl \
384 gnu/system/examples/bare-bones.tmpl \
385 gnu/system/examples/bare-hurd.tmpl \
386 gnu/system/examples/beaglebone-black.tmpl \
387 gnu/system/examples/desktop.tmpl \
388 gnu/system/examples/lightweight-desktop.tmpl \
389 gnu/system/examples/docker-image.tmpl \
390 gnu/system/examples/vm-image.tmpl
392 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
394 nobase_dist_guilemodule_DATA = \
395 guix/store/schema.sql \
396 $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \
398 nobase_nodist_guilemodule_DATA = guix/config.scm
399 nobase_nodist_guileobject_DATA = $(GOBJECTS)
401 # Handy way to remove the .go files without removing all the rest.
403 -$(RM) -f $(GOBJECTS)
404 @find . -path ./test-tmp -prune -o -name '*.go' -print | \
406 xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \
408 xargs -r echo "warning: stray .go files:"; \
412 # Test extensions; has to be unconditional.
413 TEST_EXTENSIONS = .scm .sh
422 tests/boot-parameters.scm \
425 tests/build-utils.scm \
427 tests/challenge.scm \
429 tests/combinators.scm \
430 tests/containers.scm \
436 tests/debug-link.scm \
437 tests/derivations.scm \
438 tests/discovery.scm \
440 tests/file-systems.scm \
444 tests/git-authenticate.scm \
446 tests/gnu-maintenance.scm \
451 tests/import-utils.scm \
457 tests/networking.scm \
465 tests/processes.scm \
471 tests/search-paths.scm \
473 tests/services/linux.scm \
478 tests/store-database.scm \
479 tests/store-deduplication.scm \
480 tests/store-roots.scm \
482 tests/substitute.scm \
487 tests/transformations.scm \
496 tests/guix-build.sh \
497 tests/guix-build-branch.sh \
498 tests/guix-download.sh \
500 tests/guix-git-authenticate.sh \
503 tests/guix-pack-localstatedir.sh \
504 tests/guix-pack-relocatable.sh \
505 tests/guix-package.sh \
506 tests/guix-package-aliases.sh \
507 tests/guix-package-net.sh \
508 tests/guix-system.sh \
509 tests/guix-archive.sh \
510 tests/guix-authenticate.sh \
511 tests/guix-environment.sh \
512 tests/guix-environment-container.sh \
513 tests/guix-graph.sh \
514 tests/guix-describe.sh \
518 TESTS = $(SCM_TESTS) $(SH_TESTS)
520 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
523 $(top_builddir)/test-env --quiet-stderr \
524 $(GUILE) --no-auto-compile -e main \
525 $(top_srcdir)/build-aux/test-driver.scm
527 AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
529 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
530 AM_SH_LOG_FLAGS = -x -e
532 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
533 # could end up removing files from the store while they are being used by
534 # other instances of the daemon.
536 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
537 $(SCM_TESTS:%.scm=%.log)
545 # Automake always generates a 'check' target, so better not override it.
548 @echo "Cannot run tests because file name limits would be exceeded." >&2
549 @echo "Look for 'length' in the 'config.log' file for details." >&2
555 check-system: $(GOBJECTS)
556 $(AM_V_at)$(top_builddir)/pre-inst-env \
557 guix build -m $(top_srcdir)/etc/system-tests.scm -K
559 # Public keys used to sign substitutes.
560 dist_pkgdata_DATA = \
561 etc/substitutes/berlin.guix.gnu.org.pub \
562 etc/substitutes/ci.guix.gnu.org.pub \
563 etc/substitutes/ci.guix.info.pub
565 # Bash completion file.
566 dist_bashcompletion_DATA = etc/completion/bash/guix \
567 etc/completion/bash/guix-daemon
569 # Zsh completion file.
570 dist_zshcompletion_DATA = etc/completion/zsh/_guix
572 # Fish completion file.
573 dist_fishcompletion_DATA = etc/completion/fish/guix.fish
576 nodist_selinux_policy_DATA = etc/guix-daemon.cil
584 .guix-authorizations \
587 etc/guix-install.sh \
589 etc/release-manifest.scm \
590 etc/system-tests.scm \
591 etc/historical-authorizations \
592 build-aux/build-self.scm \
593 build-aux/compile-all.scm \
594 build-aux/hydra/evaluate.scm \
595 build-aux/hydra/gnu-system.scm \
596 build-aux/hydra/guix.scm \
597 build-aux/hydra/guix-modular.scm \
598 build-aux/cuirass/gnu-system.scm \
599 build-aux/cuirass/guix-modular.scm \
600 build-aux/cuirass/hurd-manifest.scm \
601 build-aux/cuirass/hydra-to-cuirass.scm \
602 build-aux/check-final-inputs-self-contained.scm \
603 build-aux/check-channel-news.scm \
604 build-aux/compile-as-derivation.scm \
605 build-aux/generate-authors.scm \
606 build-aux/test-driver.scm \
607 build-aux/update-guix-package.scm \
608 build-aux/update-NEWS.scm \
612 tests/signing-key.pub \
613 tests/signing-key.sec \
614 tests/cve-sample.json \
620 tests/ed25519bis.key \
621 tests/ed25519bis.sec \
622 build-aux/config.rpath \
627 if !BUILD_DAEMON_OFFLOAD
630 guix/scripts/offload.scm
632 endif !BUILD_DAEMON_OFFLOAD
638 $(SCM_TESTS:tests/%.scm=%.log)
640 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
641 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
642 # there that are newer than the local .scm files (for instance because the
643 # user ran 'make install' recently). When that happens, we end up loading
644 # those previously-installed .go files, which may be stale, thereby breaking
645 # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly
646 # stale files from ~/.cache/guile/ccache.
648 make-go: $(MODULES) guix/config.scm $(dist_noinst_DATA)
649 $(AM_V_at)echo "Compiling Scheme modules..." ; \
650 unset GUILE_LOAD_COMPILED_PATH ; \
651 XDG_CACHE_HOME=/nowhere \
652 host=$(host) srcdir="$(top_srcdir)" \
653 $(top_builddir)/pre-inst-env \
654 $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
656 -s "$(top_srcdir)"/build-aux/compile-all.scm $^
660 # Make sure source files are installed first, so that the mtime of
661 # installed compiled files is greater than that of installed source
663 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
665 guix_install_go_files = install-nobase_nodist_guileobjectDATA
666 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
668 # The above trick doesn't work for 'config.go' because both 'config.scm' and
669 # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it
672 touch "$(DESTDIR)$(guileobjectdir)/guix/config.go"
674 # Commit corresponding to the 'v1.0.0' tag.
675 commit_v1_0_0 = 6298c3ffd9654d3231a6f25390b056483e8f407c
677 # Introduction of the 'guix' channel. Keep in sync with (guix channels)!
678 channel_intro_commit = 9edb3f66fd807b096b48283debdcddccfea34bad
679 channel_intro_signer = BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA
681 # Authenticate the current Git checkout by checking signatures on every commit.
682 GUIX_GIT_KEYRING = origin/keyring
684 $(AM_V_at)echo "Authenticating Git checkout..." ; \
685 guix git authenticate \
686 --keyring=$(GUIX_GIT_KEYRING) \
687 --cache-key=channels/guix --stats \
688 "$(channel_intro_commit)" "$(channel_intro_signer)"
690 # Assuming Guix is already installed and the daemon is up and running, this
691 # rule builds from $(srcdir), creating and building derivations.
693 $(AM_V_at)echo "Building Guix in Guix..." ; \
694 $(GUILE) --no-auto-compile \
695 "$(top_srcdir)/build-aux/compile-as-derivation.scm" \
698 SUBDIRS = po/guix po/packages
709 ACLOCAL_AMFLAGS = -I m4
711 # Pass an explicit '--localstatedir' so that configure does not error out if
712 # it finds an existing installation with a different localstatedir. Inherit
713 # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to
714 # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short
715 # enough for shebangs.
716 AM_DISTCHECK_CONFIGURE_FLAGS = \
717 --localstatedir="$$dc_install_base/var" \
718 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
719 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
720 --with-nix-prefix="$(NIX_PREFIX)" \
722 ac_cv_guix_test_root="$(GUIX_TEST_ROOT)"
724 # Name of the 'guix' package shipped in the binary tarball.
725 GUIX_FOR_BINARY_TARBALL = guix
727 # The self-contained tarball.
728 guix-binary.%.tar.xz:
729 $(AM_V_GEN)GUIX_PACKAGE_PATH= \
730 tarball=`$(top_builddir)/pre-inst-env guix pack -C xz \
732 -s "$*" --localstatedir --profile-name=current-guix \
733 $(GUIX_FOR_BINARY_TARBALL)` ; \
734 cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
737 dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
738 dist-hook: assert-no-store-file-names
739 dist-hook: doc-po-update
741 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
743 EXTRA_DIST += $(top_srcdir)/.version
744 BUILT_SOURCES += $(top_srcdir)/.version
745 $(top_srcdir)/.version: config.status
746 $(AM_V_GEN)echo $(VERSION) > "$@-t" && mv "$@-t" "$@"
749 echo $(VERSION) > "$(distdir)/.tarball-version"
752 $(AM_V_GEN)if test -d .git; then \
753 $(top_srcdir)/build-aux/gitlog-to-changelog \
754 > $(distdir)/ChangeLog.tmp; \
755 rm -f $(distdir)/ChangeLog; \
756 mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
760 $(AM_V_GEN)if test -d .git; then \
761 rm -f "$(distdir)/AUTHORS"; \
762 $(top_builddir)/pre-inst-env "$(GUILE)" \
763 "$(top_srcdir)/build-aux/generate-authors.scm" \
764 "$(top_srcdir)" "$(distdir)/AUTHORS"; \
767 # Like 'dist', but regenerate 'configure' so we get an up-to-date
768 # 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to
769 # do that whenever a 'dist' target is used.)
770 dist-with-updated-version:
771 @echo "Running './bootstrap' for new version string..."
772 $(top_srcdir)/bootstrap
773 $(MAKE) $(AM_MAKEFLAGS) $(top_srcdir)/.version dist
775 .PHONY: dist-with-updated-version
779 # Release management.
782 releasedir = release-$(PACKAGE_VERSION)
784 PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
786 # List of source tarballs produced. This must be kept in sync with the
787 # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'.
789 $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
791 # Systems supported by Guix.
792 SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux
794 # Guix binary tarballs.
796 $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz)
798 # Systems supported by Guix System.
799 GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
801 # Systems for which we build Guix VMs.
802 GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux
804 # Prefix of the Guix installation image file name.
805 GUIX_SYSTEM_IMAGE_BASE = guix-system-install-$(PACKAGE_VERSION)
807 # Prefix of the Guix VM image file name.
808 GUIX_SYSTEM_VM_IMAGE_BASE = guix-system-vm-image-$(PACKAGE_VERSION)
810 # Flags for 'guix system vm-image'. By default create a VM image that appears
811 # to have a 20G hard disk.
812 GUIX_SYSTEM_VM_IMAGE_FLAGS ?= --image-size=30G
814 # Return the sequence of '-s' flags for the given systems.
815 system_flags = $(foreach system,$(1),-s $(system))
817 # The release process works in several phases:
819 # 0. We assume the developer created a 'vX.Y' tag.
820 # 1. Build the source tarball.
821 # 2. Update the 'guix' package so that it corresponds to the 'vX.Y' tag.
822 # 3. Build the binary tarballs for that 'guix' package.
823 # 4. Update the 'guix' package again.
824 # 5. Build the installation images. The images will run 'guix'
825 # corresponding to 'vX.Y' + 1 commit, and they will install 'vX.Y'.
827 # This 'release' target takes care of everything and copies the resulting
828 # files to $(releasedir).
830 # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext
831 # issue described at <https://savannah.gnu.org/bugs/index.php?51027>.
832 release: dist-with-updated-version
833 cd po; git checkout .
834 @if ! git diff-index --quiet HEAD; then \
835 echo "There are uncommitted changes; stopping." >&2 ; \
838 $(MKDIR_P) "$(releasedir)"
839 rm -f "$(releasedir)"/*
840 mv $(SOURCE_TARBALLS) "$(releasedir)"
841 GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \
842 $(top_builddir)/pre-inst-env "$(GUILE)" \
843 $(top_srcdir)/build-aux/update-guix-package.scm \
844 "`git rev-parse HEAD`" "$(PACKAGE_VERSION)"
845 git add $(top_srcdir)/gnu/packages/package-management.scm
846 git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)."
847 $(top_builddir)/pre-inst-env guix build $(GUIX_FOR_BINARY_TARBALL) \
848 $(call system_flags,$(SUPPORTED_SYSTEMS)) \
849 -v1 --no-grafts --fallback
850 rm -f $(BINARY_TARBALLS)
851 $(MAKE) $(BINARY_TARBALLS)
852 for system in $(SUPPORTED_SYSTEMS) ; do \
853 mv "guix-binary.$$system.tar.xz" \
854 "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \
856 GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \
857 $(top_builddir)/pre-inst-env "$(GUILE)" \
858 $(top_srcdir)/build-aux/update-guix-package.scm \
859 "`git rev-parse HEAD`"
860 git add $(top_srcdir)/gnu/packages/package-management.scm
861 git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`."
862 $(top_builddir)/pre-inst-env guix build guix \
863 $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \
864 -v1 --no-grafts --fallback
865 for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \
866 image=`$(top_builddir)/pre-inst-env \
867 guix system disk-image -t iso9660 \
868 --label="GUIX_$${system}_$(VERSION)" \
869 --system=$$system --fallback \
870 gnu/system/install.scm` ; \
871 if [ ! -f "$$image" ] ; then \
872 echo "failed to produced Guix installation image for $$system" >&2 ; \
875 xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" ; \
876 mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" \
877 "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz" ; \
879 for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \
880 image=`$(top_builddir)/pre-inst-env \
881 guix system vm-image $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \
883 --system=$$system --fallback \
884 gnu/system/examples/vm-image.tmpl` ; \
885 if [ ! -f "$$image" ] ; then \
886 echo "failed to produced Guix VM image for $$system" >&2 ; \
889 xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz.tmp" ; \
890 mv "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz.tmp" \
891 "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz" ; \
894 @echo "Congratulations! All the release files are now in $(releasedir)."
899 $(top_builddir)/pre-inst-env "$(GUILE)" \
900 $(top_srcdir)/build-aux/update-guix-package.scm \
901 "`git rev-parse HEAD`"
903 # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>.
904 # Package data from this checkout is used by 'update-NEWS.scm'.
905 GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance
907 update-NEWS: $(GOBJECTS)
908 $(top_builddir)/pre-inst-env "$(GUILE)" \
909 $(top_srcdir)/build-aux/update-NEWS.scm \
910 $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data"
912 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
913 assert-no-store-file-names:
914 $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
915 --exclude=*.info-[0-9] --exclude=*.dot \
916 --exclude=*.eps --exclude-dir=bootstrap \
917 --exclude=guix-manual.pot --exclude=guix-manual.*.po \
918 --exclude=guix-cookbook.pot --exclude=guix-cookbook.*.po \
919 --exclude=guix-prettify.el \
920 --exclude=ChangeLog* \
921 --exclude=binutils-boot-2.20*.patch \
922 -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
924 echo "error: store file names embedded in the distribution" >&2 ; \
928 # Make sure important substitutes are available.
929 assert-binaries-available: $(GOBJECTS)
930 $(AM_V_at)$(top_builddir)/pre-inst-env \
931 guix weather -m "$(top_srcdir)/etc/release-manifest.scm" \
934 # Make sure the final inputs don't refer to bootstrap tools.
935 assert-final-inputs-self-contained: $(GOBJECTS)
936 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
937 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
939 # Validate channel news.
940 check-channel-news: $(GOBJECTS)
941 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
942 "$(top_srcdir)/build-aux/check-channel-news.scm"
944 # Compute the Hydra jobs and write them in the target file.
945 hydra-jobs.scm: $(GOBJECTS)
946 $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
947 $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
948 "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
949 "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
950 $(AM_V_at)mv "$@.tmp" "$@"
952 # Compute the Cuirass jobs and write them in the target file.
953 cuirass-jobs.scm: $(GOBJECTS)
954 $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
955 $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
956 "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
957 "$(top_srcdir)/build-aux/cuirass/gnu-system.scm" \
959 $(AM_V_at)mv "$@.tmp" "$@"
961 .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
962 .PHONY: assert-no-store-file-names assert-binaries-available
963 .PHONY: assert-final-inputs-self-contained check-channel-news
964 .PHONY: clean-go make-go as-derivation authenticate
965 .PHONY: update-guix-package update-NEWS release
967 # Downloading up-to-date PO files.
969 # make-download-po-rule DOMAIN DIRECTORY [FILE-NAME-PREFIX]
970 define make-download-po-rule
973 if [ -f "$(top_srcdir)/$(2)/LINGUAS" ]; then \
974 LINGUAS="`grep -v '^[[:blank:]]*#' < $(top_srcdir)/$(2)/LINGUAS`" ; \
976 LINGUAS="`(cd $(top_srcdir)/$(2); \
977 for i in *.po; do echo $$$$i; done) | cut -d . -f 2`" ; \
979 for lang in $$$$LINGUAS; do \
980 if wget -nv -O "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" \
981 "https://translationproject.org/latest/$(1)/$$$$lang.po" ; \
983 mv "$(top_srcdir)/$(2)/$(3)$$$$lang.po"{.tmp,} ; \
985 rm "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" ; \
989 .PHONY: download-po.$(1)
993 $(eval $(call make-download-po-rule,guix,po/guix))
994 $(eval $(call make-download-po-rule,guix-packages,po/packages))
995 $(eval $(call make-download-po-rule,guix-manual,po/doc,guix-manual.))
997 download-po: $(foreach domain,guix guix-packages guix-manual,download-po.$(domain))
1000 ## -------------- ##
1002 ## -------------- ##
1004 AM_V_DL = $(AM_V_DL_$(V))
1005 AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
1006 AM_V_DL_0 = @echo " DL " $@;
1008 AM_V_DOT = $(AM_V_DOT_$(V))
1009 AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
1010 AM_V_DOT_0 = @echo " DOT " $@;
1012 AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
1013 AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
1014 AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
1016 AM_V_PO4A = $(AM_V_PO4A_$(V))
1017 AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
1018 AM_V_PO4A_0 = @echo " PO4A" $@;
1020 AM_V_POXREF = $(AM_V_POXREF_$(V))
1021 AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY))
1022 AM_V_POXREF_0 = @echo " POXREF" $@;