Add pre-inst-env and test-env to nodist_noinst_SCRIPTS in Makefile.am.
[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 guix-build \
22 guix-download \
23 guix-import \
24 guix-package \
25 guix-gc
26
27 nodist_noinst_SCRIPTS = \
28 pre-inst-env \
29 test-env
30
31 MODULES = \
32 guix/base32.scm \
33 guix/utils.scm \
34 guix/derivations.scm \
35 guix/download.scm \
36 guix/gnu-maintenance.scm \
37 guix/licenses.scm \
38 guix/build-system.scm \
39 guix/build-system/gnu.scm \
40 guix/build-system/trivial.scm \
41 guix/ftp-client.scm \
42 guix/store.scm \
43 guix/ui.scm \
44 guix/build/download.scm \
45 guix/build/gnu-build-system.scm \
46 guix/build/utils.scm \
47 guix/build/union.scm \
48 guix/packages.scm \
49 guix/snix.scm \
50 guix.scm \
51 gnu/packages.scm \
52 gnu/packages/acl.scm \
53 gnu/packages/algebra.scm \
54 gnu/packages/aspell.scm \
55 gnu/packages/attr.scm \
56 gnu/packages/autotools.scm \
57 gnu/packages/base.scm \
58 gnu/packages/bash.scm \
59 gnu/packages/bdb.scm \
60 gnu/packages/bdw-gc.scm \
61 gnu/packages/bison.scm \
62 gnu/packages/bootstrap.scm \
63 gnu/packages/cdrom.scm \
64 gnu/packages/check.scm \
65 gnu/packages/compression.scm \
66 gnu/packages/cpio.scm \
67 gnu/packages/curl.scm \
68 gnu/packages/cyrus-sasl.scm \
69 gnu/packages/dejagnu.scm \
70 gnu/packages/ddrescue.scm \
71 gnu/packages/ed.scm \
72 gnu/packages/emacs.scm \
73 gnu/packages/file.scm \
74 gnu/packages/flex.scm \
75 gnu/packages/fontutils.scm \
76 gnu/packages/gawk.scm \
77 gnu/packages/gdb.scm \
78 gnu/packages/gdbm.scm \
79 gnu/packages/gettext.scm \
80 gnu/packages/ghostscript.scm \
81 gnu/packages/glib.scm \
82 gnu/packages/global.scm \
83 gnu/packages/gnupg.scm \
84 gnu/packages/gnutls.scm \
85 gnu/packages/gperf.scm \
86 gnu/packages/gprolog.scm \
87 gnu/packages/groff.scm \
88 gnu/packages/grub.scm \
89 gnu/packages/gsasl.scm \
90 gnu/packages/guile.scm \
91 gnu/packages/help2man.scm \
92 gnu/packages/icu4c.scm \
93 gnu/packages/idutils.scm \
94 gnu/packages/indent.scm \
95 gnu/packages/irssi.scm \
96 gnu/packages/ld-wrapper.scm \
97 gnu/packages/less.scm \
98 gnu/packages/libapr.scm \
99 gnu/packages/libevent.scm \
100 gnu/packages/libffi.scm \
101 gnu/packages/libidn.scm \
102 gnu/packages/libjpeg.scm \
103 gnu/packages/libpng.scm \
104 gnu/packages/libsigsegv.scm \
105 gnu/packages/libtiff.scm \
106 gnu/packages/libunistring.scm \
107 gnu/packages/libusb.scm \
108 gnu/packages/libunwind.scm \
109 gnu/packages/linux.scm \
110 gnu/packages/lout.scm \
111 gnu/packages/lsh.scm \
112 gnu/packages/m4.scm \
113 gnu/packages/mailutils.scm \
114 gnu/packages/make-bootstrap.scm \
115 gnu/packages/mit-krb5.scm \
116 gnu/packages/mp3.scm \
117 gnu/packages/multiprecision.scm \
118 gnu/packages/mysql.scm \
119 gnu/packages/nano.scm \
120 gnu/packages/ncurses.scm \
121 gnu/packages/netpbm.scm \
122 gnu/packages/nettle.scm \
123 gnu/packages/ocaml.scm \
124 gnu/packages/oggvorbis.scm \
125 gnu/packages/openldap.scm \
126 gnu/packages/openssl.scm \
127 gnu/packages/patchelf.scm \
128 gnu/packages/pcre.scm \
129 gnu/packages/pdf.scm \
130 gnu/packages/perl.scm \
131 gnu/packages/pkg-config.scm \
132 gnu/packages/popt.scm \
133 gnu/packages/pth.scm \
134 gnu/packages/python.scm \
135 gnu/packages/qemu.scm \
136 gnu/packages/readline.scm \
137 gnu/packages/recutils.scm \
138 gnu/packages/rsync.scm \
139 gnu/packages/samba.scm \
140 gnu/packages/scheme.scm \
141 gnu/packages/screen.scm \
142 gnu/packages/shishi.scm \
143 gnu/packages/smalltalk.scm \
144 gnu/packages/sqlite.scm \
145 gnu/packages/ssh.scm \
146 gnu/packages/subversion.scm \
147 gnu/packages/system.scm \
148 gnu/packages/tcl.scm \
149 gnu/packages/tcsh.scm \
150 gnu/packages/texinfo.scm \
151 gnu/packages/texlive.scm \
152 gnu/packages/time.scm \
153 gnu/packages/tmux.scm \
154 gnu/packages/tor.scm \
155 gnu/packages/wget.scm \
156 gnu/packages/which.scm \
157 gnu/packages/xml.scm \
158 gnu/packages/zile.scm \
159 gnu/packages/zip.scm
160
161
162 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
163
164 nobase_dist_guilemodule_DATA = $(MODULES)
165
166 patchdir = $(guilemoduledir)/gnu/packages/patches
167 dist_patch_DATA = \
168 gnu/packages/patches/automake-skip-amhello-tests.patch \
169 gnu/packages/patches/bigloo-gc-shebangs.patch \
170 gnu/packages/patches/binutils-ld-new-dtags.patch \
171 gnu/packages/patches/cpio-gets-undeclared.patch \
172 gnu/packages/patches/diffutils-gets-undeclared.patch \
173 gnu/packages/patches/emacs-configure-sh.patch \
174 gnu/packages/patches/findutils-absolute-paths.patch \
175 gnu/packages/patches/flac-fix-memcmp-not-declared.patch \
176 gnu/packages/patches/flex-bison-tests.patch \
177 gnu/packages/patches/gawk-shell.patch \
178 gnu/packages/patches/gettext-gets-undeclared.patch \
179 gnu/packages/patches/glib-tests-desktop.patch \
180 gnu/packages/patches/glib-tests-homedir.patch \
181 gnu/packages/patches/glib-tests-timezone.patch \
182 gnu/packages/patches/glibc-bootstrap-system.patch \
183 gnu/packages/patches/glibc-no-ld-so-cache.patch \
184 gnu/packages/patches/grub-gets-undeclared.patch \
185 gnu/packages/patches/guile-1.8-cpp-4.5.patch \
186 gnu/packages/patches/guile-default-utf8.patch \
187 gnu/packages/patches/guile-relocatable.patch \
188 gnu/packages/patches/libapr-skip-getservbyname-test.patch \
189 gnu/packages/patches/libevent-dns-tests.patch \
190 gnu/packages/patches/libtool-skip-tests.patch \
191 gnu/packages/patches/lsh-guile-compat.patch \
192 gnu/packages/patches/lsh-no-root-login.patch \
193 gnu/packages/patches/lsh-pam-service-name.patch \
194 gnu/packages/patches/m4-gets-undeclared.patch \
195 gnu/packages/patches/m4-readlink-EINVAL.patch \
196 gnu/packages/patches/m4-s_isdir.patch \
197 gnu/packages/patches/make-impure-dirs.patch \
198 gnu/packages/patches/perl-no-sys-dirs.patch \
199 gnu/packages/patches/procps-make-3.82.patch \
200 gnu/packages/patches/readline-link-ncurses.patch \
201 gnu/packages/patches/shishi-gets-undeclared.patch \
202 gnu/packages/patches/tar-gets-undeclared.patch \
203 gnu/packages/patches/tcsh-fix-autotest.patch \
204 gnu/packages/patches/teckit-cstdio.patch
205
206 bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
207 bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
208 bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
209
210 dist_bootstrap_x86_64_linux_DATA = \
211 gnu/packages/bootstrap/x86_64-linux/bash \
212 gnu/packages/bootstrap/x86_64-linux/mkdir \
213 gnu/packages/bootstrap/x86_64-linux/tar \
214 gnu/packages/bootstrap/x86_64-linux/xz
215
216 dist_bootstrap_i686_linux_DATA = \
217 gnu/packages/bootstrap/i686-linux/bash \
218 gnu/packages/bootstrap/i686-linux/mkdir \
219 gnu/packages/bootstrap/i686-linux/tar \
220 gnu/packages/bootstrap/i686-linux/xz
221
222 # Big bootstrap binaries are not included in the tarball. Instead, they
223 # are downloaded.
224 nodist_bootstrap_x86_64_linux_DATA = \
225 gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz
226 nodist_bootstrap_i686_linux_DATA = \
227 gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz
228
229 # Those files must remain executable, so they remain executable once
230 # imported into the store.
231 install-data-hook:
232 chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
233
234 DISTCLEANFILES = \
235 $(nodist_bootstrap_x86_64_linux_DATA) \
236 $(nodist_bootstrap_i686_linux_DATA)
237
238 # Method to download a file from an external source.
239 DOWNLOAD_FILE = \
240 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
241 $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \
242 "$(top_srcdir)/build-aux/download.scm"
243
244 gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz:
245 $(MKDIR_P) `dirname "$@"`
246 $(DOWNLOAD_FILE) "$@" "bc43210dcd146d242bef4d354b0aeac12c4ef3118c07502d17ffa8d49e15aa2c"
247 gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz:
248 $(MKDIR_P) `dirname "$@"`
249 $(DOWNLOAD_FILE) "$@" "f9a7c6f4c556eaafa2a69bcf07d4ffbb6682ea831d4c9da9ba095aca3ccd217c"
250
251 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
252
253 TESTS = \
254 tests/base32.scm \
255 tests/builders.scm \
256 tests/derivations.scm \
257 tests/ui.scm \
258 tests/utils.scm \
259 tests/build-utils.scm \
260 tests/packages.scm \
261 tests/snix.scm \
262 tests/store.scm \
263 tests/union.scm \
264 tests/guix-build.sh \
265 tests/guix-download.sh \
266 tests/guix-gc.sh \
267 tests/guix-package.sh
268
269 TEST_EXTENSIONS = .scm .sh
270
271 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
272
273 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
274 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
275
276 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
277 AM_SH_LOG_FLAGS = -x -e
278
279 EXTRA_DIST = \
280 HACKING \
281 ROADMAP \
282 TODO \
283 .dir-locals.el \
284 hydra.scm \
285 build-aux/download.scm \
286 srfi/srfi-64.scm \
287 srfi/srfi-64.upstream.scm \
288 tests/test.drv \
289 build-aux/config.rpath \
290 bootstrap \
291 release.nix \
292 $(TESTS)
293
294 CLEANFILES = $(GOBJECTS) *.log
295
296 # XXX: Use the C locale for when Guile lacks
297 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
298 .scm.go:
299 $(MKDIR_P) `dirname "$@"`
300 LC_ALL=C \
301 $(top_builddir)/pre-inst-env \
302 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
303 -Wformat -Wunbound-variable -Warity-mismatch \
304 --target="$(host)" \
305 -o "$@" "$<"
306
307 SUFFIXES = .go
308
309 # Make sure source files are installed first, so that the mtime of
310 # installed compiled files is greater than that of installed source
311 # files. See
312 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
313 # for details.
314 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
315 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
316
317 SUBDIRS = po
318
319 info_TEXINFOS = doc/guix.texi
320 EXTRA_DIST += doc/fdl-1.3.texi
321
322 if BUILD_DAEMON
323
324 include daemon.am
325
326 endif BUILD_DAEMON
327
328 ACLOCAL_AMFLAGS = -I m4
329 AM_DISTCHECK_CONFIGURE_FLAGS = \
330 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
331 --with-nix-prefix="$(NIX_PREFIX)" \
332 --enable-daemon