distro: Add GNU Time.
[jackhill/guix/guix.git] / Makefile.am
CommitLineData
af51c820
LC
1# Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
2# Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
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 \
0afdc485 23 guix-package
14a1c319 24
af51c820 25MODULES = \
ddc29a78 26 guix/base32.scm \
73fbb904 27 guix/utils.scm \
af51c820 28 guix/derivations.scm \
62cab99c 29 guix/download.scm \
208f7cd1
LC
30 guix/build-system.scm \
31 guix/build-system/gnu.scm \
be13fbfa 32 guix/build-system/trivial.scm \
457dd86d 33 guix/ftp-client.scm \
af51c820 34 guix/store.scm \
073c34d7 35 guix/ui.scm \
62cab99c 36 guix/build/download.scm \
af51c820 37 guix/build/gnu-build-system.scm \
1273d44a 38 guix/build/utils.scm \
c8c88afa 39 guix/build/union.scm \
e3ce5d70 40 guix/packages.scm \
10226c05 41 guix/snix.scm \
e3ce5d70 42 guix.scm \
6b1891b0 43 distro.scm \
80ffc708 44 distro/packages/autotools.scm \
1f455fdc 45 distro/packages/base.scm \
c44899a2
LC
46 distro/packages/bash.scm \
47 distro/packages/bdw-gc.scm \
cf153fc4 48 distro/packages/bison.scm \
18633d4f 49 distro/packages/bootstrap.scm \
a268f085 50 distro/packages/compression.scm \
034cb8e7 51 distro/packages/ddrescue.scm \
0aa94f0c 52 distro/packages/ed.scm \
e2b2c466 53 distro/packages/flex.scm \
c44899a2 54 distro/packages/gawk.scm \
30c40755 55 distro/packages/gdbm.scm \
f190f92f 56 distro/packages/gettext.scm \
8d1939e4 57 distro/packages/gnupg.scm \
7543f865 58 distro/packages/gnutls.scm \
1627f7f7 59 distro/packages/gperf.scm \
1722d680 60 distro/packages/guile.scm \
cc8e5e25 61 distro/packages/help2man.scm \
1722d680 62 distro/packages/ld-wrapper.scm \
fe7777c1 63 distro/packages/less.scm \
c44899a2
LC
64 distro/packages/libffi.scm \
65 distro/packages/libsigsegv.scm \
c44899a2 66 distro/packages/libunistring.scm \
9d9e6450 67 distro/packages/lout.scm \
c44899a2 68 distro/packages/m4.scm \
8ba60d7b 69 distro/packages/make-bootstrap.scm \
c44899a2 70 distro/packages/multiprecision.scm \
7f40d97d 71 distro/packages/nano.scm \
c44899a2 72 distro/packages/ncurses.scm \
2e659827 73 distro/packages/nettle.scm \
c44899a2
LC
74 distro/packages/perl.scm \
75 distro/packages/pkg-config.scm \
d373e57e 76 distro/packages/pth.scm \
c44899a2 77 distro/packages/readline.scm \
db32c281 78 distro/packages/recutils.scm \
5b2fd618 79 distro/packages/shishi.scm \
1df895b0 80 distro/packages/system.scm \
fb9821f0 81 distro/packages/texinfo.scm \
b147f59f 82 distro/packages/time.scm \
da7b042d 83 distro/packages/wget.scm \
6e6979c6 84 distro/packages/which.scm \
fb9821f0 85 distro/packages/zile.scm
af51c820 86
c44899a2 87
00e219d1 88GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
af51c820 89
800cdeef
LC
90nobase_dist_guilemodule_DATA = $(MODULES)
91
0b3651bc 92patchdir = $(guilemoduledir)/distro/packages/patches
bfb3c3d0
LC
93dist_patch_DATA = \
94 distro/packages/patches/binutils-ld-new-dtags.patch \
95 distro/packages/patches/diffutils-gets-undeclared.patch \
e2b2c466 96 distro/packages/patches/flex-bison-tests.patch \
f190f92f 97 distro/packages/patches/gettext-gets-undeclared.patch \
25608d64 98 distro/packages/patches/glibc-no-ld-so-cache.patch \
bfb3c3d0
LC
99 distro/packages/patches/guile-1.8-cpp-4.5.patch \
100 distro/packages/patches/guile-default-utf8.patch \
101 distro/packages/patches/guile-relocatable.patch \
102 distro/packages/patches/libtool-skip-tests.patch \
103 distro/packages/patches/m4-gets-undeclared.patch \
104 distro/packages/patches/m4-readlink-EINVAL.patch \
105 distro/packages/patches/m4-s_isdir.patch \
106 distro/packages/patches/make-impure-dirs.patch \
107 distro/packages/patches/findutils-absolute-paths.patch \
108 distro/packages/patches/perl-no-sys-dirs.patch \
109 distro/packages/patches/readline-link-ncurses.patch \
5b2fd618 110 distro/packages/patches/shishi-gets-undeclared.patch \
bfb3c3d0 111 distro/packages/patches/tar-gets-undeclared.patch
d7672884 112
0b3651bc 113bootstrapdir = $(guilemoduledir)/distro/packages/bootstrap
ac5aa288 114bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
d25468bc 115bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
ac5aa288
LC
116
117dist_bootstrap_x86_64_linux_DATA = \
118 distro/packages/bootstrap/x86_64-linux/bash \
119 distro/packages/bootstrap/x86_64-linux/mkdir \
120 distro/packages/bootstrap/x86_64-linux/tar \
121 distro/packages/bootstrap/x86_64-linux/xz
122
d25468bc
LC
123dist_bootstrap_i686_linux_DATA = \
124 distro/packages/bootstrap/i686-linux/bash \
125 distro/packages/bootstrap/i686-linux/mkdir \
126 distro/packages/bootstrap/i686-linux/tar \
127 distro/packages/bootstrap/i686-linux/xz
128
ac5aa288
LC
129# Big bootstrap binaries are not included in the tarball. Instead, they
130# are downloaded.
131nodist_bootstrap_x86_64_linux_DATA = \
132 distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz
d25468bc
LC
133nodist_bootstrap_i686_linux_DATA = \
134 distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz
ac5aa288 135
5992f213
LC
136# Those files must remain executable, so they remain executable once
137# imported into the store.
138install-data-hook:
139 chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
140
d25468bc
LC
141DISTCLEANFILES = \
142 $(nodist_bootstrap_x86_64_linux_DATA) \
143 $(nodist_bootstrap_i686_linux_DATA)
ac5aa288
LC
144
145# Method to download a file from an external source.
146DOWNLOAD_FILE = \
147 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
671d8f5e 148 $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \
ac5aa288
LC
149 "$(top_srcdir)/build-aux/download.scm"
150
74fe2df2 151distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz:
735bb2af 152 $(MKDIR_P) `dirname "$@"`
ac5aa288 153 $(DOWNLOAD_FILE) "$@" "0467a82cbe4136f60a79eb4176011bf88cf28ea19c9ad9defa365811ff8e11cf"
74fe2df2 154distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz:
735bb2af 155 $(MKDIR_P) `dirname "$@"`
d25468bc 156 $(DOWNLOAD_FILE) "$@" "93b537766dfab3ad287143523751e3ec02dd32d3ccaf88ad2d31c63158f342ee"
ac5aa288 157
00e219d1 158nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
af51c820
LC
159
160TESTS = \
ddc29a78 161 tests/base32.scm \
af51c820
LC
162 tests/builders.scm \
163 tests/derivations.scm \
e3ce5d70 164 tests/utils.scm \
b0e0d0e9 165 tests/build-utils.scm \
c8c88afa 166 tests/packages.scm \
10226c05 167 tests/snix.scm \
97298ffa 168 tests/union.scm \
0afdc485 169 tests/guix-build.sh \
37d19403 170 tests/guix-download.sh \
0afdc485 171 tests/guix-package.sh
af51c820 172
97298ffa
LC
173TEST_EXTENSIONS = .scm .sh
174
352ec143
LC
175AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
176
97298ffa
LC
177SCM_LOG_COMPILER = $(top_builddir)/pre-inst-env $(GUILE)
178AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
179
180SH_LOG_COMPILER = $(top_builddir)/pre-inst-env $(SHELL)
181AM_SH_LOG_FLAGS = -x -e
af51c820 182
ed795c06 183EXTRA_DIST = \
450ccdc3 184 HACKING \
b6dd891c 185 ROADMAP \
6b8875c8 186 TODO \
1722d680 187 .dir-locals.el \
8c0e5b1e 188 hydra.scm \
ac5aa288 189 build-aux/download.scm \
ed795c06
LC
190 srfi/srfi-64.scm \
191 srfi/srfi-64.upstream.scm \
d95c0113 192 tests/test.drv \
ed795c06
LC
193 build-aux/config.rpath \
194 release.nix \
195 $(TESTS)
d7672884 196
af51c820
LC
197CLEANFILES = $(GOBJECTS) *.log
198
199.scm.go:
200 $(MKDIR_P) `dirname "$@"`
671d8f5e
LC
201 $(top_builddir)/pre-inst-env \
202 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
203 -Wformat -Wunbound-variable -Warity-mismatch \
204 --target="$(host)" \
af51c820
LC
205 -o "$@" "$<"
206
207SUFFIXES = .go
208
209# Make sure source files are installed first, so that the mtime of
210# installed compiled files is greater than that of installed source
211# files. See
212# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
213# for details.
214guix_install_go_files = install-nobase_nodist_guilemoduleDATA
215$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
f68b0893
LC
216
217SUBDIRS = po
218
568717fd
LC
219info_TEXINFOS = doc/guix.texi
220EXTRA_DIST += doc/fdl-1.3.texi
221
f68b0893 222ACLOCAL_AMFLAGS = -I m4
e76bdf8b 223AM_DISTCHECK_CONFIGURE_FLAGS = \
d388c2c4 224 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
e76bdf8b 225 --with-nix-prefix="$(NIX_PREFIX)"