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