1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
5 # This file is part of GNU Guix.
7 # GNU Guix is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or (at
10 # your option) any later version.
12 # GNU Guix is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 nodist_noinst_SCRIPTS = \
38 guix/git-download.scm \
43 guix/serialization.scm \
45 guix/derivations.scm \
46 guix/gnu-maintenance.scm \
48 guix/build-system.scm \
49 guix/build-system/cmake.scm \
50 guix/build-system/gnu.scm \
51 guix/build-system/perl.scm \
52 guix/build-system/python.scm \
53 guix/build-system/trivial.scm \
55 guix/http-client.scm \
58 guix/svn-download.scm \
60 guix/build/download.scm \
61 guix/build/cmake-build-system.scm \
63 guix/build/gnu-build-system.scm \
64 guix/build/gnu-dist.scm \
65 guix/build/linux-initrd.scm \
66 guix/build/perl-build-system.scm \
67 guix/build/python-build-system.scm \
68 guix/build/utils.scm \
69 guix/build/union.scm \
71 guix/build/rpath.scm \
74 guix/build/install.scm \
75 guix/build/activation.scm \
76 guix/build/syscalls.scm \
77 guix/build/emacs-utils.scm \
80 guix/scripts/download.scm \
81 guix/scripts/build.scm \
82 guix/scripts/archive.scm \
83 guix/scripts/import.scm \
84 guix/scripts/package.scm \
86 guix/scripts/hash.scm \
87 guix/scripts/pull.scm \
88 guix/scripts/substitute-binary.scm \
89 guix/scripts/authenticate.scm \
90 guix/scripts/refresh.scm \
91 guix/scripts/system.scm \
95 if BUILD_DAEMON_OFFLOAD
98 guix/scripts/offload.scm
100 endif BUILD_DAEMON_OFFLOAD
102 # Internal module with test suite support.
103 noinst_DATA = guix/tests.scm
105 # Because of the autoload hack in (guix build download), we must build it
106 # first to avoid errors on systems where (gnutls) is unavailable.
107 guix/scripts/download.go: guix/build/download.go
108 guix/download.go: guix/build/download.go
110 # Linux-Libre configurations.
112 gnu/packages/linux-libre-i686.conf \
113 gnu/packages/linux-libre-x86_64.conf
115 # Templates, examples.
117 gnu/system/os-config.tmpl
119 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
121 nobase_dist_guilemodule_DATA = $(MODULES) $(KCONFIGS) $(EXAMPLES)
122 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
124 # Do we need to provide our own non-broken (srfi srfi-37) module?
127 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
128 GOBJECTS += srfi/srfi-37.go
130 srfi/srfi-37.scm: srfi/srfi-37.scm.in
134 endif INSTALL_SRFI_37
136 # Handy way to remove the .go files without removing all the rest.
138 -$(RM) -f $(GOBJECTS)
145 tests/pk-crypto.scm \
147 tests/substitute-binary.scm \
149 tests/derivations.scm \
153 tests/build-utils.scm \
165 tests/guix-build.sh \
166 tests/guix-download.sh \
169 tests/guix-package.sh \
170 tests/guix-system.sh \
171 tests/guix-archive.sh \
172 tests/guix-authenticate.sh
176 SH_TESTS += tests/guix-register.sh
181 TESTS = $(SCM_TESTS) $(SH_TESTS)
183 TEST_EXTENSIONS = .scm .sh
185 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
187 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
188 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
190 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
191 AM_SH_LOG_FLAGS = -x -e
193 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
194 # could end up removing files from the store while they are being used by
195 # other instances of the daemon.
197 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
198 $(SCM_TESTS:%.scm=%.log)
200 # Public key used to sign substitutes from hydra.gnu.org.
201 dist_pkgdata_DATA = hydra.gnu.org.pub
208 build-aux/hydra/gnu-system.scm \
209 build-aux/hydra/demo-os.scm \
210 build-aux/hydra/guix.scm \
211 build-aux/check-available-binaries.scm \
212 build-aux/check-final-inputs-self-contained.scm \
213 build-aux/download.scm \
214 build-aux/list-packages.scm \
215 build-aux/sync-descriptions.scm \
216 srfi/srfi-37.scm.in \
218 srfi/srfi-64.upstream.scm \
220 tests/signing-key.pub \
221 tests/signing-key.sec \
222 build-aux/config.rpath \
227 if !BUILD_DAEMON_OFFLOAD
230 guix/scripts/offload.scm
232 endif !BUILD_DAEMON_OFFLOAD
237 $(SCM_TESTS:tests/%.scm=%.log)
239 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
240 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
241 AM_V_GUILEC_0 = @echo " GUILEC" $@;
243 # XXX: Use the C locale for when Guile lacks
244 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
246 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
248 $(top_builddir)/pre-inst-env \
249 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
250 -Wformat -Wunbound-variable -Warity-mismatch \
256 # Make sure source files are installed first, so that the mtime of
257 # installed compiled files is greater than that of installed source
259 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
261 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
262 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
264 SUBDIRS = po/guix po/packages
275 ACLOCAL_AMFLAGS = -I m4
276 AM_DISTCHECK_CONFIGURE_FLAGS = \
277 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
278 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
279 --with-nix-prefix="$(NIX_PREFIX)" \
282 dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
283 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
286 -$(top_builddir)/pre-inst-env $(GUILE) \
287 $(top_srcdir)/build-aux/sync-descriptions.scm
290 if test -d .git; then \
291 $(top_srcdir)/build-aux/gitlog-to-changelog \
293 rm -f $(distdir)/ChangeLog; \
294 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
297 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
298 assert-no-store-file-names:
299 if grep -r --exclude=*.texi --exclude=*.info \
300 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
302 echo "error: store file names embedded in the distribution" >&2 ; \
306 # Make sure hydra.gnu.org has the important binaries.
307 assert-binaries-available:
308 $(top_builddir)/pre-inst-env "$(GUILE)" \
309 "$(top_srcdir)/build-aux/check-available-binaries.scm"
311 # Make sure the final inputs don't refer to bootstrap tools.
312 assert-final-inputs-self-contained:
313 $(top_builddir)/pre-inst-env "$(GUILE)" \
314 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
316 .PHONY: sync-descriptions gen-ChangeLog clean-go
317 .PHONY: assert-no-store-file-names assert-binaries-available
318 .PHONY: assert-final-inputs-self-contained