build: Really clean .log files from SRFI-64.
[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 MODULES = \
28 guix/scripts/build.scm \
29 guix/scripts/download.scm \
30 guix/scripts/import.scm \
31 guix/scripts/package.scm \
32 guix/scripts/gc.scm \
33 guix/scripts/hash.scm \
34 guix/scripts/pull.scm \
35 guix/scripts/substitute-binary.scm \
36 guix/scripts/refresh.scm \
37 guix/base32.scm \
38 guix/utils.scm \
39 guix/serialization.scm \
40 guix/nar.scm \
41 guix/derivations.scm \
42 guix/download.scm \
43 guix/gnu-maintenance.scm \
44 guix/licenses.scm \
45 guix/build-system.scm \
46 guix/build-system/cmake.scm \
47 guix/build-system/gnu.scm \
48 guix/build-system/perl.scm \
49 guix/build-system/python.scm \
50 guix/build-system/trivial.scm \
51 guix/ftp-client.scm \
52 guix/web.scm \
53 guix/gnupg.scm \
54 guix/store.scm \
55 guix/ui.scm \
56 guix/build/download.scm \
57 guix/build/cmake-build-system.scm \
58 guix/build/gnu-build-system.scm \
59 guix/build/perl-build-system.scm \
60 guix/build/python-build-system.scm \
61 guix/build/utils.scm \
62 guix/build/union.scm \
63 guix/build/rpath.scm \
64 guix/packages.scm \
65 guix/snix.scm \
66 guix.scm \
67 gnu/packages.scm \
68 gnu/packages/acl.scm \
69 gnu/packages/algebra.scm \
70 gnu/packages/aspell.scm \
71 gnu/packages/attr.scm \
72 gnu/packages/autotools.scm \
73 gnu/packages/avahi.scm \
74 gnu/packages/base.scm \
75 gnu/packages/bash.scm \
76 gnu/packages/bazaar.scm \
77 gnu/packages/bdb.scm \
78 gnu/packages/bdw-gc.scm \
79 gnu/packages/bison.scm \
80 gnu/packages/bootstrap.scm \
81 gnu/packages/cdrom.scm \
82 gnu/packages/cflow.scm \
83 gnu/packages/check.scm \
84 gnu/packages/cmake.scm \
85 gnu/packages/compression.scm \
86 gnu/packages/cpio.scm \
87 gnu/packages/cppi.scm \
88 gnu/packages/cross-base.scm \
89 gnu/packages/cryptsetup.scm \
90 gnu/packages/curl.scm \
91 gnu/packages/cyrus-sasl.scm \
92 gnu/packages/dejagnu.scm \
93 gnu/packages/ddrescue.scm \
94 gnu/packages/dwm.scm \
95 gnu/packages/ed.scm \
96 gnu/packages/emacs.scm \
97 gnu/packages/fdisk.scm \
98 gnu/packages/file.scm \
99 gnu/packages/flex.scm \
100 gnu/packages/fontutils.scm \
101 gnu/packages/freeipmi.scm \
102 gnu/packages/gawk.scm \
103 gnu/packages/gcc.scm \
104 gnu/packages/gdb.scm \
105 gnu/packages/gdbm.scm \
106 gnu/packages/gettext.scm \
107 gnu/packages/ghostscript.scm \
108 gnu/packages/glib.scm \
109 gnu/packages/global.scm \
110 gnu/packages/gnupg.scm \
111 gnu/packages/gnutls.scm \
112 gnu/packages/gperf.scm \
113 gnu/packages/gprolog.scm \
114 gnu/packages/groff.scm \
115 gnu/packages/grub.scm \
116 gnu/packages/gsasl.scm \
117 gnu/packages/gtk.scm \
118 gnu/packages/guile.scm \
119 gnu/packages/gv.scm \
120 gnu/packages/help2man.scm \
121 gnu/packages/hugs.scm \
122 gnu/packages/icu4c.scm \
123 gnu/packages/idutils.scm \
124 gnu/packages/indent.scm \
125 gnu/packages/irssi.scm \
126 gnu/packages/ld-wrapper.scm \
127 gnu/packages/less.scm \
128 gnu/packages/lesstif.scm \
129 gnu/packages/libapr.scm \
130 gnu/packages/libdaemon.scm \
131 gnu/packages/libevent.scm \
132 gnu/packages/libffi.scm \
133 gnu/packages/libidn.scm \
134 gnu/packages/libjpeg.scm \
135 gnu/packages/libphidget.scm \
136 gnu/packages/libpng.scm \
137 gnu/packages/libsigsegv.scm \
138 gnu/packages/libtiff.scm \
139 gnu/packages/libunistring.scm \
140 gnu/packages/libusb.scm \
141 gnu/packages/libunwind.scm \
142 gnu/packages/linux.scm \
143 gnu/packages/linux-initrd.scm \
144 gnu/packages/lout.scm \
145 gnu/packages/lsh.scm \
146 gnu/packages/lsof.scm \
147 gnu/packages/lua.scm \
148 gnu/packages/lvm.scm \
149 gnu/packages/m4.scm \
150 gnu/packages/mailutils.scm \
151 gnu/packages/make-bootstrap.scm \
152 gnu/packages/mit-krb5.scm \
153 gnu/packages/mp3.scm \
154 gnu/packages/multiprecision.scm \
155 gnu/packages/mysql.scm \
156 gnu/packages/nano.scm \
157 gnu/packages/ncurses.scm \
158 gnu/packages/netpbm.scm \
159 gnu/packages/nettle.scm \
160 gnu/packages/ocaml.scm \
161 gnu/packages/oggvorbis.scm \
162 gnu/packages/openldap.scm \
163 gnu/packages/openssl.scm \
164 gnu/packages/parted.scm \
165 gnu/packages/patchelf.scm \
166 gnu/packages/pcre.scm \
167 gnu/packages/pdf.scm \
168 gnu/packages/perl.scm \
169 gnu/packages/pkg-config.scm \
170 gnu/packages/popt.scm \
171 gnu/packages/pth.scm \
172 gnu/packages/python.scm \
173 gnu/packages/qemu.scm \
174 gnu/packages/ratpoison.scm \
175 gnu/packages/readline.scm \
176 gnu/packages/recutils.scm \
177 gnu/packages/rsync.scm \
178 gnu/packages/samba.scm \
179 gnu/packages/scheme.scm \
180 gnu/packages/screen.scm \
181 gnu/packages/shishi.scm \
182 gnu/packages/smalltalk.scm \
183 gnu/packages/sqlite.scm \
184 gnu/packages/ssh.scm \
185 gnu/packages/subversion.scm \
186 gnu/packages/system.scm \
187 gnu/packages/tcl.scm \
188 gnu/packages/tcsh.scm \
189 gnu/packages/texinfo.scm \
190 gnu/packages/texlive.scm \
191 gnu/packages/time.scm \
192 gnu/packages/tmux.scm \
193 gnu/packages/tor.scm \
194 gnu/packages/vim.scm \
195 gnu/packages/vpn.scm \
196 gnu/packages/w3m.scm \
197 gnu/packages/wdiff.scm \
198 gnu/packages/wget.scm \
199 gnu/packages/which.scm \
200 gnu/packages/xml.scm \
201 gnu/packages/xorg.scm \
202 gnu/packages/zile.scm \
203 gnu/packages/zip.scm \
204 gnu/system/vm.scm
205
206 # Because of the autoload hack in (guix build download), we must build it
207 # first to avoid errors on systems where (gnutls) is unavailable.
208 guix/scripts/download.go: guix/build/download.go
209
210 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
211
212 nobase_dist_guilemodule_DATA = $(MODULES)
213
214 patchdir = $(guilemoduledir)/gnu/packages/patches
215 dist_patch_DATA = \
216 gnu/packages/patches/automake-skip-amhello-tests.patch \
217 gnu/packages/patches/bigloo-gc-shebangs.patch \
218 gnu/packages/patches/binutils-ld-new-dtags.patch \
219 gnu/packages/patches/cmake-fix-tests.patch \
220 gnu/packages/patches/cpio-gets-undeclared.patch \
221 gnu/packages/patches/diffutils-gets-undeclared.patch \
222 gnu/packages/patches/emacs-configure-sh.patch \
223 gnu/packages/patches/findutils-absolute-paths.patch \
224 gnu/packages/patches/flac-fix-memcmp-not-declared.patch \
225 gnu/packages/patches/flex-bison-tests.patch \
226 gnu/packages/patches/gawk-shell.patch \
227 gnu/packages/patches/gcc-cross-environment-variables.patch \
228 gnu/packages/patches/gettext-gets-undeclared.patch \
229 gnu/packages/patches/glib-tests-desktop.patch \
230 gnu/packages/patches/glib-tests-homedir.patch \
231 gnu/packages/patches/glib-tests-prlimit.patch \
232 gnu/packages/patches/glib-tests-timezone.patch \
233 gnu/packages/patches/glibc-bootstrap-system.patch \
234 gnu/packages/patches/glibc-no-ld-so-cache.patch \
235 gnu/packages/patches/grub-gets-undeclared.patch \
236 gnu/packages/patches/guile-1.8-cpp-4.5.patch \
237 gnu/packages/patches/guile-default-utf8.patch \
238 gnu/packages/patches/guile-linux-syscalls.patch \
239 gnu/packages/patches/guile-relocatable.patch \
240 gnu/packages/patches/libapr-skip-getservbyname-test.patch \
241 gnu/packages/patches/libevent-dns-tests.patch \
242 gnu/packages/patches/libtool-skip-tests.patch \
243 gnu/packages/patches/lsh-guile-compat.patch \
244 gnu/packages/patches/lsh-no-root-login.patch \
245 gnu/packages/patches/lsh-pam-service-name.patch \
246 gnu/packages/patches/m4-gets-undeclared.patch \
247 gnu/packages/patches/m4-readlink-EINVAL.patch \
248 gnu/packages/patches/m4-s_isdir.patch \
249 gnu/packages/patches/make-impure-dirs.patch \
250 gnu/packages/patches/mcron-install.patch \
251 gnu/packages/patches/perl-no-sys-dirs.patch \
252 gnu/packages/patches/python-fix-dbm.patch \
253 gnu/packages/patches/procps-make-3.82.patch \
254 gnu/packages/patches/qemu-multiple-smb-shares.patch \
255 gnu/packages/patches/readline-link-ncurses.patch \
256 gnu/packages/patches/scheme48-tests.patch \
257 gnu/packages/patches/tar-gets-undeclared.patch \
258 gnu/packages/patches/tcsh-fix-autotest.patch \
259 gnu/packages/patches/teckit-cstdio.patch \
260 gnu/packages/patches/vpnc-script.patch \
261 gnu/packages/patches/w3m-fix-compile.patch \
262 gnu/packages/patches/xpdf-constchar.patch
263
264 bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
265 bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
266 bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
267
268 dist_bootstrap_x86_64_linux_DATA = \
269 gnu/packages/bootstrap/x86_64-linux/bash \
270 gnu/packages/bootstrap/x86_64-linux/mkdir \
271 gnu/packages/bootstrap/x86_64-linux/tar \
272 gnu/packages/bootstrap/x86_64-linux/xz
273
274 dist_bootstrap_i686_linux_DATA = \
275 gnu/packages/bootstrap/i686-linux/bash \
276 gnu/packages/bootstrap/i686-linux/mkdir \
277 gnu/packages/bootstrap/i686-linux/tar \
278 gnu/packages/bootstrap/i686-linux/xz
279
280 # Big bootstrap binaries are not included in the tarball. Instead, they
281 # are downloaded.
282 nodist_bootstrap_x86_64_linux_DATA = \
283 gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz
284 nodist_bootstrap_i686_linux_DATA = \
285 gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz
286
287 # Those files must remain executable, so they remain executable once
288 # imported into the store.
289 install-data-hook:
290 chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
291
292 DISTCLEANFILES = \
293 $(nodist_bootstrap_x86_64_linux_DATA) \
294 $(nodist_bootstrap_i686_linux_DATA)
295
296 # Method to download a file from an external source.
297 DOWNLOAD_FILE = \
298 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
299 $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \
300 "$(top_srcdir)/build-aux/download.scm"
301
302 gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz:
303 $(MKDIR_P) `dirname "$@"`
304 $(DOWNLOAD_FILE) "$@" "bc43210dcd146d242bef4d354b0aeac12c4ef3118c07502d17ffa8d49e15aa2c"
305 gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz:
306 $(MKDIR_P) `dirname "$@"`
307 $(DOWNLOAD_FILE) "$@" "f9a7c6f4c556eaafa2a69bcf07d4ffbb6682ea831d4c9da9ba095aca3ccd217c"
308
309 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
310
311 SCM_TESTS = \
312 tests/base32.scm \
313 tests/builders.scm \
314 tests/derivations.scm \
315 tests/ui.scm \
316 tests/utils.scm \
317 tests/build-utils.scm \
318 tests/packages.scm \
319 tests/snix.scm \
320 tests/store.scm \
321 tests/nar.scm \
322 tests/union.scm
323
324 SH_TESTS = \
325 tests/guix-build.sh \
326 tests/guix-download.sh \
327 tests/guix-gc.sh \
328 tests/guix-hash.sh \
329 tests/guix-package.sh
330
331 TESTS = $(SCM_TESTS) $(SH_TESTS)
332
333 TEST_EXTENSIONS = .scm .sh
334
335 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
336
337 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
338 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
339
340 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
341 AM_SH_LOG_FLAGS = -x -e
342
343 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
344 # could end up removing files from the store while they are being used by
345 # other instances of the daemon.
346 tests/guix-gc.log: \
347 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
348 $(SCM_TESTS:%.scm=%.log)
349
350
351 EXTRA_DIST = \
352 HACKING \
353 ROADMAP \
354 TODO \
355 .dir-locals.el \
356 hydra.scm \
357 build-aux/download.scm \
358 build-aux/sync-synopses.scm \
359 srfi/srfi-64.scm \
360 srfi/srfi-64.upstream.scm \
361 tests/test.drv \
362 build-aux/config.rpath \
363 bootstrap \
364 release.nix \
365 $(TESTS)
366
367 CLEANFILES = \
368 $(GOBJECTS) \
369 $(SCM_TESTS:tests/%.scm=%.log)
370
371 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
372 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
373 AM_V_GUILEC_0 = @echo " GUILEC" $@;
374
375 # XXX: Use the C locale for when Guile lacks
376 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
377 .scm.go:
378 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
379 LC_ALL=C \
380 $(top_builddir)/pre-inst-env \
381 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
382 -Wformat -Wunbound-variable -Warity-mismatch \
383 --target="$(host)" \
384 -o "$@" "$<"
385
386 SUFFIXES = .go
387
388 # Make sure source files are installed first, so that the mtime of
389 # installed compiled files is greater than that of installed source
390 # files. See
391 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
392 # for details.
393 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
394 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
395
396 SUBDIRS = po
397
398 info_TEXINFOS = doc/guix.texi
399 EXTRA_DIST += doc/fdl-1.3.texi
400
401 if BUILD_DAEMON
402
403 include daemon.am
404
405 endif BUILD_DAEMON
406
407 ACLOCAL_AMFLAGS = -I m4
408 AM_DISTCHECK_CONFIGURE_FLAGS = \
409 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
410 --with-nix-prefix="$(NIX_PREFIX)" \
411 --enable-daemon
412
413 dist-hook:
414 -$(top_builddir)/pre-inst-env $(GUILE) \
415 $(top_srcdir)/build-aux/sync-synopses.scm