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