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