Commit | Line | Data |
---|---|---|
233e7676 | 1 | # GNU Guix --- Functional package management for GNU |
f9704f17 | 2 | # Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> |
f2499672 | 3 | # Copyright © 2013 Andreas Enge <andreas@enge.fr> |
7994250f | 4 | # Copyright © 2015, 2017 Alex Kost <alezost@gmail.com> |
8c3d8894 | 5 | # Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> |
52d901da | 6 | # Copyright © 2016, 2017 Mark H Weaver <mhw@netris.org> |
af51c820 | 7 | # |
233e7676 | 8 | # This file is part of GNU Guix. |
af51c820 | 9 | # |
233e7676 | 10 | # GNU Guix is free software; you can redistribute it and/or modify it |
af51c820 LC |
11 | # under the terms of the GNU General Public License as published by |
12 | # the Free Software Foundation; either version 3 of the License, or (at | |
13 | # your option) any later version. | |
14 | # | |
233e7676 | 15 | # GNU Guix is distributed in the hope that it will be useful, but |
af51c820 LC |
16 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | # GNU General Public License for more details. | |
19 | # | |
20 | # You should have received a copy of the GNU General Public License | |
233e7676 | 21 | # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
af51c820 | 22 | |
c52a5bf0 | 23 | bin_SCRIPTS = \ |
e49951eb | 24 | scripts/guix |
14a1c319 | 25 | |
58867ae7 MW |
26 | nodist_noinst_SCRIPTS = \ |
27 | pre-inst-env \ | |
28 | test-env | |
29 | ||
03d0e2d2 | 30 | include gnu/local.mk |
d516736c | 31 | |
af51c820 | 32 | MODULES = \ |
ddc29a78 | 33 | guix/base32.scm \ |
e9c6c584 | 34 | guix/base64.scm \ |
7a18c3cc | 35 | guix/cpio.scm \ |
c0cd1b3e | 36 | guix/records.scm \ |
4862bc4a | 37 | guix/gcrypt.scm \ |
72626a71 | 38 | guix/hash.scm \ |
3476ded9 | 39 | guix/pk-crypto.scm \ |
8b420f74 | 40 | guix/pki.scm \ |
958dd3ce | 41 | guix/combinators.scm \ |
f9704f17 | 42 | guix/memoization.scm \ |
73fbb904 | 43 | guix/utils.scm \ |
d326767e | 44 | guix/sets.scm \ |
7ca87354 | 45 | guix/modules.scm \ |
de1355f1 | 46 | guix/download.scm \ |
9b5b5c17 | 47 | guix/git-download.scm \ |
c4e48b68 | 48 | guix/hg-download.scm \ |
b860f382 | 49 | guix/monads.scm \ |
b9b86078 | 50 | guix/monad-repl.scm \ |
21b679f6 | 51 | guix/gexp.scm \ |
cc4ecc2d | 52 | guix/profiles.scm \ |
0f41c26f LC |
53 | guix/serialization.scm \ |
54 | guix/nar.scm \ | |
af51c820 | 55 | guix/derivations.scm \ |
7adf9b84 | 56 | guix/grafts.scm \ |
22189ed1 | 57 | guix/gnu-maintenance.scm \ |
0a7c5a09 | 58 | guix/upstream.scm \ |
838d78e3 | 59 | guix/licenses.scm \ |
8fb58371 | 60 | guix/graph.scm \ |
0eef7551 | 61 | guix/cve.scm \ |
72153902 | 62 | guix/zlib.scm \ |
208f7cd1 | 63 | guix/build-system.scm \ |
5f7a1a4d | 64 | guix/build-system/ant.scm \ |
4b3cb7f4 | 65 | guix/build-system/cargo.scm \ |
c6bded8a | 66 | guix/build-system/cmake.scm \ |
65e862d1 | 67 | guix/build-system/dub.scm \ |
e9137a53 | 68 | guix/build-system/emacs.scm \ |
a1b30f99 | 69 | guix/build-system/asdf.scm \ |
be3425e5 | 70 | guix/build-system/glib-or-gtk.scm \ |
208f7cd1 | 71 | guix/build-system/gnu.scm \ |
ce6fc7d6 | 72 | guix/build-system/haskell.scm \ |
08fd1ebe | 73 | guix/build-system/perl.scm \ |
40506d5d | 74 | guix/build-system/python.scm \ |
e6876cb9 | 75 | guix/build-system/ocaml.scm \ |
a677c726 | 76 | guix/build-system/waf.scm \ |
f8f3bef6 | 77 | guix/build-system/r.scm \ |
c08f9818 | 78 | guix/build-system/ruby.scm \ |
be13fbfa | 79 | guix/build-system/trivial.scm \ |
457dd86d | 80 | guix/ftp-client.scm \ |
3b8258c5 | 81 | guix/http-client.scm \ |
0fdd3bea | 82 | guix/gnupg.scm \ |
d5d16686 | 83 | guix/elf.scm \ |
af51c820 | 84 | guix/store.scm \ |
89328d24 | 85 | guix/cvs-download.scm \ |
b3acf365 | 86 | guix/svn-download.scm \ |
073c34d7 | 87 | guix/ui.scm \ |
5f7a1a4d | 88 | guix/build/ant-build-system.scm \ |
62cab99c | 89 | guix/build/download.scm \ |
4b3cb7f4 | 90 | guix/build/cargo-build-system.scm \ |
c6bded8a | 91 | guix/build/cmake-build-system.scm \ |
65e862d1 | 92 | guix/build/dub-build-system.scm \ |
e9137a53 | 93 | guix/build/emacs-build-system.scm \ |
a1b30f99 | 94 | guix/build/asdf-build-system.scm \ |
9b5b5c17 | 95 | guix/build/git.scm \ |
c4e48b68 | 96 | guix/build/hg.scm \ |
be3425e5 | 97 | guix/build/glib-or-gtk-build-system.scm \ |
af51c820 | 98 | guix/build/gnu-build-system.scm \ |
fe12c345 | 99 | guix/build/gnu-dist.scm \ |
08fd1ebe | 100 | guix/build/perl-build-system.scm \ |
40506d5d | 101 | guix/build/python-build-system.scm \ |
e6876cb9 | 102 | guix/build/ocaml-build-system.scm \ |
f8f3bef6 | 103 | guix/build/r-build-system.scm \ |
c08f9818 | 104 | guix/build/ruby-build-system.scm \ |
a677c726 | 105 | guix/build/waf-build-system.scm \ |
9fd6c2ba | 106 | guix/build/haskell-build-system.scm \ |
6fd1a796 | 107 | guix/build/store-copy.scm \ |
1273d44a | 108 | guix/build/utils.scm \ |
c8c88afa | 109 | guix/build/union.scm \ |
611adb1e | 110 | guix/build/profiles.scm \ |
3dbeecd2 | 111 | guix/build/pull.scm \ |
3309e3a1 | 112 | guix/build/rpath.scm \ |
89328d24 | 113 | guix/build/cvs.scm \ |
b3acf365 | 114 | guix/build/svn.scm \ |
875715ca | 115 | guix/build/syscalls.scm \ |
15aa2c38 | 116 | guix/build/gremlin.scm \ |
75f3b1a1 | 117 | guix/build/emacs-utils.scm \ |
a1b30f99 | 118 | guix/build/lisp-utils.scm \ |
fb59e275 | 119 | guix/build/graft.scm \ |
f2e4805b | 120 | guix/build/bournish.scm \ |
2098d024 | 121 | guix/build/qt-utils.scm \ |
f13f60cb | 122 | guix/build/make-bootstrap.scm \ |
e89431bf | 123 | guix/search-paths.scm \ |
e3ce5d70 | 124 | guix/packages.scm \ |
1b3e9685 | 125 | guix/import/utils.scm \ |
7047133f | 126 | guix/import/gnu.scm \ |
1b3e9685 | 127 | guix/import/snix.scm \ |
a4154748 | 128 | guix/import/cabal.scm \ |
e1248602 | 129 | guix/import/cran.scm \ |
a4154748 | 130 | guix/import/hackage.scm \ |
bc5844d1 | 131 | guix/import/stackage.scm \ |
7f74a931 | 132 | guix/import/elpa.scm \ |
88981dd3 | 133 | guix/scripts.scm \ |
de1355f1 | 134 | guix/scripts/download.scm \ |
94d92c77 | 135 | guix/scripts/perform-download.scm \ |
de1355f1 | 136 | guix/scripts/build.scm \ |
760c60d6 | 137 | guix/scripts/archive.scm \ |
de1355f1 LC |
138 | guix/scripts/import.scm \ |
139 | guix/scripts/package.scm \ | |
140 | guix/scripts/gc.scm \ | |
141 | guix/scripts/hash.scm \ | |
142 | guix/scripts/pull.scm \ | |
2c74fde0 | 143 | guix/scripts/substitute.scm \ |
526382ff | 144 | guix/scripts/authenticate.scm \ |
de1355f1 | 145 | guix/scripts/refresh.scm \ |
523e4896 | 146 | guix/scripts/system.scm \ |
b4f5e0e8 | 147 | guix/scripts/lint.scm \ |
d23c20f1 | 148 | guix/scripts/challenge.scm \ |
e1248602 | 149 | guix/scripts/import/cran.scm \ |
7047133f | 150 | guix/scripts/import/gnu.scm \ |
1b3e9685 | 151 | guix/scripts/import/nix.scm \ |
a4154748 | 152 | guix/scripts/import/hackage.scm \ |
bc5844d1 | 153 | guix/scripts/import/stackage.scm \ |
7f74a931 | 154 | guix/scripts/import/elpa.scm \ |
372c4bbc | 155 | guix/scripts/environment.scm \ |
aff8ce7c | 156 | guix/scripts/publish.scm \ |
39bee8a2 | 157 | guix/scripts/edit.scm \ |
fcc58db6 | 158 | guix/scripts/size.scm \ |
88856916 | 159 | guix/scripts/graph.scm \ |
32efa254 DT |
160 | guix/scripts/container.scm \ |
161 | guix/scripts/container/exec.scm \ | |
e3ce5d70 | 162 | guix.scm \ |
d516736c | 163 | $(GNU_SYSTEM_MODULES) |
af51c820 | 164 | |
bb251307 LC |
165 | if HAVE_GUILE_JSON |
166 | ||
167 | MODULES += \ | |
03476a23 | 168 | guix/docker.scm \ |
70161842 | 169 | guix/import/github.scm \ |
bb251307 | 170 | guix/import/json.scm \ |
60230413 DT |
171 | guix/import/crate.scm \ |
172 | guix/scripts/import/crate.scm \ | |
bb251307 LC |
173 | guix/import/pypi.scm \ |
174 | guix/scripts/import/pypi.scm \ | |
175 | guix/import/cpan.scm \ | |
176 | guix/scripts/import/gem.scm \ | |
177 | guix/import/gem.scm | |
178 | ||
179 | endif | |
180 | ||
987a29ba LC |
181 | if HAVE_GUILE_SSH |
182 | ||
183 | MODULES += \ | |
f11c444d LC |
184 | guix/ssh.scm \ |
185 | guix/scripts/copy.scm | |
987a29ba LC |
186 | |
187 | endif HAVE_GUILE_SSH | |
188 | ||
49e6291a LC |
189 | if BUILD_DAEMON_OFFLOAD |
190 | ||
191 | MODULES += \ | |
192 | guix/scripts/offload.scm | |
193 | ||
194 | endif BUILD_DAEMON_OFFLOAD | |
195 | ||
17ab08bc LC |
196 | # Internal modules with test suite support. |
197 | dist_noinst_DATA = guix/tests.scm guix/tests/http.scm | |
c1bc358f | 198 | |
7994250f AK |
199 | # Auxiliary files for packages. |
200 | AUX_FILES = \ | |
201 | gnu/packages/aux-files/linux-libre/4.10-i686.conf \ | |
202 | gnu/packages/aux-files/linux-libre/4.10-x86_64.conf \ | |
203 | gnu/packages/aux-files/linux-libre/4.9-i686.conf \ | |
204 | gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \ | |
205 | gnu/packages/aux-files/linux-libre/4.4-i686.conf \ | |
206 | gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \ | |
207 | gnu/packages/aux-files/linux-libre/4.1-i686.conf \ | |
208 | gnu/packages/aux-files/linux-libre/4.1-x86_64.conf | |
1959fb04 | 209 | |
ebc32b31 LC |
210 | # Templates, examples. |
211 | EXAMPLES = \ | |
36ffaca2 | 212 | gnu/system/examples/bare-bones.tmpl \ |
d038b674 LC |
213 | gnu/system/examples/desktop.tmpl \ |
214 | gnu/system/examples/lightweight-desktop.tmpl | |
ebc32b31 | 215 | |
17ab08bc | 216 | GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go) |
af51c820 | 217 | |
74574fd1 | 218 | nobase_dist_guilemodule_DATA = \ |
7994250f | 219 | $(MODULES) $(AUX_FILES) $(EXAMPLES) \ |
74574fd1 | 220 | $(MISC_DISTRO_FILES) |
1959fb04 | 221 | nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm |
800cdeef | 222 | |
1959fb04 LC |
223 | # Do we need to provide our own non-broken (srfi srfi-37) module? |
224 | if INSTALL_SRFI_37 | |
225 | ||
226 | nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm | |
227 | GOBJECTS += srfi/srfi-37.go | |
228 | ||
229 | srfi/srfi-37.scm: srfi/srfi-37.scm.in | |
230 | $(MKDIR_P) srfi | |
231 | cp "$<" "$@" | |
232 | ||
233 | endif INSTALL_SRFI_37 | |
ac5aa288 | 234 | |
70a9c720 LC |
235 | # Handy way to remove the .go files without removing all the rest. |
236 | clean-go: | |
237 | -$(RM) -f $(GOBJECTS) | |
cdf26f40 EB |
238 | @find . -name '*.go' -print | \ |
239 | if test -t 1; then \ | |
240 | xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \ | |
241 | else \ | |
242 | xargs -r echo "warning: stray .go files:"; \ | |
243 | fi | |
70a9c720 | 244 | |
af51c820 | 245 | |
bb251307 LC |
246 | # Test extensions; has to be unconditional. |
247 | TEST_EXTENSIONS = .scm .sh | |
248 | ||
249 | if CAN_RUN_TESTS | |
250 | ||
30dd8310 | 251 | SCM_TESTS = \ |
ddc29a78 | 252 | tests/base32.scm \ |
e9c6c584 | 253 | tests/base64.scm \ |
7a18c3cc | 254 | tests/cpio.scm \ |
69927e78 | 255 | tests/hash.scm \ |
3476ded9 | 256 | tests/pk-crypto.scm \ |
8b420f74 | 257 | tests/pki.scm \ |
d326767e | 258 | tests/sets.scm \ |
7ca87354 | 259 | tests/modules.scm \ |
202440e0 | 260 | tests/gnu-maintenance.scm \ |
2c74fde0 | 261 | tests/substitute.scm \ |
af51c820 LC |
262 | tests/builders.scm \ |
263 | tests/derivations.scm \ | |
7adf9b84 | 264 | tests/grafts.scm \ |
299112d3 | 265 | tests/ui.scm \ |
c0cd1b3e | 266 | tests/records.scm \ |
f1eacbaf | 267 | tests/upstream.scm \ |
958dd3ce | 268 | tests/combinators.scm \ |
e3ce5d70 | 269 | tests/utils.scm \ |
b0e0d0e9 | 270 | tests/build-utils.scm \ |
c8c88afa | 271 | tests/packages.scm \ |
10226c05 | 272 | tests/snix.scm \ |
a4154748 | 273 | tests/hackage.scm \ |
e1248602 | 274 | tests/cran.scm \ |
7f74a931 | 275 | tests/elpa.scm \ |
3259877d | 276 | tests/store.scm \ |
b860f382 | 277 | tests/monads.scm \ |
21b679f6 | 278 | tests/gexp.scm \ |
53c63ee9 | 279 | tests/nar.scm \ |
a2078770 | 280 | tests/union.scm \ |
29fa45f4 | 281 | tests/profiles.scm \ |
b4f5e0e8 | 282 | tests/syscalls.scm \ |
15aa2c38 | 283 | tests/gremlin.scm \ |
f82c5853 | 284 | tests/bournish.scm \ |
aff8ce7c | 285 | tests/lint.scm \ |
fcc58db6 | 286 | tests/publish.scm \ |
88981dd3 | 287 | tests/scripts.scm \ |
c1f6a0c2 | 288 | tests/size.scm \ |
88856916 | 289 | tests/graph.scm \ |
d23c20f1 | 290 | tests/challenge.scm \ |
0eef7551 | 291 | tests/cve.scm \ |
72153902 | 292 | tests/zlib.scm \ |
661a1d79 | 293 | tests/file-systems.scm \ |
6b779207 | 294 | tests/system.scm \ |
0adfe95a | 295 | tests/services.scm \ |
629a064f | 296 | tests/scripts-build.scm \ |
a132f7d6 BW |
297 | tests/containers.scm \ |
298 | tests/import-utils.scm | |
30dd8310 | 299 | |
1b3e9685 DT |
300 | if HAVE_GUILE_JSON |
301 | ||
d45dc6da EB |
302 | SCM_TESTS += \ |
303 | tests/pypi.scm \ | |
a96524cc | 304 | tests/cpan.scm \ |
3e0c0365 DC |
305 | tests/gem.scm \ |
306 | tests/crate.scm | |
1b3e9685 DT |
307 | |
308 | endif | |
309 | ||
30dd8310 | 310 | SH_TESTS = \ |
0afdc485 | 311 | tests/guix-build.sh \ |
37d19403 | 312 | tests/guix-download.sh \ |
fe8ff028 | 313 | tests/guix-gc.sh \ |
ccbce848 | 314 | tests/guix-hash.sh \ |
0820098d | 315 | tests/guix-package.sh \ |
57b86237 | 316 | tests/guix-package-net.sh \ |
c1202fb1 | 317 | tests/guix-system.sh \ |
760c60d6 | 318 | tests/guix-archive.sh \ |
dd7c013d | 319 | tests/guix-authenticate.sh \ |
cad25264 | 320 | tests/guix-environment.sh \ |
f535dcbe | 321 | tests/guix-environment-container.sh \ |
88856916 | 322 | tests/guix-graph.sh \ |
dd7c013d | 323 | tests/guix-lint.sh |
af51c820 | 324 | |
a7a4e6a4 LC |
325 | if BUILD_DAEMON |
326 | ||
327 | SH_TESTS += tests/guix-register.sh | |
328 | ||
329 | endif BUILD_DAEMON | |
330 | ||
331 | ||
30dd8310 LC |
332 | TESTS = $(SCM_TESTS) $(SH_TESTS) |
333 | ||
a9edb211 | 334 | AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0 |
352ec143 | 335 | |
4d9ed584 LC |
336 | SCM_LOG_DRIVER = \ |
337 | $(top_builddir)/test-env --quiet-stderr \ | |
338 | $(GUILE) --no-auto-compile -e main \ | |
339 | $(top_srcdir)/build-aux/test-driver.scm | |
340 | ||
a9edb211 | 341 | AM_SCM_LOG_DRIVER_FLAGS = --brief=yes |
97298ffa | 342 | |
69cfce50 | 343 | SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL) |
97298ffa | 344 | AM_SH_LOG_FLAGS = -x -e |
af51c820 | 345 | |
3a33730a LC |
346 | # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it |
347 | # could end up removing files from the store while they are being used by | |
348 | # other instances of the daemon. | |
349 | tests/guix-gc.log: \ | |
350 | $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \ | |
351 | $(SCM_TESTS:%.scm=%.log) | |
352 | ||
bb251307 LC |
353 | else !CAN_RUN_TESTS |
354 | ||
355 | TESTS = | |
356 | SH_TESTS = | |
357 | SCM_TESTS = | |
358 | ||
359 | # Automake always generates a 'check' target, so better not override it. | |
360 | check-local: | |
361 | @echo | |
362 | @echo "Cannot run tests because file name limits would be exceeded." >&2 | |
363 | @echo "Look for 'length' in the 'config.log' file for details." >&2 | |
364 | @echo | |
365 | @exit 1 | |
366 | ||
367 | endif !CAN_RUN_TESTS | |
368 | ||
e9f693d0 | 369 | check-system: $(GOBJECTS) |
e9f693d0 LC |
370 | $(AM_V_at)$(top_builddir)/pre-inst-env \ |
371 | $(GUILE) --no-auto-compile \ | |
372 | -e '(@@ (run-system-tests) run-system-tests)' \ | |
373 | $(top_srcdir)/build-aux/run-system-tests.scm | |
374 | ||
bf59c06d | 375 | # Public key used to sign substitutes from hydra.gnu.org. |
6c110833 | 376 | dist_pkgdata_DATA = hydra.gnu.org.pub |
3a33730a | 377 | |
ee3e157d LC |
378 | # Bash completion file. |
379 | dist_bashcompletion_DATA = etc/completion/bash/guix | |
380 | ||
96dbc930 ELB |
381 | # Zsh completion file. |
382 | dist_zshcompletion_DATA = etc/completion/zsh/_guix | |
383 | ||
81f61c17 LC |
384 | EXTRA_DIST = \ |
385 | HACKING \ | |
386 | ROADMAP \ | |
387 | TODO \ | |
e15fcdd1 | 388 | CODE-OF-CONDUCT \ |
81f61c17 | 389 | .dir-locals.el \ |
f81ac34d | 390 | build-aux/build-self.scm \ |
de6af327 | 391 | build-aux/compile-all.scm \ |
89cbec89 | 392 | build-aux/hydra/evaluate.scm \ |
81f61c17 LC |
393 | build-aux/hydra/gnu-system.scm \ |
394 | build-aux/hydra/demo-os.scm \ | |
395 | build-aux/hydra/guix.scm \ | |
396 | build-aux/check-available-binaries.scm \ | |
397 | build-aux/check-final-inputs-self-contained.scm \ | |
398 | build-aux/download.scm \ | |
8bc35f85 | 399 | build-aux/make-binary-tarball.scm \ |
1c2ae810 | 400 | build-aux/generate-authors.scm \ |
3cf0dbda | 401 | build-aux/test-driver.scm \ |
41c569d9 | 402 | build-aux/run-system-tests.scm \ |
4d93f312 RW |
403 | d3.v3.js \ |
404 | graph.js \ | |
81f61c17 LC |
405 | srfi/srfi-37.scm.in \ |
406 | srfi/srfi-64.scm \ | |
407 | srfi/srfi-64.upstream.scm \ | |
408 | tests/test.drv \ | |
409 | tests/signing-key.pub \ | |
410 | tests/signing-key.sec \ | |
0eef7551 | 411 | tests/cve-sample.xml \ |
81f61c17 LC |
412 | build-aux/config.rpath \ |
413 | bootstrap \ | |
414 | release.nix \ | |
ed795c06 | 415 | $(TESTS) |
d7672884 | 416 | |
49e6291a LC |
417 | if !BUILD_DAEMON_OFFLOAD |
418 | ||
419 | EXTRA_DIST += \ | |
420 | guix/scripts/offload.scm | |
421 | ||
422 | endif !BUILD_DAEMON_OFFLOAD | |
423 | ||
424 | ||
30dd8310 LC |
425 | CLEANFILES = \ |
426 | $(GOBJECTS) \ | |
9bff16b3 | 427 | $(SCM_TESTS:tests/%.scm=%.log) |
af51c820 | 428 | |
28561d85 LC |
429 | # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if |
430 | # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in | |
431 | # there that are newer than the local .scm files (for instance because the | |
432 | # user ran 'make install' recently). When that happens, we end up loading | |
433 | # those previously-installed .go files, which may be stale, thereby breaking | |
d92e23dc LC |
434 | # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly |
435 | # stale files from ~/.cache/guile/ccache. | |
de6af327 | 436 | %.go: make-go ; @: |
17ab08bc | 437 | make-go: $(MODULES) guix/config.scm $(dist_noinst_DATA) |
de6af327 | 438 | $(AM_V_at)echo "Compiling Scheme modules..." ; \ |
28561d85 | 439 | unset GUILE_LOAD_COMPILED_PATH ; \ |
d92e23dc | 440 | XDG_CACHE_HOME=/nowhere \ |
de6af327 | 441 | host=$(host) srcdir="$(top_srcdir)" \ |
671d8f5e | 442 | $(top_builddir)/pre-inst-env \ |
de6af327 TUBK |
443 | $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \ |
444 | --no-auto-compile \ | |
445 | -s "$(top_srcdir)"/build-aux/compile-all.scm $^ | |
af51c820 LC |
446 | |
447 | SUFFIXES = .go | |
448 | ||
449 | # Make sure source files are installed first, so that the mtime of | |
450 | # installed compiled files is greater than that of installed source | |
451 | # files. See | |
452 | # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> | |
453 | # for details. | |
454 | guix_install_go_files = install-nobase_nodist_guilemoduleDATA | |
455 | $(guix_install_go_files): install-nobase_dist_guilemoduleDATA | |
f68b0893 | 456 | |
6005bd07 LC |
457 | # The above trick doesn't work for 'config.go' because both 'config.scm' and |
458 | # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it | |
459 | # special treatment. | |
460 | install-data-hook: set-bootstrap-executable-permissions | |
461 | touch "$(DESTDIR)$(guilemoduledir)/guix/config.go" | |
462 | ||
463 | ||
ee764179 | 464 | SUBDIRS = po/guix po/packages |
931c132a | 465 | BUILT_SOURCES = |
a9424c08 | 466 | |
03d0e2d2 | 467 | include doc/local.mk |
568717fd | 468 | |
c2033df4 LC |
469 | if BUILD_DAEMON |
470 | ||
03d0e2d2 | 471 | include nix/local.mk |
c2033df4 LC |
472 | |
473 | endif BUILD_DAEMON | |
474 | ||
f68b0893 | 475 | ACLOCAL_AMFLAGS = -I m4 |
ef5f5c86 LC |
476 | |
477 | # Pass an explicit '--localstatedir' so that configure does not error out if | |
478 | # it finds an existing installation with a different localstatedir. | |
e76bdf8b | 479 | AM_DISTCHECK_CONFIGURE_FLAGS = \ |
ef5f5c86 | 480 | --localstatedir="$$dc_install_base/var" \ |
d388c2c4 | 481 | --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \ |
14af289e | 482 | --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \ |
aca54b39 LC |
483 | --with-nix-prefix="$(NIX_PREFIX)" \ |
484 | --enable-daemon | |
0e993428 | 485 | |
9d3fb6c7 LC |
486 | # The self-contained tarball. |
487 | guix-binary.%.tar.xz: | |
e71ad29d | 488 | $(AM_V_GEN)GUIX_PACKAGE_PATH= \ |
9d3fb6c7 LC |
489 | $(top_builddir)/pre-inst-env "$(GUILE)" \ |
490 | "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@" | |
491 | ||
492 | ||
a8ac45b1 AK |
493 | dist-hook: sync-descriptions gen-ChangeLog gen-AUTHORS |
494 | dist-hook: assert-no-store-file-names | |
495 | ||
81f61c17 | 496 | distcheck-hook: assert-binaries-available assert-final-inputs-self-contained |
e793178a | 497 | |
668d48a6 | 498 | sync-descriptions: |
e71ad29d | 499 | $(AM_V_at)GUIX_PACKAGE_PATH= \ |
36c45230 | 500 | $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description |
e793178a LC |
501 | |
502 | gen-ChangeLog: | |
e71ad29d | 503 | $(AM_V_GEN)if test -d .git; then \ |
e793178a LC |
504 | $(top_srcdir)/build-aux/gitlog-to-changelog \ |
505 | > $(distdir)/cl-t; \ | |
506 | rm -f $(distdir)/ChangeLog; \ | |
507 | mv $(distdir)/cl-t $(distdir)/ChangeLog; \ | |
508 | fi | |
509 | ||
a8ac45b1 | 510 | gen-AUTHORS: |
e71ad29d | 511 | $(AM_V_GEN)if test -d .git; then \ |
ac140f79 LC |
512 | rm -f "$(distdir)/AUTHORS"; \ |
513 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
514 | "$(top_srcdir)/build-aux/generate-authors.scm" \ | |
515 | "$(top_srcdir)" "$(distdir)/AUTHORS"; \ | |
516 | fi | |
a8ac45b1 | 517 | |
834129e0 | 518 | # Make sure we're not shipping a file that embeds a local /gnu/store file name. |
a463ffd9 | 519 | assert-no-store-file-names: |
e71ad29d | 520 | $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \ |
69e7322f LC |
521 | --exclude=*.info-[0-9] --exclude=*.dot \ |
522 | --exclude=*.eps --exclude-dir=bootstrap \ | |
523 | --exclude=guix-prettify.el \ | |
76b3fbbc | 524 | --exclude=ChangeLog \ |
69e7322f | 525 | -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \ |
a463ffd9 LC |
526 | then \ |
527 | echo "error: store file names embedded in the distribution" >&2 ; \ | |
528 | exit 1 ; \ | |
529 | fi | |
530 | ||
56fbf262 | 531 | # Make sure hydra.gnu.org has the important binaries. |
93cba30c | 532 | assert-binaries-available: $(GOBJECTS) |
e71ad29d | 533 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
56fbf262 LC |
534 | "$(top_srcdir)/build-aux/check-available-binaries.scm" |
535 | ||
81f61c17 | 536 | # Make sure the final inputs don't refer to bootstrap tools. |
93cba30c | 537 | assert-final-inputs-self-contained: $(GOBJECTS) |
e71ad29d | 538 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
81f61c17 LC |
539 | "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm" |
540 | ||
89cbec89 LC |
541 | # Compute the Hydra jobs and write them in the target file. |
542 | hydra-jobs.scm: $(GOBJECTS) | |
543 | $(AM_V_at)$(MKDIR_P) "`dirname "$@"`" | |
544 | $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \ | |
545 | "$(top_srcdir)/build-aux/hydra/evaluate.scm" \ | |
546 | "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp" | |
28dee3d2 | 547 | $(AM_V_at)mv "$@.tmp" "$@" |
89cbec89 | 548 | |
de6af327 | 549 | .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go |
56fbf262 | 550 | .PHONY: assert-no-store-file-names assert-binaries-available |
81f61c17 | 551 | .PHONY: assert-final-inputs-self-contained |
8c3d8894 ML |
552 | |
553 | ## -------------- ## | |
554 | ## Silent rules. ## | |
555 | ## -------------- ## | |
556 | ||
557 | AM_V_DL = $(AM_V_DL_$(V)) | |
558 | AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY)) | |
559 | AM_V_DL_0 = @echo " DL " $@; | |
4c48878d ML |
560 | |
561 | AM_V_DOT = $(AM_V_DOT_$(V)) | |
562 | AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY)) | |
563 | AM_V_DOT_0 = @echo " DOT " $@; | |
71ed439b | 564 | |
8dddedf7 ML |
565 | AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V)) |
566 | AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY)) | |
567 | AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@; |