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