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