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