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