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