pk-crypto: Add a few sexp utility procedures.
[jackhill/guix/guix.git] / Makefile.am
CommitLineData
233e7676
LC
1# GNU Guix --- Functional package management for GNU
2# Copyright © 2012, 2013 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 \
c0cd1b3e 31 guix/records.scm \
72626a71 32 guix/hash.scm \
3476ded9 33 guix/pk-crypto.scm \
73fbb904 34 guix/utils.scm \
de1355f1 35 guix/download.scm \
b860f382 36 guix/monads.scm \
cc4ecc2d 37 guix/profiles.scm \
0f41c26f
LC
38 guix/serialization.scm \
39 guix/nar.scm \
af51c820 40 guix/derivations.scm \
22189ed1 41 guix/gnu-maintenance.scm \
838d78e3 42 guix/licenses.scm \
208f7cd1 43 guix/build-system.scm \
c6bded8a 44 guix/build-system/cmake.scm \
208f7cd1 45 guix/build-system/gnu.scm \
08fd1ebe 46 guix/build-system/perl.scm \
40506d5d 47 guix/build-system/python.scm \
be13fbfa 48 guix/build-system/trivial.scm \
457dd86d 49 guix/ftp-client.scm \
3b8258c5 50 guix/http-client.scm \
0fdd3bea 51 guix/gnupg.scm \
af51c820 52 guix/store.scm \
073c34d7 53 guix/ui.scm \
62cab99c 54 guix/build/download.scm \
c6bded8a 55 guix/build/cmake-build-system.scm \
af949e8e 56 guix/build/gnome.scm \
af51c820 57 guix/build/gnu-build-system.scm \
fe12c345 58 guix/build/gnu-dist.scm \
88840f02 59 guix/build/linux-initrd.scm \
08fd1ebe 60 guix/build/perl-build-system.scm \
40506d5d 61 guix/build/python-build-system.scm \
1273d44a 62 guix/build/utils.scm \
c8c88afa 63 guix/build/union.scm \
3dbeecd2 64 guix/build/pull.scm \
3309e3a1 65 guix/build/rpath.scm \
e3ce5d70 66 guix/packages.scm \
10226c05 67 guix/snix.scm \
de1355f1
LC
68 guix/scripts/download.scm \
69 guix/scripts/build.scm \
70 guix/scripts/import.scm \
71 guix/scripts/package.scm \
72 guix/scripts/gc.scm \
73 guix/scripts/hash.scm \
74 guix/scripts/pull.scm \
75 guix/scripts/substitute-binary.scm \
76 guix/scripts/refresh.scm \
e3ce5d70 77 guix.scm \
d516736c 78 $(GNU_SYSTEM_MODULES)
af51c820 79
855a8ad7
LC
80# Because of the autoload hack in (guix build download), we must build it
81# first to avoid errors on systems where (gnutls) is unavailable.
82guix/scripts/download.go: guix/build/download.go
de1355f1 83guix/download.go: guix/build/download.go
c44899a2 84
1959fb04 85
00e219d1 86GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
af51c820 87
800cdeef 88nobase_dist_guilemodule_DATA = $(MODULES)
1959fb04 89nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
800cdeef 90
1959fb04
LC
91# Do we need to provide our own non-broken (srfi srfi-37) module?
92if INSTALL_SRFI_37
93
94nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
95GOBJECTS += srfi/srfi-37.go
96
97srfi/srfi-37.scm: srfi/srfi-37.scm.in
98 $(MKDIR_P) srfi
99 cp "$<" "$@"
100
101endif INSTALL_SRFI_37
ac5aa288 102
70a9c720
LC
103# Handy way to remove the .go files without removing all the rest.
104clean-go:
105 -$(RM) -f $(GOBJECTS)
106
af51c820 107
30dd8310 108SCM_TESTS = \
ddc29a78 109 tests/base32.scm \
69927e78 110 tests/hash.scm \
3476ded9 111 tests/pk-crypto.scm \
af51c820
LC
112 tests/builders.scm \
113 tests/derivations.scm \
299112d3 114 tests/ui.scm \
c0cd1b3e 115 tests/records.scm \
e3ce5d70 116 tests/utils.scm \
b0e0d0e9 117 tests/build-utils.scm \
c8c88afa 118 tests/packages.scm \
10226c05 119 tests/snix.scm \
3259877d 120 tests/store.scm \
b860f382 121 tests/monads.scm \
53c63ee9 122 tests/nar.scm \
a2078770
LC
123 tests/union.scm \
124 tests/profiles.scm
30dd8310
LC
125
126SH_TESTS = \
0afdc485 127 tests/guix-build.sh \
37d19403 128 tests/guix-download.sh \
fe8ff028 129 tests/guix-gc.sh \
ccbce848 130 tests/guix-hash.sh \
0afdc485 131 tests/guix-package.sh
af51c820 132
a7a4e6a4
LC
133if BUILD_DAEMON
134
135SH_TESTS += tests/guix-register.sh
136
137endif BUILD_DAEMON
138
139
30dd8310
LC
140TESTS = $(SCM_TESTS) $(SH_TESTS)
141
97298ffa
LC
142TEST_EXTENSIONS = .scm .sh
143
352ec143
LC
144AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
145
69cfce50 146SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
97298ffa
LC
147AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
148
69cfce50 149SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
97298ffa 150AM_SH_LOG_FLAGS = -x -e
af51c820 151
3a33730a
LC
152# Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
153# could end up removing files from the store while they are being used by
154# other instances of the daemon.
155tests/guix-gc.log: \
156 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
157 $(SCM_TESTS:%.scm=%.log)
158
159
ed795c06 160EXTRA_DIST = \
450ccdc3 161 HACKING \
b6dd891c 162 ROADMAP \
6b8875c8 163 TODO \
1722d680 164 .dir-locals.el \
f3211ef3 165 build-aux/hydra/gnu-system.scm \
59e6ae6c 166 build-aux/hydra/guix.scm \
56fbf262 167 build-aux/check-available-binaries.scm \
ac5aa288 168 build-aux/download.scm \
b592f711 169 build-aux/list-packages.scm \
668d48a6 170 build-aux/sync-descriptions.scm \
1959fb04 171 srfi/srfi-37.scm.in \
ed795c06
LC
172 srfi/srfi-64.scm \
173 srfi/srfi-64.upstream.scm \
d95c0113 174 tests/test.drv \
ed795c06 175 build-aux/config.rpath \
b49ffe2d 176 bootstrap \
ed795c06
LC
177 release.nix \
178 $(TESTS)
d7672884 179
30dd8310
LC
180CLEANFILES = \
181 $(GOBJECTS) \
9bff16b3 182 $(SCM_TESTS:tests/%.scm=%.log)
af51c820 183
dab5d51b
LC
184AM_V_GUILEC = $(AM_V_GUILEC_$(V))
185AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
186AM_V_GUILEC_0 = @echo " GUILEC" $@;
187
a69b7ad2
LC
188# XXX: Use the C locale for when Guile lacks
189# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
af51c820 190.scm.go:
dab5d51b 191 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
a69b7ad2 192 LC_ALL=C \
671d8f5e
LC
193 $(top_builddir)/pre-inst-env \
194 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
195 -Wformat -Wunbound-variable -Warity-mismatch \
196 --target="$(host)" \
af51c820
LC
197 -o "$@" "$<"
198
199SUFFIXES = .go
200
201# Make sure source files are installed first, so that the mtime of
202# installed compiled files is greater than that of installed source
203# files. See
204# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
205# for details.
206guix_install_go_files = install-nobase_nodist_guilemoduleDATA
207$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
f68b0893 208
a9424c08
LC
209SUBDIRS = po
210
211include doc.am
568717fd 212
c2033df4
LC
213if BUILD_DAEMON
214
215include daemon.am
216
217endif BUILD_DAEMON
218
f68b0893 219ACLOCAL_AMFLAGS = -I m4
e76bdf8b 220AM_DISTCHECK_CONFIGURE_FLAGS = \
d388c2c4 221 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
aca54b39
LC
222 --with-nix-prefix="$(NIX_PREFIX)" \
223 --enable-daemon
0e993428 224
668d48a6 225dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
56fbf262 226distcheck-hook: assert-binaries-available
e793178a 227
668d48a6 228sync-descriptions:
0e993428 229 -$(top_builddir)/pre-inst-env $(GUILE) \
668d48a6 230 $(top_srcdir)/build-aux/sync-descriptions.scm
e793178a
LC
231
232gen-ChangeLog:
233 if test -d .git; then \
234 $(top_srcdir)/build-aux/gitlog-to-changelog \
235 > $(distdir)/cl-t; \
236 rm -f $(distdir)/ChangeLog; \
237 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
238 fi
239
a463ffd9
LC
240# Make sure we're not shipping a file that embeds a local /nix/store file name.
241assert-no-store-file-names:
242 if grep -r --exclude=*.texi --exclude=*.info \
243 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
244 then \
245 echo "error: store file names embedded in the distribution" >&2 ; \
246 exit 1 ; \
247 fi
248
56fbf262
LC
249# Make sure hydra.gnu.org has the important binaries.
250assert-binaries-available:
251 $(top_builddir)/pre-inst-env "$(GUILE)" \
252 "$(top_srcdir)/build-aux/check-available-binaries.scm"
253
70a9c720 254.PHONY: sync-descriptions gen-ChangeLog clean-go
56fbf262 255.PHONY: assert-no-store-file-names assert-binaries-available