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