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