gnu-maintenance: Introduce <gnu-release> data type.
[jackhill/guix/guix.git] / Makefile.am
CommitLineData
233e7676 1# GNU Guix --- Functional package management for GNU
49e6291a 2# Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
f2499672 3# Copyright © 2013 Andreas Enge <andreas@enge.fr>
af51c820 4#
233e7676 5# This file is part of GNU Guix.
af51c820 6#
233e7676 7# GNU Guix is free software; you can redistribute it and/or modify it
af51c820
LC
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#
233e7676 12# GNU Guix is distributed in the hope that it will be useful, but
af51c820
LC
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
233e7676 18# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
af51c820 19
c52a5bf0 20bin_SCRIPTS = \
e49951eb 21 scripts/guix
14a1c319 22
58867ae7
MW
23nodist_noinst_SCRIPTS = \
24 pre-inst-env \
25 test-env
26
d516736c
LC
27include gnu-system.am
28
af51c820 29MODULES = \
ddc29a78 30 guix/base32.scm \
e9c6c584 31 guix/base64.scm \
c0cd1b3e 32 guix/records.scm \
72626a71 33 guix/hash.scm \
3476ded9 34 guix/pk-crypto.scm \
8b420f74 35 guix/pki.scm \
73fbb904 36 guix/utils.scm \
de1355f1 37 guix/download.scm \
9b5b5c17 38 guix/git-download.scm \
b860f382 39 guix/monads.scm \
b9b86078 40 guix/monad-repl.scm \
21b679f6 41 guix/gexp.scm \
cc4ecc2d 42 guix/profiles.scm \
0f41c26f
LC
43 guix/serialization.scm \
44 guix/nar.scm \
af51c820 45 guix/derivations.scm \
22189ed1 46 guix/gnu-maintenance.scm \
838d78e3 47 guix/licenses.scm \
208f7cd1 48 guix/build-system.scm \
c6bded8a 49 guix/build-system/cmake.scm \
be3425e5 50 guix/build-system/glib-or-gtk.scm \
208f7cd1 51 guix/build-system/gnu.scm \
08fd1ebe 52 guix/build-system/perl.scm \
40506d5d 53 guix/build-system/python.scm \
c08f9818 54 guix/build-system/ruby.scm \
be13fbfa 55 guix/build-system/trivial.scm \
457dd86d 56 guix/ftp-client.scm \
3b8258c5 57 guix/http-client.scm \
0fdd3bea 58 guix/gnupg.scm \
af51c820 59 guix/store.scm \
b3acf365 60 guix/svn-download.scm \
073c34d7 61 guix/ui.scm \
62cab99c 62 guix/build/download.scm \
c6bded8a 63 guix/build/cmake-build-system.scm \
9b5b5c17 64 guix/build/git.scm \
be3425e5 65 guix/build/glib-or-gtk-build-system.scm \
af51c820 66 guix/build/gnu-build-system.scm \
fe12c345 67 guix/build/gnu-dist.scm \
08fd1ebe 68 guix/build/perl-build-system.scm \
40506d5d 69 guix/build/python-build-system.scm \
c08f9818 70 guix/build/ruby-build-system.scm \
6fd1a796 71 guix/build/store-copy.scm \
1273d44a 72 guix/build/utils.scm \
c8c88afa 73 guix/build/union.scm \
3dbeecd2 74 guix/build/pull.scm \
3309e3a1 75 guix/build/rpath.scm \
b3acf365 76 guix/build/svn.scm \
29fa45f4 77 guix/build/syscalls.scm \
75f3b1a1 78 guix/build/emacs-utils.scm \
fb59e275 79 guix/build/graft.scm \
e3ce5d70 80 guix/packages.scm \
1b3e9685
DT
81 guix/import/utils.scm \
82 guix/import/snix.scm \
de1355f1
LC
83 guix/scripts/download.scm \
84 guix/scripts/build.scm \
760c60d6 85 guix/scripts/archive.scm \
de1355f1
LC
86 guix/scripts/import.scm \
87 guix/scripts/package.scm \
88 guix/scripts/gc.scm \
89 guix/scripts/hash.scm \
90 guix/scripts/pull.scm \
91 guix/scripts/substitute-binary.scm \
526382ff 92 guix/scripts/authenticate.scm \
de1355f1 93 guix/scripts/refresh.scm \
523e4896 94 guix/scripts/system.scm \
b4f5e0e8 95 guix/scripts/lint.scm \
1b3e9685 96 guix/scripts/import/nix.scm \
372c4bbc 97 guix/scripts/environment.scm \
e3ce5d70 98 guix.scm \
d516736c 99 $(GNU_SYSTEM_MODULES)
af51c820 100
49e6291a
LC
101if BUILD_DAEMON_OFFLOAD
102
103MODULES += \
104 guix/scripts/offload.scm
105
106endif BUILD_DAEMON_OFFLOAD
107
c1bc358f
LC
108# Internal module with test suite support.
109noinst_DATA = guix/tests.scm
110
855a8ad7
LC
111# Because of the autoload hack in (guix build download), we must build it
112# first to avoid errors on systems where (gnutls) is unavailable.
113guix/scripts/download.go: guix/build/download.go
de1355f1 114guix/download.go: guix/build/download.go
c44899a2 115
a94546ec
LC
116# Linux-Libre configurations.
117KCONFIGS = \
118 gnu/packages/linux-libre-i686.conf \
119 gnu/packages/linux-libre-x86_64.conf
1959fb04 120
ebc32b31
LC
121# Templates, examples.
122EXAMPLES = \
123 gnu/system/os-config.tmpl
124
c1bc358f 125GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
af51c820 126
ebc32b31 127nobase_dist_guilemodule_DATA = $(MODULES) $(KCONFIGS) $(EXAMPLES)
1959fb04 128nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
800cdeef 129
1959fb04
LC
130# Do we need to provide our own non-broken (srfi srfi-37) module?
131if INSTALL_SRFI_37
132
133nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
134GOBJECTS += srfi/srfi-37.go
135
136srfi/srfi-37.scm: srfi/srfi-37.scm.in
137 $(MKDIR_P) srfi
138 cp "$<" "$@"
139
140endif INSTALL_SRFI_37
ac5aa288 141
70a9c720
LC
142# Handy way to remove the .go files without removing all the rest.
143clean-go:
144 -$(RM) -f $(GOBJECTS)
145
af51c820 146
30dd8310 147SCM_TESTS = \
ddc29a78 148 tests/base32.scm \
e9c6c584 149 tests/base64.scm \
69927e78 150 tests/hash.scm \
3476ded9 151 tests/pk-crypto.scm \
8b420f74 152 tests/pki.scm \
e9c6c584 153 tests/substitute-binary.scm \
af51c820
LC
154 tests/builders.scm \
155 tests/derivations.scm \
299112d3 156 tests/ui.scm \
c0cd1b3e 157 tests/records.scm \
e3ce5d70 158 tests/utils.scm \
b0e0d0e9 159 tests/build-utils.scm \
c8c88afa 160 tests/packages.scm \
10226c05 161 tests/snix.scm \
3259877d 162 tests/store.scm \
b860f382 163 tests/monads.scm \
21b679f6 164 tests/gexp.scm \
53c63ee9 165 tests/nar.scm \
a2078770 166 tests/union.scm \
29fa45f4 167 tests/profiles.scm \
b4f5e0e8
CR
168 tests/syscalls.scm \
169 tests/lint.scm
30dd8310 170
1b3e9685
DT
171if HAVE_GUILE_JSON
172
85054932
AK
173MODULES += \
174 guix/import/pypi.scm \
175 guix/scripts/import/pypi.scm
176
1b3e9685
DT
177SCM_TESTS += tests/pypi.scm
178
179endif
180
30dd8310 181SH_TESTS = \
0afdc485 182 tests/guix-build.sh \
37d19403 183 tests/guix-download.sh \
fe8ff028 184 tests/guix-gc.sh \
ccbce848 185 tests/guix-hash.sh \
0820098d 186 tests/guix-package.sh \
c1202fb1 187 tests/guix-system.sh \
760c60d6 188 tests/guix-archive.sh \
dd7c013d
CR
189 tests/guix-authenticate.sh \
190 tests/guix-lint.sh
af51c820 191
a7a4e6a4
LC
192if BUILD_DAEMON
193
194SH_TESTS += tests/guix-register.sh
195
196endif BUILD_DAEMON
197
198
30dd8310
LC
199TESTS = $(SCM_TESTS) $(SH_TESTS)
200
97298ffa
LC
201TEST_EXTENSIONS = .scm .sh
202
352ec143
LC
203AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
204
69cfce50 205SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
97298ffa
LC
206AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
207
69cfce50 208SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
97298ffa 209AM_SH_LOG_FLAGS = -x -e
af51c820 210
3a33730a
LC
211# Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
212# could end up removing files from the store while they are being used by
213# other instances of the daemon.
214tests/guix-gc.log: \
215 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
216 $(SCM_TESTS:%.scm=%.log)
217
bf59c06d 218# Public key used to sign substitutes from hydra.gnu.org.
6c110833 219dist_pkgdata_DATA = hydra.gnu.org.pub
3a33730a 220
81f61c17
LC
221EXTRA_DIST = \
222 HACKING \
223 ROADMAP \
224 TODO \
225 .dir-locals.el \
f81ac34d 226 build-aux/build-self.scm \
81f61c17
LC
227 build-aux/hydra/gnu-system.scm \
228 build-aux/hydra/demo-os.scm \
229 build-aux/hydra/guix.scm \
230 build-aux/check-available-binaries.scm \
231 build-aux/check-final-inputs-self-contained.scm \
232 build-aux/download.scm \
233 build-aux/list-packages.scm \
234 build-aux/sync-descriptions.scm \
235 srfi/srfi-37.scm.in \
236 srfi/srfi-64.scm \
237 srfi/srfi-64.upstream.scm \
238 tests/test.drv \
239 tests/signing-key.pub \
240 tests/signing-key.sec \
241 build-aux/config.rpath \
242 bootstrap \
243 release.nix \
ed795c06 244 $(TESTS)
d7672884 245
49e6291a
LC
246if !BUILD_DAEMON_OFFLOAD
247
248EXTRA_DIST += \
249 guix/scripts/offload.scm
250
251endif !BUILD_DAEMON_OFFLOAD
252
253
30dd8310
LC
254CLEANFILES = \
255 $(GOBJECTS) \
9bff16b3 256 $(SCM_TESTS:tests/%.scm=%.log)
af51c820 257
dab5d51b
LC
258AM_V_GUILEC = $(AM_V_GUILEC_$(V))
259AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
260AM_V_GUILEC_0 = @echo " GUILEC" $@;
261
a69b7ad2
LC
262# XXX: Use the C locale for when Guile lacks
263# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
af51c820 264.scm.go:
dab5d51b 265 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
a69b7ad2 266 LC_ALL=C \
671d8f5e
LC
267 $(top_builddir)/pre-inst-env \
268 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
269 -Wformat -Wunbound-variable -Warity-mismatch \
270 --target="$(host)" \
af51c820
LC
271 -o "$@" "$<"
272
273SUFFIXES = .go
274
275# Make sure source files are installed first, so that the mtime of
276# installed compiled files is greater than that of installed source
277# files. See
278# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
279# for details.
280guix_install_go_files = install-nobase_nodist_guilemoduleDATA
281$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
f68b0893 282
ee764179 283SUBDIRS = po/guix po/packages
931c132a 284BUILT_SOURCES =
a9424c08
LC
285
286include doc.am
568717fd 287
c2033df4
LC
288if BUILD_DAEMON
289
290include daemon.am
291
292endif BUILD_DAEMON
293
f68b0893 294ACLOCAL_AMFLAGS = -I m4
e76bdf8b 295AM_DISTCHECK_CONFIGURE_FLAGS = \
d388c2c4 296 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
14af289e 297 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
aca54b39
LC
298 --with-nix-prefix="$(NIX_PREFIX)" \
299 --enable-daemon
0e993428 300
457f60fa
AK
301dist_emacsui_DATA = emacs/guix-main.scm
302nodist_emacsui_DATA = emacs/guix-helper.scm
303include emacs.am
304
668d48a6 305dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
81f61c17 306distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
e793178a 307
668d48a6 308sync-descriptions:
0e993428 309 -$(top_builddir)/pre-inst-env $(GUILE) \
668d48a6 310 $(top_srcdir)/build-aux/sync-descriptions.scm
e793178a
LC
311
312gen-ChangeLog:
313 if test -d .git; then \
314 $(top_srcdir)/build-aux/gitlog-to-changelog \
315 > $(distdir)/cl-t; \
316 rm -f $(distdir)/ChangeLog; \
317 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
318 fi
319
834129e0 320# Make sure we're not shipping a file that embeds a local /gnu/store file name.
a463ffd9
LC
321assert-no-store-file-names:
322 if grep -r --exclude=*.texi --exclude=*.info \
323 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
324 then \
325 echo "error: store file names embedded in the distribution" >&2 ; \
326 exit 1 ; \
327 fi
328
56fbf262
LC
329# Make sure hydra.gnu.org has the important binaries.
330assert-binaries-available:
331 $(top_builddir)/pre-inst-env "$(GUILE)" \
332 "$(top_srcdir)/build-aux/check-available-binaries.scm"
333
81f61c17
LC
334# Make sure the final inputs don't refer to bootstrap tools.
335assert-final-inputs-self-contained:
336 $(top_builddir)/pre-inst-env "$(GUILE)" \
337 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
338
70a9c720 339.PHONY: sync-descriptions gen-ChangeLog clean-go
56fbf262 340.PHONY: assert-no-store-file-names assert-binaries-available
81f61c17 341.PHONY: assert-final-inputs-self-contained