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