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