gnu: geiser: Update to 0.6.
[jackhill/guix/guix.git] / Makefile.am
CommitLineData
233e7676 1# GNU Guix --- Functional package management for GNU
49e6291a 2# Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
f2499672 3# Copyright © 2013 Andreas Enge <andreas@enge.fr>
af51c820 4#
233e7676 5# This file is part of GNU Guix.
af51c820 6#
233e7676 7# GNU Guix is free software; you can redistribute it and/or modify it
af51c820
LC
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.
11#
233e7676 12# GNU Guix is distributed in the hope that it will be useful, but
af51c820
LC
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.
16#
17# You should have received a copy of the GNU General Public License
233e7676 18# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
af51c820 19
c52a5bf0 20bin_SCRIPTS = \
e49951eb 21 scripts/guix
14a1c319 22
58867ae7
MW
23nodist_noinst_SCRIPTS = \
24 pre-inst-env \
25 test-env
26
d516736c
LC
27include gnu-system.am
28
af51c820 29MODULES = \
ddc29a78 30 guix/base32.scm \
e9c6c584 31 guix/base64.scm \
c0cd1b3e 32 guix/records.scm \
72626a71 33 guix/hash.scm \
3476ded9 34 guix/pk-crypto.scm \
8b420f74 35 guix/pki.scm \
73fbb904 36 guix/utils.scm \
de1355f1 37 guix/download.scm \
9b5b5c17 38 guix/git-download.scm \
b860f382 39 guix/monads.scm \
21b679f6 40 guix/gexp.scm \
cc4ecc2d 41 guix/profiles.scm \
0f41c26f
LC
42 guix/serialization.scm \
43 guix/nar.scm \
af51c820 44 guix/derivations.scm \
22189ed1 45 guix/gnu-maintenance.scm \
838d78e3 46 guix/licenses.scm \
208f7cd1 47 guix/build-system.scm \
c6bded8a 48 guix/build-system/cmake.scm \
208f7cd1 49 guix/build-system/gnu.scm \
08fd1ebe 50 guix/build-system/perl.scm \
40506d5d 51 guix/build-system/python.scm \
be13fbfa 52 guix/build-system/trivial.scm \
457dd86d 53 guix/ftp-client.scm \
3b8258c5 54 guix/http-client.scm \
0fdd3bea 55 guix/gnupg.scm \
af51c820 56 guix/store.scm \
b3acf365 57 guix/svn-download.scm \
073c34d7 58 guix/ui.scm \
62cab99c 59 guix/build/download.scm \
c6bded8a 60 guix/build/cmake-build-system.scm \
9b5b5c17 61 guix/build/git.scm \
af51c820 62 guix/build/gnu-build-system.scm \
fe12c345 63 guix/build/gnu-dist.scm \
88840f02 64 guix/build/linux-initrd.scm \
08fd1ebe 65 guix/build/perl-build-system.scm \
40506d5d 66 guix/build/python-build-system.scm \
1273d44a 67 guix/build/utils.scm \
c8c88afa 68 guix/build/union.scm \
3dbeecd2 69 guix/build/pull.scm \
3309e3a1 70 guix/build/rpath.scm \
b3acf365 71 guix/build/svn.scm \
e1a87b90 72 guix/build/vm.scm \
5ce3defe 73 guix/build/install.scm \
4dfe6c58 74 guix/build/activation.scm \
29fa45f4 75 guix/build/syscalls.scm \
e3ce5d70 76 guix/packages.scm \
10226c05 77 guix/snix.scm \
de1355f1
LC
78 guix/scripts/download.scm \
79 guix/scripts/build.scm \
760c60d6 80 guix/scripts/archive.scm \
de1355f1
LC
81 guix/scripts/import.scm \
82 guix/scripts/package.scm \
83 guix/scripts/gc.scm \
84 guix/scripts/hash.scm \
85 guix/scripts/pull.scm \
86 guix/scripts/substitute-binary.scm \
526382ff 87 guix/scripts/authenticate.scm \
de1355f1 88 guix/scripts/refresh.scm \
523e4896 89 guix/scripts/system.scm \
e3ce5d70 90 guix.scm \
d516736c 91 $(GNU_SYSTEM_MODULES)
af51c820 92
49e6291a
LC
93if BUILD_DAEMON_OFFLOAD
94
95MODULES += \
96 guix/scripts/offload.scm
97
98endif BUILD_DAEMON_OFFLOAD
99
855a8ad7
LC
100# Because of the autoload hack in (guix build download), we must build it
101# first to avoid errors on systems where (gnutls) is unavailable.
102guix/scripts/download.go: guix/build/download.go
de1355f1 103guix/download.go: guix/build/download.go
c44899a2 104
a94546ec
LC
105# Linux-Libre configurations.
106KCONFIGS = \
107 gnu/packages/linux-libre-i686.conf \
108 gnu/packages/linux-libre-x86_64.conf
1959fb04 109
00e219d1 110GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
af51c820 111
a94546ec 112nobase_dist_guilemodule_DATA = $(MODULES) $(KCONFIGS)
1959fb04 113nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
800cdeef 114
1959fb04
LC
115# Do we need to provide our own non-broken (srfi srfi-37) module?
116if INSTALL_SRFI_37
117
118nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
119GOBJECTS += srfi/srfi-37.go
120
121srfi/srfi-37.scm: srfi/srfi-37.scm.in
122 $(MKDIR_P) srfi
123 cp "$<" "$@"
124
125endif INSTALL_SRFI_37
ac5aa288 126
70a9c720
LC
127# Handy way to remove the .go files without removing all the rest.
128clean-go:
129 -$(RM) -f $(GOBJECTS)
130
af51c820 131
30dd8310 132SCM_TESTS = \
ddc29a78 133 tests/base32.scm \
e9c6c584 134 tests/base64.scm \
69927e78 135 tests/hash.scm \
3476ded9 136 tests/pk-crypto.scm \
8b420f74 137 tests/pki.scm \
e9c6c584 138 tests/substitute-binary.scm \
af51c820
LC
139 tests/builders.scm \
140 tests/derivations.scm \
299112d3 141 tests/ui.scm \
c0cd1b3e 142 tests/records.scm \
e3ce5d70 143 tests/utils.scm \
b0e0d0e9 144 tests/build-utils.scm \
c8c88afa 145 tests/packages.scm \
10226c05 146 tests/snix.scm \
3259877d 147 tests/store.scm \
b860f382 148 tests/monads.scm \
21b679f6 149 tests/gexp.scm \
53c63ee9 150 tests/nar.scm \
a2078770 151 tests/union.scm \
29fa45f4
LC
152 tests/profiles.scm \
153 tests/syscalls.scm
30dd8310
LC
154
155SH_TESTS = \
0afdc485 156 tests/guix-build.sh \
37d19403 157 tests/guix-download.sh \
fe8ff028 158 tests/guix-gc.sh \
ccbce848 159 tests/guix-hash.sh \
0820098d 160 tests/guix-package.sh \
c1202fb1 161 tests/guix-system.sh \
760c60d6 162 tests/guix-archive.sh \
0820098d 163 tests/guix-authenticate.sh
af51c820 164
a7a4e6a4
LC
165if BUILD_DAEMON
166
167SH_TESTS += tests/guix-register.sh
168
169endif BUILD_DAEMON
170
171
30dd8310
LC
172TESTS = $(SCM_TESTS) $(SH_TESTS)
173
97298ffa
LC
174TEST_EXTENSIONS = .scm .sh
175
352ec143
LC
176AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
177
69cfce50 178SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
97298ffa
LC
179AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
180
69cfce50 181SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
97298ffa 182AM_SH_LOG_FLAGS = -x -e
af51c820 183
3a33730a
LC
184# Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
185# could end up removing files from the store while they are being used by
186# other instances of the daemon.
187tests/guix-gc.log: \
188 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
189 $(SCM_TESTS:%.scm=%.log)
190
bf59c06d 191# Public key used to sign substitutes from hydra.gnu.org.
6c110833 192dist_pkgdata_DATA = hydra.gnu.org.pub
3a33730a 193
81f61c17
LC
194EXTRA_DIST = \
195 HACKING \
196 ROADMAP \
197 TODO \
198 .dir-locals.el \
199 build-aux/hydra/gnu-system.scm \
200 build-aux/hydra/demo-os.scm \
201 build-aux/hydra/guix.scm \
202 build-aux/check-available-binaries.scm \
203 build-aux/check-final-inputs-self-contained.scm \
204 build-aux/download.scm \
205 build-aux/list-packages.scm \
206 build-aux/sync-descriptions.scm \
207 srfi/srfi-37.scm.in \
208 srfi/srfi-64.scm \
209 srfi/srfi-64.upstream.scm \
210 tests/test.drv \
211 tests/signing-key.pub \
212 tests/signing-key.sec \
213 build-aux/config.rpath \
214 bootstrap \
215 release.nix \
ed795c06 216 $(TESTS)
d7672884 217
49e6291a
LC
218if !BUILD_DAEMON_OFFLOAD
219
220EXTRA_DIST += \
221 guix/scripts/offload.scm
222
223endif !BUILD_DAEMON_OFFLOAD
224
225
30dd8310
LC
226CLEANFILES = \
227 $(GOBJECTS) \
9bff16b3 228 $(SCM_TESTS:tests/%.scm=%.log)
af51c820 229
dab5d51b
LC
230AM_V_GUILEC = $(AM_V_GUILEC_$(V))
231AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
232AM_V_GUILEC_0 = @echo " GUILEC" $@;
233
a69b7ad2
LC
234# XXX: Use the C locale for when Guile lacks
235# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
af51c820 236.scm.go:
dab5d51b 237 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
a69b7ad2 238 LC_ALL=C \
671d8f5e
LC
239 $(top_builddir)/pre-inst-env \
240 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
241 -Wformat -Wunbound-variable -Warity-mismatch \
242 --target="$(host)" \
af51c820
LC
243 -o "$@" "$<"
244
245SUFFIXES = .go
246
247# Make sure source files are installed first, so that the mtime of
248# installed compiled files is greater than that of installed source
249# files. See
250# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
251# for details.
252guix_install_go_files = install-nobase_nodist_guilemoduleDATA
253$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
f68b0893 254
ee764179 255SUBDIRS = po/guix po/packages
931c132a 256BUILT_SOURCES =
a9424c08
LC
257
258include doc.am
568717fd 259
c2033df4
LC
260if BUILD_DAEMON
261
262include daemon.am
263
264endif BUILD_DAEMON
265
f68b0893 266ACLOCAL_AMFLAGS = -I m4
e76bdf8b 267AM_DISTCHECK_CONFIGURE_FLAGS = \
d388c2c4 268 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
14af289e 269 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
aca54b39
LC
270 --with-nix-prefix="$(NIX_PREFIX)" \
271 --enable-daemon
0e993428 272
668d48a6 273dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
81f61c17 274distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
e793178a 275
668d48a6 276sync-descriptions:
0e993428 277 -$(top_builddir)/pre-inst-env $(GUILE) \
668d48a6 278 $(top_srcdir)/build-aux/sync-descriptions.scm
e793178a
LC
279
280gen-ChangeLog:
281 if test -d .git; then \
282 $(top_srcdir)/build-aux/gitlog-to-changelog \
283 > $(distdir)/cl-t; \
284 rm -f $(distdir)/ChangeLog; \
285 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
286 fi
287
834129e0 288# Make sure we're not shipping a file that embeds a local /gnu/store file name.
a463ffd9
LC
289assert-no-store-file-names:
290 if grep -r --exclude=*.texi --exclude=*.info \
291 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
292 then \
293 echo "error: store file names embedded in the distribution" >&2 ; \
294 exit 1 ; \
295 fi
296
56fbf262
LC
297# Make sure hydra.gnu.org has the important binaries.
298assert-binaries-available:
299 $(top_builddir)/pre-inst-env "$(GUILE)" \
300 "$(top_srcdir)/build-aux/check-available-binaries.scm"
301
81f61c17
LC
302# Make sure the final inputs don't refer to bootstrap tools.
303assert-final-inputs-self-contained:
304 $(top_builddir)/pre-inst-env "$(GUILE)" \
305 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
306
70a9c720 307.PHONY: sync-descriptions gen-ChangeLog clean-go
56fbf262 308.PHONY: assert-no-store-file-names assert-binaries-available
81f61c17 309.PHONY: assert-final-inputs-self-contained