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