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