Add `guix-gc'.
[jackhill/guix/guix.git] / Makefile.am
CommitLineData
af51c820 1# Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
fe8ff028 2# Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
af51c820
LC
3#
4# This file is part of Guix.
5#
6# Guix is free software; you can redistribute it and/or modify it
7# under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 3 of the License, or (at
9# your option) any later version.
10#
11# Guix is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with Guix. If not, see <http://www.gnu.org/licenses/>.
18
c52a5bf0
LC
19bin_SCRIPTS = \
20 guix-build \
0afdc485 21 guix-download \
10226c05 22 guix-import \
fe8ff028
LC
23 guix-package \
24 guix-gc
14a1c319 25
af51c820 26MODULES = \
ddc29a78 27 guix/base32.scm \
73fbb904 28 guix/utils.scm \
af51c820 29 guix/derivations.scm \
62cab99c 30 guix/download.scm \
22189ed1 31 guix/gnu-maintenance.scm \
838d78e3 32 guix/licenses.scm \
208f7cd1
LC
33 guix/build-system.scm \
34 guix/build-system/gnu.scm \
be13fbfa 35 guix/build-system/trivial.scm \
457dd86d 36 guix/ftp-client.scm \
af51c820 37 guix/store.scm \
073c34d7 38 guix/ui.scm \
62cab99c 39 guix/build/download.scm \
af51c820 40 guix/build/gnu-build-system.scm \
1273d44a 41 guix/build/utils.scm \
c8c88afa 42 guix/build/union.scm \
e3ce5d70 43 guix/packages.scm \
10226c05 44 guix/snix.scm \
e3ce5d70 45 guix.scm \
6b1891b0 46 distro.scm \
6ad2697d 47 distro/packages/acl.scm \
2ed139c4 48 distro/packages/algebra.scm \
3d282f90 49 distro/packages/attr.scm \
80ffc708 50 distro/packages/autotools.scm \
1f455fdc 51 distro/packages/base.scm \
c44899a2
LC
52 distro/packages/bash.scm \
53 distro/packages/bdw-gc.scm \
cf153fc4 54 distro/packages/bison.scm \
18633d4f 55 distro/packages/bootstrap.scm \
d8989c23 56 distro/packages/check.scm \
a268f085 57 distro/packages/compression.scm \
501b1675 58 distro/packages/cpio.scm \
60a29092 59 distro/packages/bdb.scm \
034cb8e7 60 distro/packages/ddrescue.scm \
0aa94f0c 61 distro/packages/ed.scm \
e2b2c466 62 distro/packages/flex.scm \
c44899a2 63 distro/packages/gawk.scm \
30c40755 64 distro/packages/gdbm.scm \
f190f92f 65 distro/packages/gettext.scm \
8d1939e4 66 distro/packages/gnupg.scm \
7543f865 67 distro/packages/gnutls.scm \
1627f7f7 68 distro/packages/gperf.scm \
3aa6fab8 69 distro/packages/gsasl.scm \
1722d680 70 distro/packages/guile.scm \
cc8e5e25 71 distro/packages/help2man.scm \
5a8fd06d 72 distro/packages/idutils.scm \
1722d680 73 distro/packages/ld-wrapper.scm \
fe7777c1 74 distro/packages/less.scm \
c44899a2 75 distro/packages/libffi.scm \
2ee8edc4 76 distro/packages/libidn.scm \
c44899a2 77 distro/packages/libsigsegv.scm \
c44899a2 78 distro/packages/libunistring.scm \
3b48f78c 79 distro/packages/libusb.scm \
fd76c904 80 distro/packages/linux.scm \
9d9e6450 81 distro/packages/lout.scm \
18d50d76 82 distro/packages/lsh.scm \
c44899a2 83 distro/packages/m4.scm \
8ba60d7b 84 distro/packages/make-bootstrap.scm \
9dc6f288 85 distro/packages/mit-krb5.scm \
c44899a2 86 distro/packages/multiprecision.scm \
7f40d97d 87 distro/packages/nano.scm \
c44899a2 88 distro/packages/ncurses.scm \
2e659827 89 distro/packages/nettle.scm \
c44899a2
LC
90 distro/packages/perl.scm \
91 distro/packages/pkg-config.scm \
d373e57e 92 distro/packages/pth.scm \
c44899a2 93 distro/packages/readline.scm \
db32c281 94 distro/packages/recutils.scm \
c8911fa3 95 distro/packages/rsync.scm \
5b2fd618 96 distro/packages/shishi.scm \
1df895b0 97 distro/packages/system.scm \
fb9821f0 98 distro/packages/texinfo.scm \
b147f59f 99 distro/packages/time.scm \
da7b042d 100 distro/packages/wget.scm \
6e6979c6 101 distro/packages/which.scm \
fb9821f0 102 distro/packages/zile.scm
af51c820 103
c44899a2 104
00e219d1 105GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
af51c820 106
800cdeef
LC
107nobase_dist_guilemodule_DATA = $(MODULES)
108
0b3651bc 109patchdir = $(guilemoduledir)/distro/packages/patches
bfb3c3d0
LC
110dist_patch_DATA = \
111 distro/packages/patches/binutils-ld-new-dtags.patch \
501b1675 112 distro/packages/patches/cpio-gets-undeclared.patch \
bfb3c3d0 113 distro/packages/patches/diffutils-gets-undeclared.patch \
e2b2c466 114 distro/packages/patches/flex-bison-tests.patch \
f190f92f 115 distro/packages/patches/gettext-gets-undeclared.patch \
25608d64 116 distro/packages/patches/glibc-no-ld-so-cache.patch \
bfb3c3d0
LC
117 distro/packages/patches/guile-1.8-cpp-4.5.patch \
118 distro/packages/patches/guile-default-utf8.patch \
119 distro/packages/patches/guile-relocatable.patch \
120 distro/packages/patches/libtool-skip-tests.patch \
18d50d76
LC
121 distro/packages/patches/lsh-guile-compat.patch \
122 distro/packages/patches/lsh-no-root-login.patch \
123 distro/packages/patches/lsh-pam-service-name.patch \
bfb3c3d0
LC
124 distro/packages/patches/m4-gets-undeclared.patch \
125 distro/packages/patches/m4-readlink-EINVAL.patch \
126 distro/packages/patches/m4-s_isdir.patch \
127 distro/packages/patches/make-impure-dirs.patch \
128 distro/packages/patches/findutils-absolute-paths.patch \
129 distro/packages/patches/perl-no-sys-dirs.patch \
130 distro/packages/patches/readline-link-ncurses.patch \
5b2fd618 131 distro/packages/patches/shishi-gets-undeclared.patch \
bfb3c3d0 132 distro/packages/patches/tar-gets-undeclared.patch
d7672884 133
0b3651bc 134bootstrapdir = $(guilemoduledir)/distro/packages/bootstrap
ac5aa288 135bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
d25468bc 136bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
ac5aa288
LC
137
138dist_bootstrap_x86_64_linux_DATA = \
139 distro/packages/bootstrap/x86_64-linux/bash \
140 distro/packages/bootstrap/x86_64-linux/mkdir \
141 distro/packages/bootstrap/x86_64-linux/tar \
142 distro/packages/bootstrap/x86_64-linux/xz
143
d25468bc
LC
144dist_bootstrap_i686_linux_DATA = \
145 distro/packages/bootstrap/i686-linux/bash \
146 distro/packages/bootstrap/i686-linux/mkdir \
147 distro/packages/bootstrap/i686-linux/tar \
148 distro/packages/bootstrap/i686-linux/xz
149
ac5aa288
LC
150# Big bootstrap binaries are not included in the tarball. Instead, they
151# are downloaded.
152nodist_bootstrap_x86_64_linux_DATA = \
153 distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz
d25468bc
LC
154nodist_bootstrap_i686_linux_DATA = \
155 distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz
ac5aa288 156
5992f213
LC
157# Those files must remain executable, so they remain executable once
158# imported into the store.
159install-data-hook:
160 chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
161
d25468bc
LC
162DISTCLEANFILES = \
163 $(nodist_bootstrap_x86_64_linux_DATA) \
164 $(nodist_bootstrap_i686_linux_DATA)
ac5aa288
LC
165
166# Method to download a file from an external source.
167DOWNLOAD_FILE = \
168 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
671d8f5e 169 $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \
ac5aa288
LC
170 "$(top_srcdir)/build-aux/download.scm"
171
74fe2df2 172distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz:
735bb2af 173 $(MKDIR_P) `dirname "$@"`
ac5aa288 174 $(DOWNLOAD_FILE) "$@" "0467a82cbe4136f60a79eb4176011bf88cf28ea19c9ad9defa365811ff8e11cf"
74fe2df2 175distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz:
735bb2af 176 $(MKDIR_P) `dirname "$@"`
d25468bc 177 $(DOWNLOAD_FILE) "$@" "93b537766dfab3ad287143523751e3ec02dd32d3ccaf88ad2d31c63158f342ee"
ac5aa288 178
00e219d1 179nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
af51c820
LC
180
181TESTS = \
ddc29a78 182 tests/base32.scm \
af51c820
LC
183 tests/builders.scm \
184 tests/derivations.scm \
e3ce5d70 185 tests/utils.scm \
b0e0d0e9 186 tests/build-utils.scm \
c8c88afa 187 tests/packages.scm \
10226c05 188 tests/snix.scm \
3259877d 189 tests/store.scm \
97298ffa 190 tests/union.scm \
0afdc485 191 tests/guix-build.sh \
37d19403 192 tests/guix-download.sh \
fe8ff028 193 tests/guix-gc.sh \
0afdc485 194 tests/guix-package.sh
af51c820 195
97298ffa
LC
196TEST_EXTENSIONS = .scm .sh
197
352ec143
LC
198AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
199
69cfce50 200SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
97298ffa
LC
201AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
202
69cfce50 203SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
97298ffa 204AM_SH_LOG_FLAGS = -x -e
af51c820 205
ed795c06 206EXTRA_DIST = \
450ccdc3 207 HACKING \
b6dd891c 208 ROADMAP \
6b8875c8 209 TODO \
1722d680 210 .dir-locals.el \
8c0e5b1e 211 hydra.scm \
ac5aa288 212 build-aux/download.scm \
ed795c06
LC
213 srfi/srfi-64.scm \
214 srfi/srfi-64.upstream.scm \
d95c0113 215 tests/test.drv \
ed795c06 216 build-aux/config.rpath \
b49ffe2d 217 bootstrap \
ed795c06
LC
218 release.nix \
219 $(TESTS)
d7672884 220
af51c820
LC
221CLEANFILES = $(GOBJECTS) *.log
222
223.scm.go:
224 $(MKDIR_P) `dirname "$@"`
671d8f5e
LC
225 $(top_builddir)/pre-inst-env \
226 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
227 -Wformat -Wunbound-variable -Warity-mismatch \
228 --target="$(host)" \
af51c820
LC
229 -o "$@" "$<"
230
231SUFFIXES = .go
232
233# Make sure source files are installed first, so that the mtime of
234# installed compiled files is greater than that of installed source
235# files. See
236# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
237# for details.
238guix_install_go_files = install-nobase_nodist_guilemoduleDATA
239$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
f68b0893
LC
240
241SUBDIRS = po
242
568717fd
LC
243info_TEXINFOS = doc/guix.texi
244EXTRA_DIST += doc/fdl-1.3.texi
245
c2033df4
LC
246if BUILD_DAEMON
247
248include daemon.am
249
250endif BUILD_DAEMON
251
f68b0893 252ACLOCAL_AMFLAGS = -I m4
e76bdf8b 253AM_DISTCHECK_CONFIGURE_FLAGS = \
d388c2c4 254 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
aca54b39
LC
255 --with-nix-prefix="$(NIX_PREFIX)" \
256 --enable-daemon