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