1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 # Copyright © 2015 Alex Kost <alezost@gmail.com>
5 # Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
7 # This file is part of GNU Guix.
9 # GNU Guix is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or (at
12 # your option) any later version.
14 # GNU Guix is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 nodist_noinst_SCRIPTS = \
43 guix/git-download.scm \
48 guix/serialization.scm \
50 guix/derivations.scm \
51 guix/gnu-maintenance.scm \
56 guix/build-system.scm \
57 guix/build-system/cmake.scm \
58 guix/build-system/emacs.scm \
59 guix/build-system/glib-or-gtk.scm \
60 guix/build-system/gnu.scm \
61 guix/build-system/haskell.scm \
62 guix/build-system/perl.scm \
63 guix/build-system/python.scm \
64 guix/build-system/waf.scm \
65 guix/build-system/r.scm \
66 guix/build-system/ruby.scm \
67 guix/build-system/trivial.scm \
69 guix/http-client.scm \
73 guix/cvs-download.scm \
74 guix/svn-download.scm \
76 guix/build/download.scm \
77 guix/build/cmake-build-system.scm \
78 guix/build/emacs-build-system.scm \
80 guix/build/glib-or-gtk-build-system.scm \
81 guix/build/gnu-build-system.scm \
82 guix/build/gnu-dist.scm \
83 guix/build/perl-build-system.scm \
84 guix/build/python-build-system.scm \
85 guix/build/r-build-system.scm \
86 guix/build/ruby-build-system.scm \
87 guix/build/waf-build-system.scm \
88 guix/build/haskell-build-system.scm \
89 guix/build/store-copy.scm \
90 guix/build/utils.scm \
91 guix/build/union.scm \
92 guix/build/profiles.scm \
94 guix/build/rpath.scm \
97 guix/build/gremlin.scm \
98 guix/build/emacs-utils.scm \
99 guix/build/graft.scm \
100 guix/search-paths.scm \
102 guix/import/utils.scm \
103 guix/import/gnu.scm \
104 guix/import/snix.scm \
105 guix/import/cabal.scm \
106 guix/import/cran.scm \
107 guix/import/hackage.scm \
108 guix/import/elpa.scm \
110 guix/scripts/download.scm \
111 guix/scripts/build.scm \
112 guix/scripts/archive.scm \
113 guix/scripts/import.scm \
114 guix/scripts/package.scm \
115 guix/scripts/gc.scm \
116 guix/scripts/hash.scm \
117 guix/scripts/pull.scm \
118 guix/scripts/substitute.scm \
119 guix/scripts/authenticate.scm \
120 guix/scripts/refresh.scm \
121 guix/scripts/system.scm \
122 guix/scripts/lint.scm \
123 guix/scripts/challenge.scm \
124 guix/scripts/import/cran.scm \
125 guix/scripts/import/gnu.scm \
126 guix/scripts/import/nix.scm \
127 guix/scripts/import/hackage.scm \
128 guix/scripts/import/elpa.scm \
129 guix/scripts/environment.scm \
130 guix/scripts/publish.scm \
131 guix/scripts/edit.scm \
132 guix/scripts/size.scm \
133 guix/scripts/graph.scm \
134 guix/scripts/container.scm \
135 guix/scripts/container/exec.scm \
137 $(GNU_SYSTEM_MODULES)
142 guix/import/json.scm \
143 guix/import/pypi.scm \
144 guix/scripts/import/pypi.scm \
145 guix/import/cpan.scm \
146 guix/scripts/import/gem.scm \
151 if BUILD_SYSCALLS_MODULE
154 guix/build/syscalls.scm
158 if BUILD_DAEMON_OFFLOAD
161 guix/scripts/offload.scm
163 endif BUILD_DAEMON_OFFLOAD
165 # Internal module with test suite support.
166 dist_noinst_DATA = guix/tests.scm
168 # Linux-Libre configurations.
170 gnu/packages/linux-libre-i686.conf \
171 gnu/packages/linux-libre-x86_64.conf
173 # Templates, examples.
175 gnu/system/examples/bare-bones.tmpl \
176 gnu/system/examples/desktop.tmpl
178 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
180 nobase_dist_guilemodule_DATA = \
181 $(MODULES) $(KCONFIGS) $(EXAMPLES) \
183 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
185 # Do we need to provide our own non-broken (srfi srfi-37) module?
188 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
189 GOBJECTS += srfi/srfi-37.go
191 srfi/srfi-37.scm: srfi/srfi-37.scm.in
195 endif INSTALL_SRFI_37
197 # Handy way to remove the .go files without removing all the rest.
199 -$(RM) -f $(GOBJECTS)
202 # Test extensions; has to be unconditional.
203 TEST_EXTENSIONS = .scm .sh
212 tests/pk-crypto.scm \
215 tests/gnu-maintenance.scm \
216 tests/substitute.scm \
218 tests/derivations.scm \
222 tests/build-utils.scm \
241 tests/challenge.scm \
243 tests/file-systems.scm \
246 tests/containers.scm \
247 tests/import-utils.scm
259 tests/guix-build.sh \
260 tests/guix-download.sh \
263 tests/guix-package.sh \
264 tests/guix-package-net.sh \
265 tests/guix-system.sh \
266 tests/guix-archive.sh \
267 tests/guix-authenticate.sh \
268 tests/guix-environment.sh \
269 tests/guix-environment-container.sh \
270 tests/guix-graph.sh \
275 SH_TESTS += tests/guix-register.sh
280 TESTS = $(SCM_TESTS) $(SH_TESTS)
282 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
284 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
285 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
287 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
288 AM_SH_LOG_FLAGS = -x -e
290 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
291 # could end up removing files from the store while they are being used by
292 # other instances of the daemon.
294 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
295 $(SCM_TESTS:%.scm=%.log)
303 # Automake always generates a 'check' target, so better not override it.
306 @echo "Cannot run tests because file name limits would be exceeded." >&2
307 @echo "Look for 'length' in the 'config.log' file for details." >&2
313 # Public key used to sign substitutes from hydra.gnu.org.
314 dist_pkgdata_DATA = hydra.gnu.org.pub
316 # Bash completion file.
317 dist_bashcompletion_DATA = etc/completion/bash/guix
325 build-aux/build-self.scm \
326 build-aux/compile-all.scm \
327 build-aux/hydra/gnu-system.scm \
328 build-aux/hydra/demo-os.scm \
329 build-aux/hydra/guix.scm \
330 build-aux/check-available-binaries.scm \
331 build-aux/check-final-inputs-self-contained.scm \
332 build-aux/download.scm \
333 build-aux/make-binary-tarball.scm \
334 build-aux/generate-authors.scm \
335 srfi/srfi-37.scm.in \
337 srfi/srfi-64.upstream.scm \
339 tests/signing-key.pub \
340 tests/signing-key.sec \
341 tests/cve-sample.xml \
342 build-aux/config.rpath \
347 if !BUILD_DAEMON_OFFLOAD
350 guix/scripts/offload.scm
352 endif !BUILD_DAEMON_OFFLOAD
354 if !BUILD_SYSCALLS_MODULE
357 guix/build/syscalls.scm
359 endif !BUILD_SYSCALLS_MODULE
364 $(SCM_TESTS:tests/%.scm=%.log)
366 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
367 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
368 # there that are newer than the local .scm files (for instance because the
369 # user ran 'make install' recently). When that happens, we end up loading
370 # those previously-installed .go files, which may be stale, thereby breaking
373 make-go: $(MODULES) guix/config.scm guix/tests.scm
374 $(AM_V_at)echo "Compiling Scheme modules..." ; \
375 unset GUILE_LOAD_COMPILED_PATH ; \
376 host=$(host) srcdir="$(top_srcdir)" \
377 $(top_builddir)/pre-inst-env \
378 $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
380 -s "$(top_srcdir)"/build-aux/compile-all.scm $^
384 # Make sure source files are installed first, so that the mtime of
385 # installed compiled files is greater than that of installed source
387 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
389 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
390 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
392 # The above trick doesn't work for 'config.go' because both 'config.scm' and
393 # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it
395 install-data-hook: set-bootstrap-executable-permissions
396 touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
399 SUBDIRS = po/guix po/packages
410 ACLOCAL_AMFLAGS = -I m4
411 AM_DISTCHECK_CONFIGURE_FLAGS = \
412 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
413 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
414 --with-nix-prefix="$(NIX_PREFIX)" \
417 dist_emacsui_DATA = emacs/guix-main.scm
418 nodist_emacsui_DATA = emacs/guix-helper.scm
421 # The self-contained tarball.
422 guix-binary.%.tar.xz:
423 -GUIX_PACKAGE_PATH= \
424 $(top_builddir)/pre-inst-env "$(GUILE)" \
425 "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
428 dist-hook: sync-descriptions gen-ChangeLog gen-AUTHORS
429 dist-hook: assert-no-store-file-names
431 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
434 -GUIX_PACKAGE_PATH= \
435 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
438 if test -d .git; then \
439 $(top_srcdir)/build-aux/gitlog-to-changelog \
441 rm -f $(distdir)/ChangeLog; \
442 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
446 if test -d .git; then \
447 rm -f "$(distdir)/AUTHORS"; \
448 $(top_builddir)/pre-inst-env "$(GUILE)" \
449 "$(top_srcdir)/build-aux/generate-authors.scm" \
450 "$(top_srcdir)" "$(distdir)/AUTHORS"; \
453 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
454 assert-no-store-file-names:
455 if grep -r --exclude=*.texi --exclude=*.info \
456 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
458 echo "error: store file names embedded in the distribution" >&2 ; \
462 # Make sure hydra.gnu.org has the important binaries.
463 assert-binaries-available:
464 $(top_builddir)/pre-inst-env "$(GUILE)" \
465 "$(top_srcdir)/build-aux/check-available-binaries.scm"
467 # Make sure the final inputs don't refer to bootstrap tools.
468 assert-final-inputs-self-contained:
469 $(top_builddir)/pre-inst-env "$(GUILE)" \
470 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
472 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
473 .PHONY: assert-no-store-file-names assert-binaries-available
474 .PHONY: assert-final-inputs-self-contained
480 AM_V_DL = $(AM_V_DL_$(V))
481 AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
482 AM_V_DL_0 = @echo " DL " $@;
484 AM_V_DOT = $(AM_V_DOT_$(V))
485 AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
486 AM_V_DOT_0 = @echo " DOT " $@;
488 AM_V_EMACS = $(AM_V_EMACS_$(V))
489 AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
490 AM_V_EMACS_0 = @echo " EMACS " $@;
492 AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
493 AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
494 AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;