build: Make Guile-Git a hard requirement.
[jackhill/guix/guix.git] / Makefile.am
1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014, 2015, 2016, 2017 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 Mathieu Lirzin <mthl@gnu.org>
6 # Copyright © 2016, 2017 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 #
11 # This file is part of GNU Guix.
12 #
13 # GNU Guix is free software; you can redistribute it and/or modify it
14 # under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 3 of the License, or (at
16 # your option) any later version.
17 #
18 # GNU Guix is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 bin_SCRIPTS = \
27 scripts/guix
28
29 nodist_noinst_SCRIPTS = \
30 pre-inst-env \
31 test-env
32
33 # Modules that are not compiled but are installed nonetheless, such as
34 # build-side modules with unusual dependencies.
35 MODULES_NOT_COMPILED =
36
37 include gnu/local.mk
38
39 MODULES = \
40 guix/base16.scm \
41 guix/base32.scm \
42 guix/base64.scm \
43 guix/cpio.scm \
44 guix/records.scm \
45 guix/gcrypt.scm \
46 guix/hash.scm \
47 guix/pk-crypto.scm \
48 guix/pki.scm \
49 guix/combinators.scm \
50 guix/memoization.scm \
51 guix/utils.scm \
52 guix/sets.scm \
53 guix/modules.scm \
54 guix/download.scm \
55 guix/discovery.scm \
56 guix/git-download.scm \
57 guix/hg-download.scm \
58 guix/monads.scm \
59 guix/monad-repl.scm \
60 guix/gexp.scm \
61 guix/profiles.scm \
62 guix/serialization.scm \
63 guix/nar.scm \
64 guix/derivations.scm \
65 guix/grafts.scm \
66 guix/gnu-maintenance.scm \
67 guix/upstream.scm \
68 guix/licenses.scm \
69 guix/git.scm \
70 guix/graph.scm \
71 guix/cache.scm \
72 guix/cve.scm \
73 guix/workers.scm \
74 guix/zlib.scm \
75 guix/build-system.scm \
76 guix/build-system/ant.scm \
77 guix/build-system/cargo.scm \
78 guix/build-system/cmake.scm \
79 guix/build-system/dub.scm \
80 guix/build-system/emacs.scm \
81 guix/build-system/font.scm \
82 guix/build-system/asdf.scm \
83 guix/build-system/glib-or-gtk.scm \
84 guix/build-system/gnu.scm \
85 guix/build-system/haskell.scm \
86 guix/build-system/perl.scm \
87 guix/build-system/python.scm \
88 guix/build-system/ocaml.scm \
89 guix/build-system/waf.scm \
90 guix/build-system/r.scm \
91 guix/build-system/ruby.scm \
92 guix/build-system/texlive.scm \
93 guix/build-system/trivial.scm \
94 guix/ftp-client.scm \
95 guix/http-client.scm \
96 guix/gnupg.scm \
97 guix/elf.scm \
98 guix/store.scm \
99 guix/cvs-download.scm \
100 guix/svn-download.scm \
101 guix/ui.scm \
102 guix/build/ant-build-system.scm \
103 guix/build/download.scm \
104 guix/build/cargo-build-system.scm \
105 guix/build/cmake-build-system.scm \
106 guix/build/dub-build-system.scm \
107 guix/build/emacs-build-system.scm \
108 guix/build/font-build-system.scm \
109 guix/build/asdf-build-system.scm \
110 guix/build/git.scm \
111 guix/build/hg.scm \
112 guix/build/glib-or-gtk-build-system.scm \
113 guix/build/gnu-build-system.scm \
114 guix/build/gnu-dist.scm \
115 guix/build/perl-build-system.scm \
116 guix/build/python-build-system.scm \
117 guix/build/ocaml-build-system.scm \
118 guix/build/r-build-system.scm \
119 guix/build/ruby-build-system.scm \
120 guix/build/texlive-build-system.scm \
121 guix/build/waf-build-system.scm \
122 guix/build/haskell-build-system.scm \
123 guix/build/store-copy.scm \
124 guix/build/utils.scm \
125 guix/build/union.scm \
126 guix/build/profiles.scm \
127 guix/build/pull.scm \
128 guix/build/rpath.scm \
129 guix/build/cvs.scm \
130 guix/build/svn.scm \
131 guix/build/syscalls.scm \
132 guix/build/gremlin.scm \
133 guix/build/emacs-utils.scm \
134 guix/build/java-utils.scm \
135 guix/build/lisp-utils.scm \
136 guix/build/graft.scm \
137 guix/build/bournish.scm \
138 guix/build/qt-utils.scm \
139 guix/build/make-bootstrap.scm \
140 guix/search-paths.scm \
141 guix/packages.scm \
142 guix/import/utils.scm \
143 guix/import/gnu.scm \
144 guix/import/snix.scm \
145 guix/import/cabal.scm \
146 guix/import/cran.scm \
147 guix/import/hackage.scm \
148 guix/import/elpa.scm \
149 guix/import/texlive.scm \
150 guix/scripts.scm \
151 guix/scripts/download.scm \
152 guix/scripts/perform-download.scm \
153 guix/scripts/build.scm \
154 guix/scripts/archive.scm \
155 guix/scripts/import.scm \
156 guix/scripts/package.scm \
157 guix/scripts/gc.scm \
158 guix/scripts/hash.scm \
159 guix/scripts/pack.scm \
160 guix/scripts/pull.scm \
161 guix/scripts/substitute.scm \
162 guix/scripts/authenticate.scm \
163 guix/scripts/refresh.scm \
164 guix/scripts/system.scm \
165 guix/scripts/lint.scm \
166 guix/scripts/challenge.scm \
167 guix/scripts/import/cran.scm \
168 guix/scripts/import/gnu.scm \
169 guix/scripts/import/nix.scm \
170 guix/scripts/import/hackage.scm \
171 guix/scripts/import/elpa.scm \
172 guix/scripts/import/texlive.scm \
173 guix/scripts/environment.scm \
174 guix/scripts/publish.scm \
175 guix/scripts/weather.scm \
176 guix/scripts/edit.scm \
177 guix/scripts/size.scm \
178 guix/scripts/graph.scm \
179 guix/scripts/container.scm \
180 guix/scripts/container/exec.scm \
181 guix.scm \
182 $(GNU_SYSTEM_MODULES)
183
184 if HAVE_GUILE_JSON
185
186 MODULES += \
187 guix/docker.scm \
188 guix/import/cpan.scm \
189 guix/import/crate.scm \
190 guix/import/gem.scm \
191 guix/import/github.scm \
192 guix/import/json.scm \
193 guix/import/pypi.scm \
194 guix/import/stackage.scm \
195 guix/scripts/import/crate.scm \
196 guix/scripts/import/gem.scm \
197 guix/scripts/import/pypi.scm \
198 guix/scripts/import/stackage.scm
199
200 endif
201
202 if HAVE_GUILE_SSH
203
204 MODULES += \
205 guix/ssh.scm \
206 guix/scripts/copy.scm \
207 guix/store/ssh.scm
208
209 endif HAVE_GUILE_SSH
210
211 if BUILD_DAEMON_OFFLOAD
212
213 MODULES += \
214 guix/scripts/offload.scm
215
216 endif BUILD_DAEMON_OFFLOAD
217
218 # Internal modules with test suite support.
219 dist_noinst_DATA = guix/tests.scm guix/tests/http.scm
220
221 # Auxiliary files for packages.
222 AUX_FILES = \
223 gnu/packages/aux-files/emacs/guix-emacs.el \
224 gnu/packages/aux-files/linux-libre/4.12-i686.conf \
225 gnu/packages/aux-files/linux-libre/4.12-x86_64.conf \
226 gnu/packages/aux-files/linux-libre/4.9-i686.conf \
227 gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \
228 gnu/packages/aux-files/linux-libre/4.4-i686.conf \
229 gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \
230 gnu/packages/aux-files/linux-libre/4.1-i686.conf \
231 gnu/packages/aux-files/linux-libre/4.1-x86_64.conf
232
233 # Templates, examples.
234 EXAMPLES = \
235 gnu/system/examples/bare-bones.tmpl \
236 gnu/system/examples/desktop.tmpl \
237 gnu/system/examples/lightweight-desktop.tmpl \
238 gnu/system/examples/vm-image.tmpl
239
240 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
241
242 nobase_dist_guilemodule_DATA = \
243 $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \
244 $(MISC_DISTRO_FILES)
245 nobase_nodist_guilemodule_DATA = guix/config.scm
246 nobase_nodist_guileobject_DATA = $(GOBJECTS)
247
248 # Handy way to remove the .go files without removing all the rest.
249 clean-go:
250 -$(RM) -f $(GOBJECTS)
251 @find . -name '*.go' -print | \
252 if test -t 1; then \
253 xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \
254 else \
255 xargs -r echo "warning: stray .go files:"; \
256 fi
257
258
259 # Test extensions; has to be unconditional.
260 TEST_EXTENSIONS = .scm .sh
261
262 if CAN_RUN_TESTS
263
264 SCM_TESTS = \
265 tests/base16.scm \
266 tests/base32.scm \
267 tests/base64.scm \
268 tests/cpio.scm \
269 tests/hash.scm \
270 tests/pk-crypto.scm \
271 tests/pki.scm \
272 tests/sets.scm \
273 tests/modules.scm \
274 tests/gnu-maintenance.scm \
275 tests/substitute.scm \
276 tests/builders.scm \
277 tests/derivations.scm \
278 tests/grafts.scm \
279 tests/ui.scm \
280 tests/records.scm \
281 tests/upstream.scm \
282 tests/combinators.scm \
283 tests/discovery.scm \
284 tests/utils.scm \
285 tests/build-utils.scm \
286 tests/packages.scm \
287 tests/snix.scm \
288 tests/hackage.scm \
289 tests/cran.scm \
290 tests/elpa.scm \
291 tests/texlive.scm \
292 tests/store.scm \
293 tests/monads.scm \
294 tests/gexp.scm \
295 tests/nar.scm \
296 tests/union.scm \
297 tests/profiles.scm \
298 tests/search-paths.scm \
299 tests/syscalls.scm \
300 tests/gremlin.scm \
301 tests/bournish.scm \
302 tests/lint.scm \
303 tests/publish.scm \
304 tests/scripts.scm \
305 tests/size.scm \
306 tests/graph.scm \
307 tests/challenge.scm \
308 tests/cache.scm \
309 tests/cve.scm \
310 tests/workers.scm \
311 tests/zlib.scm \
312 tests/file-systems.scm \
313 tests/system.scm \
314 tests/services.scm \
315 tests/scripts-build.scm \
316 tests/containers.scm \
317 tests/pack.scm \
318 tests/import-utils.scm
319
320 if HAVE_GUILE_JSON
321
322 SCM_TESTS += \
323 tests/pypi.scm \
324 tests/cpan.scm \
325 tests/gem.scm \
326 tests/crate.scm
327
328 endif
329
330 SH_TESTS = \
331 tests/guix-build.sh \
332 tests/guix-download.sh \
333 tests/guix-gc.sh \
334 tests/guix-hash.sh \
335 tests/guix-package.sh \
336 tests/guix-package-net.sh \
337 tests/guix-system.sh \
338 tests/guix-archive.sh \
339 tests/guix-authenticate.sh \
340 tests/guix-environment.sh \
341 tests/guix-environment-container.sh \
342 tests/guix-graph.sh \
343 tests/guix-lint.sh
344
345 if BUILD_DAEMON
346
347 SH_TESTS += tests/guix-register.sh
348
349 endif BUILD_DAEMON
350
351
352 TESTS = $(SCM_TESTS) $(SH_TESTS)
353
354 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
355
356 SCM_LOG_DRIVER = \
357 $(top_builddir)/test-env --quiet-stderr \
358 $(GUILE) --no-auto-compile -e main \
359 $(top_srcdir)/build-aux/test-driver.scm
360
361 AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
362
363 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
364 AM_SH_LOG_FLAGS = -x -e
365
366 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
367 # could end up removing files from the store while they are being used by
368 # other instances of the daemon.
369 tests/guix-gc.log: \
370 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
371 $(SCM_TESTS:%.scm=%.log)
372
373 else !CAN_RUN_TESTS
374
375 TESTS =
376 SH_TESTS =
377 SCM_TESTS =
378
379 # Automake always generates a 'check' target, so better not override it.
380 check-local:
381 @echo
382 @echo "Cannot run tests because file name limits would be exceeded." >&2
383 @echo "Look for 'length' in the 'config.log' file for details." >&2
384 @echo
385 @exit 1
386
387 endif !CAN_RUN_TESTS
388
389 check-system: $(GOBJECTS) $(BOOTSTRAP_GUILE_TARBALLS)
390 $(AM_V_at)$(top_builddir)/pre-inst-env \
391 $(GUILE) --no-auto-compile \
392 -e '(@@ (run-system-tests) run-system-tests)' \
393 $(top_srcdir)/build-aux/run-system-tests.scm
394
395 # Public key used to sign substitutes from hydra.gnu.org & co.
396 dist_pkgdata_DATA = \
397 hydra.gnu.org.pub \
398 bayfront.guixsd.org.pub
399
400 # Bash completion file.
401 dist_bashcompletion_DATA = etc/completion/bash/guix
402
403 # Zsh completion file.
404 dist_zshcompletion_DATA = etc/completion/zsh/_guix
405
406 EXTRA_DIST = \
407 HACKING \
408 ROADMAP \
409 TODO \
410 CODE-OF-CONDUCT \
411 .dir-locals.el \
412 build-aux/build-self.scm \
413 build-aux/compile-all.scm \
414 build-aux/hydra/evaluate.scm \
415 build-aux/hydra/gnu-system.scm \
416 build-aux/hydra/guix.scm \
417 build-aux/check-available-binaries.scm \
418 build-aux/check-final-inputs-self-contained.scm \
419 build-aux/download.scm \
420 build-aux/generate-authors.scm \
421 build-aux/test-driver.scm \
422 build-aux/update-guix-package.scm \
423 build-aux/update-NEWS.scm \
424 build-aux/run-system-tests.scm \
425 d3.v3.js \
426 graph.js \
427 srfi/srfi-64.scm \
428 srfi/srfi-64.upstream.scm \
429 tests/test.drv \
430 tests/signing-key.pub \
431 tests/signing-key.sec \
432 tests/cve-sample.xml \
433 build-aux/config.rpath \
434 bootstrap \
435 release.nix \
436 $(TESTS)
437
438 if !BUILD_DAEMON_OFFLOAD
439
440 EXTRA_DIST += \
441 guix/scripts/offload.scm
442
443 endif !BUILD_DAEMON_OFFLOAD
444
445
446 CLEANFILES = \
447 $(GOBJECTS) \
448 $(SCM_TESTS:tests/%.scm=%.log)
449
450 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
451 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
452 # there that are newer than the local .scm files (for instance because the
453 # user ran 'make install' recently). When that happens, we end up loading
454 # those previously-installed .go files, which may be stale, thereby breaking
455 # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly
456 # stale files from ~/.cache/guile/ccache.
457 %.go: make-go ; @:
458 make-go: $(MODULES) guix/config.scm $(dist_noinst_DATA)
459 $(AM_V_at)echo "Compiling Scheme modules..." ; \
460 unset GUILE_LOAD_COMPILED_PATH ; \
461 XDG_CACHE_HOME=/nowhere \
462 host=$(host) srcdir="$(top_srcdir)" \
463 $(top_builddir)/pre-inst-env \
464 $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
465 --no-auto-compile \
466 -s "$(top_srcdir)"/build-aux/compile-all.scm $^
467
468 SUFFIXES = .go
469
470 # Make sure source files are installed first, so that the mtime of
471 # installed compiled files is greater than that of installed source
472 # files. See
473 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
474 # for details.
475 guix_install_go_files = install-nobase_nodist_guileobjectDATA
476 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
477
478 # The above trick doesn't work for 'config.go' because both 'config.scm' and
479 # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it
480 # special treatment.
481 install-data-hook: set-bootstrap-executable-permissions
482 touch "$(DESTDIR)$(guileobjectdir)/guix/config.go"
483
484
485 SUBDIRS = po/guix po/packages
486 BUILT_SOURCES =
487
488 include doc/local.mk
489
490 if BUILD_DAEMON
491
492 include nix/local.mk
493
494 endif BUILD_DAEMON
495
496 ACLOCAL_AMFLAGS = -I m4
497
498 # Pass an explicit '--localstatedir' so that configure does not error out if
499 # it finds an existing installation with a different localstatedir. Inherit
500 # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to
501 # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short
502 # enough for shebangs.
503 AM_DISTCHECK_CONFIGURE_FLAGS = \
504 --localstatedir="$$dc_install_base/var" \
505 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
506 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
507 --with-nix-prefix="$(NIX_PREFIX)" \
508 --enable-daemon \
509 ac_cv_guix_test_root="$(GUIX_TEST_ROOT)"
510
511 # The self-contained tarball. Add 'glibc-utf8-locales' along with glibc just
512 # so 'etc/profile' defines 'GUIX_LOCPATH' pointing to a valid set of locales.
513 guix-binary.%.tar.xz:
514 $(AM_V_GEN)GUIX_PACKAGE_PATH= \
515 tarball=`$(top_builddir)/pre-inst-env guix pack -K -C xz \
516 -s "$*" --localstatedir guix glibc-utf8-locales \
517 -e '(@@ (gnu packages commencement) glibc-final)'` ; \
518 cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
519
520
521 dist-hook: $(distdir)/ChangeLog gen-AUTHORS gen-tarball-version
522 dist-hook: assert-no-store-file-names
523
524 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
525
526 EXTRA_DIST += $(top_srcdir)/.version
527 BUILT_SOURCES += $(top_srcdir)/.version
528 $(top_srcdir)/.version:
529 echo $(VERSION) > "$@-t" && mv "$@-t" "$@"
530
531 gen-tarball-version:
532 echo $(VERSION) > "$(distdir)/.tarball-version"
533
534 gen-ChangeLog $(distdir)/ChangeLog:
535 $(AM_V_GEN)if test -d .git; then \
536 $(top_srcdir)/build-aux/gitlog-to-changelog \
537 > $(distdir)/cl-t; \
538 rm -f $(distdir)/ChangeLog; \
539 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
540 fi
541
542 gen-AUTHORS:
543 $(AM_V_GEN)if test -d .git; then \
544 rm -f "$(distdir)/AUTHORS"; \
545 $(top_builddir)/pre-inst-env "$(GUILE)" \
546 "$(top_srcdir)/build-aux/generate-authors.scm" \
547 "$(top_srcdir)" "$(distdir)/AUTHORS"; \
548 fi
549
550 \f
551 #
552 # Release management.
553 #
554
555 releasedir = release-$(PACKAGE_VERSION)
556
557 PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
558
559 # List of source tarballs produced. This must be kept in sync with the
560 # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'.
561 SOURCE_TARBALLS = \
562 $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
563
564 # Systems supported by Guix.
565 SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux
566
567 # Guix binary tarballs.
568 BINARY_TARBALLS = \
569 $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz)
570
571 # Systems supported by GuixSD.
572 GUIXSD_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
573
574 # Systems for which we build GuixSD VMs.
575 GUIXSD_VM_SYSTEMS ?= x86_64-linux
576
577 # Prefix of the GuixSD installation image file name.
578 GUIXSD_IMAGE_BASE = guixsd-usb-install-$(PACKAGE_VERSION)
579
580 # Prefix of the GuixSD VM image file name.
581 GUIXSD_VM_IMAGE_BASE = guixsd-vm-image-$(PACKAGE_VERSION)
582
583 # Size of the VM image (for x86_64 typically).
584 GUIXSD_VM_IMAGE_SIZE ?= 2GiB
585
586 # The release process works in several phases:
587 #
588 # 0. We assume the developer created a 'vX.Y' tag.
589 # 1. Build the source tarball.
590 # 2. Update the 'guix' package so that it corresponds to the 'vX.Y' tag.
591 # 3. Build the binary tarballs for that 'guix' package.
592 # 4. Update the 'guix' package again.
593 # 5. Build the GuixSD installation images. The images will run 'guix'
594 # corresponding to 'vX.Y' + 1 commit, and they will install 'vX.Y'.
595 #
596 # This 'release' target takes care of everything and copies the resulting
597 # files to $(releasedir).
598 #
599 # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext
600 # issue described at <https://savannah.gnu.org/bugs/index.php?51027>.
601 release: dist
602 cd po; git checkout .
603 @if ! git diff-index --quiet HEAD; then \
604 echo "There are uncommitted changes; stopping." >&2 ; \
605 exit 1 ; \
606 fi
607 $(MKDIR_P) "$(releasedir)"
608 rm -f "$(releasedir)"/*
609 mv $(SOURCE_TARBALLS) "$(releasedir)"
610 $(top_builddir)/pre-inst-env "$(GUILE)" \
611 $(top_srcdir)/build-aux/update-guix-package.scm \
612 "`git rev-parse HEAD`" "$(PACKAGE_VERSION)"
613 git add $(top_srcdir)/gnu/packages/package-management.scm
614 git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)."
615 rm -f $(BINARY_TARBALLS)
616 $(MAKE) $(BINARY_TARBALLS)
617 for system in $(SUPPORTED_SYSTEMS) ; do \
618 mv "guix-binary.$$system.tar.xz" \
619 "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \
620 done
621 $(top_builddir)/pre-inst-env "$(GUILE)" \
622 $(top_srcdir)/build-aux/update-guix-package.scm \
623 "`git rev-parse HEAD`"
624 git add $(top_srcdir)/gnu/packages/package-management.scm
625 git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`."
626 for system in $(GUIXSD_SUPPORTED_SYSTEMS) ; do \
627 image=`$(top_builddir)/pre-inst-env \
628 guix system disk-image \
629 --system=$$system \
630 gnu/system/install.scm` ; \
631 if [ ! -f "$$image" ] ; then \
632 echo "failed to produced GuixSD installation image for $$system" >&2 ; \
633 exit 1 ; \
634 fi ; \
635 xz < "$$image" > "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" ; \
636 mv "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" \
637 "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz" ; \
638 done
639 for system in $(GUIXSD_VM_SYSTEMS) ; do \
640 image=`$(top_builddir)/pre-inst-env \
641 guix system vm-image \
642 --system=$$system \
643 --image-size=$(GUIXSD_VM_IMAGE_SIZE) \
644 gnu/system/examples/vm-image.tmpl` ; \
645 if [ ! -f "$$image" ] ; then \
646 echo "failed to produced GuixSD VM image for $$system" >&2 ; \
647 exit 1 ; \
648 fi ; \
649 xz < "$$image" > "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp" ; \
650 mv "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp" \
651 "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz" ; \
652 done
653 @echo
654 @echo "Congratulations! All the release files are now in $(releasedir)."
655 @echo
656
657 update-guix-package:
658 git rev-parse HEAD
659 $(top_builddir)/pre-inst-env "$(GUILE)" \
660 $(top_srcdir)/build-aux/update-guix-package.scm \
661 "`git rev-parse HEAD`"
662
663 # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>.
664 # Package data from this checkout is used by 'update-NEWS.scm'.
665 GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance
666
667 update-NEWS: $(GOBJECTS)
668 $(top_builddir)/pre-inst-env "$(GUILE)" \
669 $(top_srcdir)/build-aux/update-NEWS.scm \
670 $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data"
671
672 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
673 assert-no-store-file-names: $(distdir)/ChangeLog
674 $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
675 --exclude=*.info-[0-9] --exclude=*.dot \
676 --exclude=*.eps --exclude-dir=bootstrap \
677 --exclude=guix-prettify.el \
678 --exclude=ChangeLog \
679 -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
680 then \
681 echo "error: store file names embedded in the distribution" >&2 ; \
682 exit 1 ; \
683 fi
684
685 # Make sure hydra.gnu.org has the important binaries.
686 assert-binaries-available: $(GOBJECTS)
687 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
688 "$(top_srcdir)/build-aux/check-available-binaries.scm"
689
690 # Make sure the final inputs don't refer to bootstrap tools.
691 assert-final-inputs-self-contained: $(GOBJECTS)
692 $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
693 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
694
695 # Compute the Hydra jobs and write them in the target file.
696 hydra-jobs.scm: $(GOBJECTS)
697 $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
698 $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
699 "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
700 "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
701 $(AM_V_at)mv "$@.tmp" "$@"
702
703 .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
704 .PHONY: assert-no-store-file-names assert-binaries-available
705 .PHONY: assert-final-inputs-self-contained
706 .PHONY: clean-go make-go
707 .PHONY: update-guix-package update-NEWS release
708
709 ## -------------- ##
710 ## Silent rules. ##
711 ## -------------- ##
712
713 AM_V_DL = $(AM_V_DL_$(V))
714 AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
715 AM_V_DL_0 = @echo " DL " $@;
716
717 AM_V_DOT = $(AM_V_DOT_$(V))
718 AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
719 AM_V_DOT_0 = @echo " DOT " $@;
720
721 AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
722 AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
723 AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;