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