gnu: gsl: Disable numerically unstable test on i686.
[jackhill/guix/guix.git] / Makefile.am
1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
3 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 #
5 # This file is part of GNU Guix.
6 #
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.
11 #
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.
16 #
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/>.
19
20 bin_SCRIPTS = \
21 scripts/guix
22
23 nodist_noinst_SCRIPTS = \
24 pre-inst-env \
25 test-env
26
27 include gnu-system.am
28
29 MODULES = \
30 guix/scripts/build.scm \
31 guix/scripts/download.scm \
32 guix/scripts/import.scm \
33 guix/scripts/package.scm \
34 guix/scripts/gc.scm \
35 guix/scripts/hash.scm \
36 guix/scripts/pull.scm \
37 guix/scripts/substitute-binary.scm \
38 guix/scripts/refresh.scm \
39 guix/base32.scm \
40 guix/records.scm \
41 guix/hash.scm \
42 guix/utils.scm \
43 guix/serialization.scm \
44 guix/nar.scm \
45 guix/derivations.scm \
46 guix/download.scm \
47 guix/gnu-maintenance.scm \
48 guix/licenses.scm \
49 guix/build-system.scm \
50 guix/build-system/cmake.scm \
51 guix/build-system/gnu.scm \
52 guix/build-system/perl.scm \
53 guix/build-system/python.scm \
54 guix/build-system/trivial.scm \
55 guix/ftp-client.scm \
56 guix/http-client.scm \
57 guix/gnupg.scm \
58 guix/store.scm \
59 guix/ui.scm \
60 guix/build/download.scm \
61 guix/build/cmake-build-system.scm \
62 guix/build/gnu-build-system.scm \
63 guix/build/gnu-dist.scm \
64 guix/build/linux-initrd.scm \
65 guix/build/perl-build-system.scm \
66 guix/build/python-build-system.scm \
67 guix/build/utils.scm \
68 guix/build/union.scm \
69 guix/build/rpath.scm \
70 guix/packages.scm \
71 guix/snix.scm \
72 guix.scm \
73 $(GNU_SYSTEM_MODULES)
74
75 # Because of the autoload hack in (guix build download), we must build it
76 # first to avoid errors on systems where (gnutls) is unavailable.
77 guix/scripts/download.go: guix/build/download.go
78
79
80 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
81
82 nobase_dist_guilemodule_DATA = $(MODULES)
83 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
84
85 # Do we need to provide our own non-broken (srfi srfi-37) module?
86 if INSTALL_SRFI_37
87
88 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
89 GOBJECTS += srfi/srfi-37.go
90
91 srfi/srfi-37.scm: srfi/srfi-37.scm.in
92 $(MKDIR_P) srfi
93 cp "$<" "$@"
94
95 endif INSTALL_SRFI_37
96
97
98 SCM_TESTS = \
99 tests/base32.scm \
100 tests/hash.scm \
101 tests/builders.scm \
102 tests/derivations.scm \
103 tests/ui.scm \
104 tests/records.scm \
105 tests/utils.scm \
106 tests/build-utils.scm \
107 tests/packages.scm \
108 tests/snix.scm \
109 tests/store.scm \
110 tests/nar.scm \
111 tests/union.scm
112
113 SH_TESTS = \
114 tests/guix-build.sh \
115 tests/guix-download.sh \
116 tests/guix-gc.sh \
117 tests/guix-hash.sh \
118 tests/guix-package.sh
119
120 TESTS = $(SCM_TESTS) $(SH_TESTS)
121
122 TEST_EXTENSIONS = .scm .sh
123
124 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
125
126 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
127 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
128
129 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
130 AM_SH_LOG_FLAGS = -x -e
131
132 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
133 # could end up removing files from the store while they are being used by
134 # other instances of the daemon.
135 tests/guix-gc.log: \
136 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
137 $(SCM_TESTS:%.scm=%.log)
138
139
140 EXTRA_DIST = \
141 HACKING \
142 ROADMAP \
143 TODO \
144 .dir-locals.el \
145 build-aux/hydra/gnu-system.scm \
146 build-aux/hydra/guix.scm \
147 build-aux/check-available-binaries.scm \
148 build-aux/download.scm \
149 build-aux/list-packages.scm \
150 build-aux/sync-synopses.scm \
151 srfi/srfi-37.scm.in \
152 srfi/srfi-64.scm \
153 srfi/srfi-64.upstream.scm \
154 tests/test.drv \
155 build-aux/config.rpath \
156 bootstrap \
157 release.nix \
158 $(TESTS)
159
160 CLEANFILES = \
161 $(GOBJECTS) \
162 $(SCM_TESTS:tests/%.scm=%.log)
163
164 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
165 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
166 AM_V_GUILEC_0 = @echo " GUILEC" $@;
167
168 # XXX: Use the C locale for when Guile lacks
169 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
170 .scm.go:
171 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
172 LC_ALL=C \
173 $(top_builddir)/pre-inst-env \
174 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
175 -Wformat -Wunbound-variable -Warity-mismatch \
176 --target="$(host)" \
177 -o "$@" "$<"
178
179 SUFFIXES = .go
180
181 # Make sure source files are installed first, so that the mtime of
182 # installed compiled files is greater than that of installed source
183 # files. See
184 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
185 # for details.
186 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
187 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
188
189 SUBDIRS = po
190
191 include doc.am
192
193 if BUILD_DAEMON
194
195 include daemon.am
196
197 endif BUILD_DAEMON
198
199 ACLOCAL_AMFLAGS = -I m4
200 AM_DISTCHECK_CONFIGURE_FLAGS = \
201 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
202 --with-nix-prefix="$(NIX_PREFIX)" \
203 --enable-daemon
204
205 dist-hook: sync-synopses gen-ChangeLog assert-no-store-file-names
206 distcheck-hook: assert-binaries-available
207
208 sync-synopses:
209 -$(top_builddir)/pre-inst-env $(GUILE) \
210 $(top_srcdir)/build-aux/sync-synopses.scm
211
212 gen-ChangeLog:
213 if test -d .git; then \
214 $(top_srcdir)/build-aux/gitlog-to-changelog \
215 > $(distdir)/cl-t; \
216 rm -f $(distdir)/ChangeLog; \
217 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
218 fi
219
220 # Make sure we're not shipping a file that embeds a local /nix/store file name.
221 assert-no-store-file-names:
222 if grep -r --exclude=*.texi --exclude=*.info \
223 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
224 then \
225 echo "error: store file names embedded in the distribution" >&2 ; \
226 exit 1 ; \
227 fi
228
229 # Make sure hydra.gnu.org has the important binaries.
230 assert-binaries-available:
231 $(top_builddir)/pre-inst-env "$(GUILE)" \
232 "$(top_srcdir)/build-aux/check-available-binaries.scm"
233
234 .PHONY: sync-synopses gen-ChangeLog
235 .PHONY: assert-no-store-file-names assert-binaries-available