8686d2bd2104ce02db22de7c3f66250fe2b736d9
[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 #
4 # This file is part of GNU Guix.
5 #
6 # GNU 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 # GNU 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 GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 bin_SCRIPTS = \
20 guix-build \
21 guix-download \
22 guix-import \
23 guix-package \
24 guix-gc
25
26 MODULES = \
27 guix/base32.scm \
28 guix/utils.scm \
29 guix/derivations.scm \
30 guix/download.scm \
31 guix/gnu-maintenance.scm \
32 guix/licenses.scm \
33 guix/build-system.scm \
34 guix/build-system/gnu.scm \
35 guix/build-system/trivial.scm \
36 guix/ftp-client.scm \
37 guix/store.scm \
38 guix/ui.scm \
39 guix/build/download.scm \
40 guix/build/gnu-build-system.scm \
41 guix/build/utils.scm \
42 guix/build/union.scm \
43 guix/packages.scm \
44 guix/snix.scm \
45 guix.scm \
46 distro.scm \
47 distro/packages/acl.scm \
48 distro/packages/algebra.scm \
49 distro/packages/aspell.scm \
50 distro/packages/attr.scm \
51 distro/packages/autotools.scm \
52 distro/packages/base.scm \
53 distro/packages/bash.scm \
54 distro/packages/bdb.scm \
55 distro/packages/bdw-gc.scm \
56 distro/packages/bison.scm \
57 distro/packages/bootstrap.scm \
58 distro/packages/check.scm \
59 distro/packages/compression.scm \
60 distro/packages/cpio.scm \
61 distro/packages/cyrus-sasl.scm \
62 distro/packages/dejagnu.scm \
63 distro/packages/ddrescue.scm \
64 distro/packages/ed.scm \
65 distro/packages/emacs.scm \
66 distro/packages/flex.scm \
67 distro/packages/gawk.scm \
68 distro/packages/gdb.scm \
69 distro/packages/gdbm.scm \
70 distro/packages/gettext.scm \
71 distro/packages/global.scm \
72 distro/packages/gnupg.scm \
73 distro/packages/gnutls.scm \
74 distro/packages/gperf.scm \
75 distro/packages/gsasl.scm \
76 distro/packages/guile.scm \
77 distro/packages/help2man.scm \
78 distro/packages/idutils.scm \
79 distro/packages/ld-wrapper.scm \
80 distro/packages/less.scm \
81 distro/packages/libffi.scm \
82 distro/packages/libidn.scm \
83 distro/packages/libsigsegv.scm \
84 distro/packages/libunistring.scm \
85 distro/packages/libusb.scm \
86 distro/packages/linux.scm \
87 distro/packages/lout.scm \
88 distro/packages/lsh.scm \
89 distro/packages/m4.scm \
90 distro/packages/mailutils.scm \
91 distro/packages/make-bootstrap.scm \
92 distro/packages/mit-krb5.scm \
93 distro/packages/multiprecision.scm \
94 distro/packages/mysql.scm \
95 distro/packages/nano.scm \
96 distro/packages/ncurses.scm \
97 distro/packages/nettle.scm \
98 distro/packages/openssl.scm \
99 distro/packages/perl.scm \
100 distro/packages/pkg-config.scm \
101 distro/packages/pth.scm \
102 distro/packages/readline.scm \
103 distro/packages/recutils.scm \
104 distro/packages/rsync.scm \
105 distro/packages/scheme.scm \
106 distro/packages/shishi.scm \
107 distro/packages/system.scm \
108 distro/packages/tcl.scm \
109 distro/packages/texinfo.scm \
110 distro/packages/time.scm \
111 distro/packages/wget.scm \
112 distro/packages/which.scm \
113 distro/packages/zile.scm
114
115
116 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
117
118 nobase_dist_guilemodule_DATA = $(MODULES)
119
120 patchdir = $(guilemoduledir)/distro/packages/patches
121 dist_patch_DATA = \
122 distro/packages/patches/bigloo-gc-shebangs.patch \
123 distro/packages/patches/binutils-ld-new-dtags.patch \
124 distro/packages/patches/cpio-gets-undeclared.patch \
125 distro/packages/patches/diffutils-gets-undeclared.patch \
126 distro/packages/patches/emacs-configure-sh.patch \
127 distro/packages/patches/flex-bison-tests.patch \
128 distro/packages/patches/gawk-shell.patch \
129 distro/packages/patches/gettext-gets-undeclared.patch \
130 distro/packages/patches/glibc-bootstrap-system.patch \
131 distro/packages/patches/glibc-no-ld-so-cache.patch \
132 distro/packages/patches/guile-1.8-cpp-4.5.patch \
133 distro/packages/patches/guile-default-utf8.patch \
134 distro/packages/patches/guile-relocatable.patch \
135 distro/packages/patches/libtool-skip-tests.patch \
136 distro/packages/patches/lsh-guile-compat.patch \
137 distro/packages/patches/lsh-no-root-login.patch \
138 distro/packages/patches/lsh-pam-service-name.patch \
139 distro/packages/patches/m4-gets-undeclared.patch \
140 distro/packages/patches/m4-readlink-EINVAL.patch \
141 distro/packages/patches/m4-s_isdir.patch \
142 distro/packages/patches/make-impure-dirs.patch \
143 distro/packages/patches/findutils-absolute-paths.patch \
144 distro/packages/patches/perl-no-sys-dirs.patch \
145 distro/packages/patches/procps-make-3.82.patch \
146 distro/packages/patches/readline-link-ncurses.patch \
147 distro/packages/patches/shishi-gets-undeclared.patch \
148 distro/packages/patches/tar-gets-undeclared.patch
149
150 bootstrapdir = $(guilemoduledir)/distro/packages/bootstrap
151 bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
152 bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
153
154 dist_bootstrap_x86_64_linux_DATA = \
155 distro/packages/bootstrap/x86_64-linux/bash \
156 distro/packages/bootstrap/x86_64-linux/mkdir \
157 distro/packages/bootstrap/x86_64-linux/tar \
158 distro/packages/bootstrap/x86_64-linux/xz
159
160 dist_bootstrap_i686_linux_DATA = \
161 distro/packages/bootstrap/i686-linux/bash \
162 distro/packages/bootstrap/i686-linux/mkdir \
163 distro/packages/bootstrap/i686-linux/tar \
164 distro/packages/bootstrap/i686-linux/xz
165
166 # Big bootstrap binaries are not included in the tarball. Instead, they
167 # are downloaded.
168 nodist_bootstrap_x86_64_linux_DATA = \
169 distro/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz
170 nodist_bootstrap_i686_linux_DATA = \
171 distro/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz
172
173 # Those files must remain executable, so they remain executable once
174 # imported into the store.
175 install-data-hook:
176 chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
177
178 DISTCLEANFILES = \
179 $(nodist_bootstrap_x86_64_linux_DATA) \
180 $(nodist_bootstrap_i686_linux_DATA)
181
182 # Method to download a file from an external source.
183 DOWNLOAD_FILE = \
184 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
185 $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \
186 "$(top_srcdir)/build-aux/download.scm"
187
188 distro/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz:
189 $(MKDIR_P) `dirname "$@"`
190 $(DOWNLOAD_FILE) "$@" "bc43210dcd146d242bef4d354b0aeac12c4ef3118c07502d17ffa8d49e15aa2c"
191 distro/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz:
192 $(MKDIR_P) `dirname "$@"`
193 $(DOWNLOAD_FILE) "$@" "f9a7c6f4c556eaafa2a69bcf07d4ffbb6682ea831d4c9da9ba095aca3ccd217c"
194
195 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
196
197 TESTS = \
198 tests/base32.scm \
199 tests/builders.scm \
200 tests/derivations.scm \
201 tests/utils.scm \
202 tests/build-utils.scm \
203 tests/packages.scm \
204 tests/snix.scm \
205 tests/store.scm \
206 tests/union.scm \
207 tests/guix-build.sh \
208 tests/guix-download.sh \
209 tests/guix-gc.sh \
210 tests/guix-package.sh
211
212 TEST_EXTENSIONS = .scm .sh
213
214 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
215
216 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
217 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
218
219 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
220 AM_SH_LOG_FLAGS = -x -e
221
222 EXTRA_DIST = \
223 HACKING \
224 ROADMAP \
225 TODO \
226 .dir-locals.el \
227 hydra.scm \
228 build-aux/download.scm \
229 srfi/srfi-64.scm \
230 srfi/srfi-64.upstream.scm \
231 tests/test.drv \
232 build-aux/config.rpath \
233 bootstrap \
234 release.nix \
235 $(TESTS)
236
237 CLEANFILES = $(GOBJECTS) *.log
238
239 .scm.go:
240 $(MKDIR_P) `dirname "$@"`
241 $(top_builddir)/pre-inst-env \
242 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
243 -Wformat -Wunbound-variable -Warity-mismatch \
244 --target="$(host)" \
245 -o "$@" "$<"
246
247 SUFFIXES = .go
248
249 # Make sure source files are installed first, so that the mtime of
250 # installed compiled files is greater than that of installed source
251 # files. See
252 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
253 # for details.
254 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
255 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
256
257 SUBDIRS = po
258
259 info_TEXINFOS = doc/guix.texi
260 EXTRA_DIST += doc/fdl-1.3.texi
261
262 if BUILD_DAEMON
263
264 include daemon.am
265
266 endif BUILD_DAEMON
267
268 ACLOCAL_AMFLAGS = -I m4
269 AM_DISTCHECK_CONFIGURE_FLAGS = \
270 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
271 --with-nix-prefix="$(NIX_PREFIX)" \
272 --enable-daemon