Commit | Line | Data |
---|---|---|
233e7676 | 1 | # GNU Guix --- Functional package management for GNU |
fcd75bdb | 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> |
960887b2 | 7 | # Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
a6c642ef | 8 | # Copyright © 2017 Leo Famulari <leo@famulari.name> |
af51c820 | 9 | # |
233e7676 | 10 | # This file is part of GNU Guix. |
af51c820 | 11 | # |
233e7676 | 12 | # GNU Guix is free software; you can redistribute it and/or modify it |
af51c820 LC |
13 | # under the terms of the GNU General Public License as published by |
14 | # the Free Software Foundation; either version 3 of the License, or (at | |
15 | # your option) any later version. | |
16 | # | |
233e7676 | 17 | # GNU Guix is distributed in the hope that it will be useful, but |
af51c820 LC |
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | # GNU General Public License for more details. | |
21 | # | |
22 | # You should have received a copy of the GNU General Public License | |
233e7676 | 23 | # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
af51c820 | 24 | |
c52a5bf0 | 25 | bin_SCRIPTS = \ |
e49951eb | 26 | scripts/guix |
14a1c319 | 27 | |
58867ae7 MW |
28 | nodist_noinst_SCRIPTS = \ |
29 | pre-inst-env \ | |
30 | test-env | |
31 | ||
4aabc8ea LC |
32 | # Modules that are not compiled but are installed nonetheless, such as |
33 | # build-side modules with unusual dependencies. | |
34 | MODULES_NOT_COMPILED = | |
35 | ||
03d0e2d2 | 36 | include gnu/local.mk |
d516736c | 37 | |
af51c820 | 38 | MODULES = \ |
4c0c4db0 | 39 | guix/base16.scm \ |
ddc29a78 | 40 | guix/base32.scm \ |
e9c6c584 | 41 | guix/base64.scm \ |
7a18c3cc | 42 | guix/cpio.scm \ |
c0cd1b3e | 43 | guix/records.scm \ |
4862bc4a | 44 | guix/gcrypt.scm \ |
72626a71 | 45 | guix/hash.scm \ |
3476ded9 | 46 | guix/pk-crypto.scm \ |
8b420f74 | 47 | guix/pki.scm \ |
958dd3ce | 48 | guix/combinators.scm \ |
f9704f17 | 49 | guix/memoization.scm \ |
73fbb904 | 50 | guix/utils.scm \ |
d326767e | 51 | guix/sets.scm \ |
7ca87354 | 52 | guix/modules.scm \ |
de1355f1 | 53 | guix/download.scm \ |
cd903ef7 | 54 | guix/discovery.scm \ |
9b5b5c17 | 55 | guix/git-download.scm \ |
c4e48b68 | 56 | guix/hg-download.scm \ |
b860f382 | 57 | guix/monads.scm \ |
b9b86078 | 58 | guix/monad-repl.scm \ |
21b679f6 | 59 | guix/gexp.scm \ |
cc4ecc2d | 60 | guix/profiles.scm \ |
0f41c26f LC |
61 | guix/serialization.scm \ |
62 | guix/nar.scm \ | |
af51c820 | 63 | guix/derivations.scm \ |
7adf9b84 | 64 | guix/grafts.scm \ |
22189ed1 | 65 | guix/gnu-maintenance.scm \ |
0a7c5a09 | 66 | guix/upstream.scm \ |
838d78e3 | 67 | guix/licenses.scm \ |
8fb58371 | 68 | guix/graph.scm \ |
2ea2aac6 | 69 | guix/cache.scm \ |
0eef7551 | 70 | guix/cve.scm \ |
1563d6c7 | 71 | guix/workers.scm \ |
72153902 | 72 | guix/zlib.scm \ |
208f7cd1 | 73 | guix/build-system.scm \ |
5f7a1a4d | 74 | guix/build-system/ant.scm \ |
4b3cb7f4 | 75 | guix/build-system/cargo.scm \ |
c6bded8a | 76 | guix/build-system/cmake.scm \ |
65e862d1 | 77 | guix/build-system/dub.scm \ |
e9137a53 | 78 | guix/build-system/emacs.scm \ |
3d90fa98 | 79 | guix/build-system/font.scm \ |
a1b30f99 | 80 | guix/build-system/asdf.scm \ |
be3425e5 | 81 | guix/build-system/glib-or-gtk.scm \ |
208f7cd1 | 82 | guix/build-system/gnu.scm \ |
ce6fc7d6 | 83 | guix/build-system/haskell.scm \ |
08fd1ebe | 84 | guix/build-system/perl.scm \ |
40506d5d | 85 | guix/build-system/python.scm \ |
e6876cb9 | 86 | guix/build-system/ocaml.scm \ |
a677c726 | 87 | guix/build-system/waf.scm \ |
f8f3bef6 | 88 | guix/build-system/r.scm \ |
c08f9818 | 89 | guix/build-system/ruby.scm \ |
be13fbfa | 90 | guix/build-system/trivial.scm \ |
457dd86d | 91 | guix/ftp-client.scm \ |
3b8258c5 | 92 | guix/http-client.scm \ |
0fdd3bea | 93 | guix/gnupg.scm \ |
d5d16686 | 94 | guix/elf.scm \ |
af51c820 | 95 | guix/store.scm \ |
89328d24 | 96 | guix/cvs-download.scm \ |
b3acf365 | 97 | guix/svn-download.scm \ |
073c34d7 | 98 | guix/ui.scm \ |
5f7a1a4d | 99 | guix/build/ant-build-system.scm \ |
62cab99c | 100 | guix/build/download.scm \ |
4b3cb7f4 | 101 | guix/build/cargo-build-system.scm \ |
c6bded8a | 102 | guix/build/cmake-build-system.scm \ |
65e862d1 | 103 | guix/build/dub-build-system.scm \ |
e9137a53 | 104 | guix/build/emacs-build-system.scm \ |
3d90fa98 | 105 | guix/build/font-build-system.scm \ |
a1b30f99 | 106 | guix/build/asdf-build-system.scm \ |
9b5b5c17 | 107 | guix/build/git.scm \ |
c4e48b68 | 108 | guix/build/hg.scm \ |
be3425e5 | 109 | guix/build/glib-or-gtk-build-system.scm \ |
af51c820 | 110 | guix/build/gnu-build-system.scm \ |
fe12c345 | 111 | guix/build/gnu-dist.scm \ |
08fd1ebe | 112 | guix/build/perl-build-system.scm \ |
40506d5d | 113 | guix/build/python-build-system.scm \ |
e6876cb9 | 114 | guix/build/ocaml-build-system.scm \ |
f8f3bef6 | 115 | guix/build/r-build-system.scm \ |
c08f9818 | 116 | guix/build/ruby-build-system.scm \ |
a677c726 | 117 | guix/build/waf-build-system.scm \ |
9fd6c2ba | 118 | guix/build/haskell-build-system.scm \ |
6fd1a796 | 119 | guix/build/store-copy.scm \ |
1273d44a | 120 | guix/build/utils.scm \ |
c8c88afa | 121 | guix/build/union.scm \ |
611adb1e | 122 | guix/build/profiles.scm \ |
3dbeecd2 | 123 | guix/build/pull.scm \ |
3309e3a1 | 124 | guix/build/rpath.scm \ |
89328d24 | 125 | guix/build/cvs.scm \ |
b3acf365 | 126 | guix/build/svn.scm \ |
875715ca | 127 | guix/build/syscalls.scm \ |
15aa2c38 | 128 | guix/build/gremlin.scm \ |
75f3b1a1 | 129 | guix/build/emacs-utils.scm \ |
59135f0d | 130 | guix/build/java-utils.scm \ |
a1b30f99 | 131 | guix/build/lisp-utils.scm \ |
fb59e275 | 132 | guix/build/graft.scm \ |
f2e4805b | 133 | guix/build/bournish.scm \ |
2098d024 | 134 | guix/build/qt-utils.scm \ |
f13f60cb | 135 | guix/build/make-bootstrap.scm \ |
e89431bf | 136 | guix/search-paths.scm \ |
e3ce5d70 | 137 | guix/packages.scm \ |
1b3e9685 | 138 | guix/import/utils.scm \ |
7047133f | 139 | guix/import/gnu.scm \ |
1b3e9685 | 140 | guix/import/snix.scm \ |
a4154748 | 141 | guix/import/cabal.scm \ |
e1248602 | 142 | guix/import/cran.scm \ |
a4154748 | 143 | guix/import/hackage.scm \ |
7f74a931 | 144 | guix/import/elpa.scm \ |
88981dd3 | 145 | guix/scripts.scm \ |
de1355f1 | 146 | guix/scripts/download.scm \ |
94d92c77 | 147 | guix/scripts/perform-download.scm \ |
de1355f1 | 148 | guix/scripts/build.scm \ |
760c60d6 | 149 | guix/scripts/archive.scm \ |
de1355f1 LC |
150 | guix/scripts/import.scm \ |
151 | guix/scripts/package.scm \ | |
152 | guix/scripts/gc.scm \ | |
153 | guix/scripts/hash.scm \ | |
239c2266 | 154 | guix/scripts/pack.scm \ |
de1355f1 | 155 | guix/scripts/pull.scm \ |
2c74fde0 | 156 | guix/scripts/substitute.scm \ |
526382ff | 157 | guix/scripts/authenticate.scm \ |
de1355f1 | 158 | guix/scripts/refresh.scm \ |
523e4896 | 159 | guix/scripts/system.scm \ |
b4f5e0e8 | 160 | guix/scripts/lint.scm \ |
d23c20f1 | 161 | guix/scripts/challenge.scm \ |
e1248602 | 162 | guix/scripts/import/cran.scm \ |
7047133f | 163 | guix/scripts/import/gnu.scm \ |
1b3e9685 | 164 | guix/scripts/import/nix.scm \ |
a4154748 | 165 | guix/scripts/import/hackage.scm \ |
7f74a931 | 166 | guix/scripts/import/elpa.scm \ |
372c4bbc | 167 | guix/scripts/environment.scm \ |
aff8ce7c | 168 | guix/scripts/publish.scm \ |
39bee8a2 | 169 | guix/scripts/edit.scm \ |
fcc58db6 | 170 | guix/scripts/size.scm \ |
88856916 | 171 | guix/scripts/graph.scm \ |
32efa254 DT |
172 | guix/scripts/container.scm \ |
173 | guix/scripts/container/exec.scm \ | |
e3ce5d70 | 174 | guix.scm \ |
d516736c | 175 | $(GNU_SYSTEM_MODULES) |
af51c820 | 176 | |
bb251307 LC |
177 | if HAVE_GUILE_JSON |
178 | ||
179 | MODULES += \ | |
03476a23 | 180 | guix/docker.scm \ |
3089b5d3 MW |
181 | guix/import/cpan.scm \ |
182 | guix/import/crate.scm \ | |
183 | guix/import/gem.scm \ | |
70161842 | 184 | guix/import/github.scm \ |
bb251307 LC |
185 | guix/import/json.scm \ |
186 | guix/import/pypi.scm \ | |
3089b5d3 MW |
187 | guix/import/stackage.scm \ |
188 | guix/scripts/import/crate.scm \ | |
bb251307 | 189 | guix/scripts/import/gem.scm \ |
37fd9567 AK |
190 | guix/scripts/import/pypi.scm \ |
191 | guix/scripts/import/stackage.scm | |
bb251307 LC |
192 | |
193 | endif | |
194 | ||
987a29ba LC |
195 | if HAVE_GUILE_SSH |
196 | ||
197 | MODULES += \ | |
f11c444d | 198 | guix/ssh.scm \ |
285f63e8 LC |
199 | guix/scripts/copy.scm \ |
200 | guix/store/ssh.scm | |
987a29ba LC |
201 | |
202 | endif HAVE_GUILE_SSH | |
203 | ||
49e6291a LC |
204 | if BUILD_DAEMON_OFFLOAD |
205 | ||
206 | MODULES += \ | |
207 | guix/scripts/offload.scm | |
208 | ||
209 | endif BUILD_DAEMON_OFFLOAD | |
210 | ||
17ab08bc LC |
211 | # Internal modules with test suite support. |
212 | dist_noinst_DATA = guix/tests.scm guix/tests/http.scm | |
c1bc358f | 213 | |
7994250f AK |
214 | # Auxiliary files for packages. |
215 | AUX_FILES = \ | |
59d04f63 | 216 | gnu/packages/aux-files/emacs/guix-emacs.el \ |
60c9e804 MW |
217 | gnu/packages/aux-files/linux-libre/4.11-i686.conf \ |
218 | gnu/packages/aux-files/linux-libre/4.11-x86_64.conf \ | |
7994250f AK |
219 | gnu/packages/aux-files/linux-libre/4.9-i686.conf \ |
220 | gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \ | |
221 | gnu/packages/aux-files/linux-libre/4.4-i686.conf \ | |
222 | gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \ | |
223 | gnu/packages/aux-files/linux-libre/4.1-i686.conf \ | |
224 | gnu/packages/aux-files/linux-libre/4.1-x86_64.conf | |
1959fb04 | 225 | |
ebc32b31 LC |
226 | # Templates, examples. |
227 | EXAMPLES = \ | |
36ffaca2 | 228 | gnu/system/examples/bare-bones.tmpl \ |
d038b674 | 229 | gnu/system/examples/desktop.tmpl \ |
a6c642ef LF |
230 | gnu/system/examples/lightweight-desktop.tmpl \ |
231 | gnu/system/examples/vm-image.tmpl | |
ebc32b31 | 232 | |
17ab08bc | 233 | GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go) |
af51c820 | 234 | |
4aabc8ea LC |
235 | nobase_dist_guilemodule_DATA = \ |
236 | $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \ | |
74574fd1 | 237 | $(MISC_DISTRO_FILES) |
9437fd73 LC |
238 | nobase_nodist_guilemodule_DATA = guix/config.scm |
239 | nobase_nodist_guileobject_DATA = $(GOBJECTS) | |
800cdeef | 240 | |
1959fb04 LC |
241 | # Do we need to provide our own non-broken (srfi srfi-37) module? |
242 | if INSTALL_SRFI_37 | |
243 | ||
244 | nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm | |
245 | GOBJECTS += srfi/srfi-37.go | |
246 | ||
247 | srfi/srfi-37.scm: srfi/srfi-37.scm.in | |
248 | $(MKDIR_P) srfi | |
249 | cp "$<" "$@" | |
250 | ||
251 | endif INSTALL_SRFI_37 | |
ac5aa288 | 252 | |
70a9c720 LC |
253 | # Handy way to remove the .go files without removing all the rest. |
254 | clean-go: | |
255 | -$(RM) -f $(GOBJECTS) | |
cdf26f40 EB |
256 | @find . -name '*.go' -print | \ |
257 | if test -t 1; then \ | |
258 | xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \ | |
259 | else \ | |
260 | xargs -r echo "warning: stray .go files:"; \ | |
261 | fi | |
70a9c720 | 262 | |
af51c820 | 263 | |
bb251307 LC |
264 | # Test extensions; has to be unconditional. |
265 | TEST_EXTENSIONS = .scm .sh | |
266 | ||
267 | if CAN_RUN_TESTS | |
268 | ||
30dd8310 | 269 | SCM_TESTS = \ |
4c0c4db0 | 270 | tests/base16.scm \ |
ddc29a78 | 271 | tests/base32.scm \ |
e9c6c584 | 272 | tests/base64.scm \ |
7a18c3cc | 273 | tests/cpio.scm \ |
69927e78 | 274 | tests/hash.scm \ |
3476ded9 | 275 | tests/pk-crypto.scm \ |
8b420f74 | 276 | tests/pki.scm \ |
d326767e | 277 | tests/sets.scm \ |
7ca87354 | 278 | tests/modules.scm \ |
202440e0 | 279 | tests/gnu-maintenance.scm \ |
2c74fde0 | 280 | tests/substitute.scm \ |
af51c820 LC |
281 | tests/builders.scm \ |
282 | tests/derivations.scm \ | |
7adf9b84 | 283 | tests/grafts.scm \ |
299112d3 | 284 | tests/ui.scm \ |
c0cd1b3e | 285 | tests/records.scm \ |
f1eacbaf | 286 | tests/upstream.scm \ |
958dd3ce | 287 | tests/combinators.scm \ |
cd903ef7 | 288 | tests/discovery.scm \ |
e3ce5d70 | 289 | tests/utils.scm \ |
b0e0d0e9 | 290 | tests/build-utils.scm \ |
c8c88afa | 291 | tests/packages.scm \ |
10226c05 | 292 | tests/snix.scm \ |
a4154748 | 293 | tests/hackage.scm \ |
e1248602 | 294 | tests/cran.scm \ |
7f74a931 | 295 | tests/elpa.scm \ |
3259877d | 296 | tests/store.scm \ |
b860f382 | 297 | tests/monads.scm \ |
21b679f6 | 298 | tests/gexp.scm \ |
53c63ee9 | 299 | tests/nar.scm \ |
a2078770 | 300 | tests/union.scm \ |
29fa45f4 | 301 | tests/profiles.scm \ |
fcd75bdb | 302 | tests/search-paths.scm \ |
b4f5e0e8 | 303 | tests/syscalls.scm \ |
15aa2c38 | 304 | tests/gremlin.scm \ |
f82c5853 | 305 | tests/bournish.scm \ |
aff8ce7c | 306 | tests/lint.scm \ |
fcc58db6 | 307 | tests/publish.scm \ |
88981dd3 | 308 | tests/scripts.scm \ |
c1f6a0c2 | 309 | tests/size.scm \ |
88856916 | 310 | tests/graph.scm \ |
d23c20f1 | 311 | tests/challenge.scm \ |
2ea2aac6 | 312 | tests/cache.scm \ |
0eef7551 | 313 | tests/cve.scm \ |
1563d6c7 | 314 | tests/workers.scm \ |
72153902 | 315 | tests/zlib.scm \ |
661a1d79 | 316 | tests/file-systems.scm \ |
6b779207 | 317 | tests/system.scm \ |
0adfe95a | 318 | tests/services.scm \ |
629a064f | 319 | tests/scripts-build.scm \ |
a132f7d6 | 320 | tests/containers.scm \ |
850edd77 | 321 | tests/pack.scm \ |
a132f7d6 | 322 | tests/import-utils.scm |
30dd8310 | 323 | |
1b3e9685 DT |
324 | if HAVE_GUILE_JSON |
325 | ||
d45dc6da EB |
326 | SCM_TESTS += \ |
327 | tests/pypi.scm \ | |
a96524cc | 328 | tests/cpan.scm \ |
3e0c0365 DC |
329 | tests/gem.scm \ |
330 | tests/crate.scm | |
1b3e9685 DT |
331 | |
332 | endif | |
333 | ||
30dd8310 | 334 | SH_TESTS = \ |
0afdc485 | 335 | tests/guix-build.sh \ |
37d19403 | 336 | tests/guix-download.sh \ |
fe8ff028 | 337 | tests/guix-gc.sh \ |
ccbce848 | 338 | tests/guix-hash.sh \ |
0820098d | 339 | tests/guix-package.sh \ |
57b86237 | 340 | tests/guix-package-net.sh \ |
c1202fb1 | 341 | tests/guix-system.sh \ |
760c60d6 | 342 | tests/guix-archive.sh \ |
dd7c013d | 343 | tests/guix-authenticate.sh \ |
cad25264 | 344 | tests/guix-environment.sh \ |
f535dcbe | 345 | tests/guix-environment-container.sh \ |
88856916 | 346 | tests/guix-graph.sh \ |
dd7c013d | 347 | tests/guix-lint.sh |
af51c820 | 348 | |
a7a4e6a4 LC |
349 | if BUILD_DAEMON |
350 | ||
351 | SH_TESTS += tests/guix-register.sh | |
352 | ||
353 | endif BUILD_DAEMON | |
354 | ||
355 | ||
30dd8310 LC |
356 | TESTS = $(SCM_TESTS) $(SH_TESTS) |
357 | ||
a9edb211 | 358 | AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0 |
352ec143 | 359 | |
4d9ed584 LC |
360 | SCM_LOG_DRIVER = \ |
361 | $(top_builddir)/test-env --quiet-stderr \ | |
362 | $(GUILE) --no-auto-compile -e main \ | |
363 | $(top_srcdir)/build-aux/test-driver.scm | |
364 | ||
a9edb211 | 365 | AM_SCM_LOG_DRIVER_FLAGS = --brief=yes |
97298ffa | 366 | |
69cfce50 | 367 | SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL) |
97298ffa | 368 | AM_SH_LOG_FLAGS = -x -e |
af51c820 | 369 | |
3a33730a LC |
370 | # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it |
371 | # could end up removing files from the store while they are being used by | |
372 | # other instances of the daemon. | |
373 | tests/guix-gc.log: \ | |
374 | $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \ | |
375 | $(SCM_TESTS:%.scm=%.log) | |
376 | ||
bb251307 LC |
377 | else !CAN_RUN_TESTS |
378 | ||
379 | TESTS = | |
380 | SH_TESTS = | |
381 | SCM_TESTS = | |
382 | ||
383 | # Automake always generates a 'check' target, so better not override it. | |
384 | check-local: | |
385 | @echo | |
386 | @echo "Cannot run tests because file name limits would be exceeded." >&2 | |
387 | @echo "Look for 'length' in the 'config.log' file for details." >&2 | |
388 | @echo | |
389 | @exit 1 | |
390 | ||
391 | endif !CAN_RUN_TESTS | |
392 | ||
693f12ce | 393 | check-system: $(GOBJECTS) $(BOOTSTRAP_GUILE_TARBALLS) |
e9f693d0 LC |
394 | $(AM_V_at)$(top_builddir)/pre-inst-env \ |
395 | $(GUILE) --no-auto-compile \ | |
396 | -e '(@@ (run-system-tests) run-system-tests)' \ | |
397 | $(top_srcdir)/build-aux/run-system-tests.scm | |
398 | ||
d9a0bd4c LC |
399 | # Public key used to sign substitutes from hydra.gnu.org & co. |
400 | dist_pkgdata_DATA = \ | |
401 | hydra.gnu.org.pub \ | |
402 | bayfront.guixsd.org.pub | |
3a33730a | 403 | |
ee3e157d LC |
404 | # Bash completion file. |
405 | dist_bashcompletion_DATA = etc/completion/bash/guix | |
406 | ||
96dbc930 ELB |
407 | # Zsh completion file. |
408 | dist_zshcompletion_DATA = etc/completion/zsh/_guix | |
409 | ||
81f61c17 LC |
410 | EXTRA_DIST = \ |
411 | HACKING \ | |
412 | ROADMAP \ | |
413 | TODO \ | |
e15fcdd1 | 414 | CODE-OF-CONDUCT \ |
81f61c17 | 415 | .dir-locals.el \ |
f81ac34d | 416 | build-aux/build-self.scm \ |
de6af327 | 417 | build-aux/compile-all.scm \ |
89cbec89 | 418 | build-aux/hydra/evaluate.scm \ |
81f61c17 | 419 | build-aux/hydra/gnu-system.scm \ |
81f61c17 LC |
420 | build-aux/hydra/guix.scm \ |
421 | build-aux/check-available-binaries.scm \ | |
422 | build-aux/check-final-inputs-self-contained.scm \ | |
423 | build-aux/download.scm \ | |
1c2ae810 | 424 | build-aux/generate-authors.scm \ |
3cf0dbda | 425 | build-aux/test-driver.scm \ |
94fa8d76 | 426 | build-aux/update-guix-package.scm \ |
920803fb | 427 | build-aux/update-NEWS.scm \ |
41c569d9 | 428 | build-aux/run-system-tests.scm \ |
4d93f312 RW |
429 | d3.v3.js \ |
430 | graph.js \ | |
81f61c17 LC |
431 | srfi/srfi-37.scm.in \ |
432 | srfi/srfi-64.scm \ | |
433 | srfi/srfi-64.upstream.scm \ | |
434 | tests/test.drv \ | |
435 | tests/signing-key.pub \ | |
436 | tests/signing-key.sec \ | |
0eef7551 | 437 | tests/cve-sample.xml \ |
81f61c17 LC |
438 | build-aux/config.rpath \ |
439 | bootstrap \ | |
440 | release.nix \ | |
ed795c06 | 441 | $(TESTS) |
d7672884 | 442 | |
49e6291a LC |
443 | if !BUILD_DAEMON_OFFLOAD |
444 | ||
445 | EXTRA_DIST += \ | |
446 | guix/scripts/offload.scm | |
447 | ||
448 | endif !BUILD_DAEMON_OFFLOAD | |
449 | ||
450 | ||
30dd8310 LC |
451 | CLEANFILES = \ |
452 | $(GOBJECTS) \ | |
9bff16b3 | 453 | $(SCM_TESTS:tests/%.scm=%.log) |
af51c820 | 454 | |
28561d85 LC |
455 | # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if |
456 | # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in | |
457 | # there that are newer than the local .scm files (for instance because the | |
458 | # user ran 'make install' recently). When that happens, we end up loading | |
459 | # those previously-installed .go files, which may be stale, thereby breaking | |
d92e23dc LC |
460 | # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly |
461 | # stale files from ~/.cache/guile/ccache. | |
de6af327 | 462 | %.go: make-go ; @: |
17ab08bc | 463 | make-go: $(MODULES) guix/config.scm $(dist_noinst_DATA) |
de6af327 | 464 | $(AM_V_at)echo "Compiling Scheme modules..." ; \ |
28561d85 | 465 | unset GUILE_LOAD_COMPILED_PATH ; \ |
d92e23dc | 466 | XDG_CACHE_HOME=/nowhere \ |
de6af327 | 467 | host=$(host) srcdir="$(top_srcdir)" \ |
671d8f5e | 468 | $(top_builddir)/pre-inst-env \ |
de6af327 TUBK |
469 | $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \ |
470 | --no-auto-compile \ | |
471 | -s "$(top_srcdir)"/build-aux/compile-all.scm $^ | |
af51c820 LC |
472 | |
473 | SUFFIXES = .go | |
474 | ||
475 | # Make sure source files are installed first, so that the mtime of | |
476 | # installed compiled files is greater than that of installed source | |
477 | # files. See | |
478 | # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> | |
479 | # for details. | |
9437fd73 | 480 | guix_install_go_files = install-nobase_nodist_guileobjectDATA |
af51c820 | 481 | $(guix_install_go_files): install-nobase_dist_guilemoduleDATA |
f68b0893 | 482 | |
6005bd07 | 483 | # The above trick doesn't work for 'config.go' because both 'config.scm' and |
9437fd73 | 484 | # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it |
6005bd07 LC |
485 | # special treatment. |
486 | install-data-hook: set-bootstrap-executable-permissions | |
9437fd73 | 487 | touch "$(DESTDIR)$(guileobjectdir)/guix/config.go" |
6005bd07 LC |
488 | |
489 | ||
ee764179 | 490 | SUBDIRS = po/guix po/packages |
931c132a | 491 | BUILT_SOURCES = |
a9424c08 | 492 | |
03d0e2d2 | 493 | include doc/local.mk |
568717fd | 494 | |
c2033df4 LC |
495 | if BUILD_DAEMON |
496 | ||
03d0e2d2 | 497 | include nix/local.mk |
c2033df4 LC |
498 | |
499 | endif BUILD_DAEMON | |
500 | ||
f68b0893 | 501 | ACLOCAL_AMFLAGS = -I m4 |
ef5f5c86 LC |
502 | |
503 | # Pass an explicit '--localstatedir' so that configure does not error out if | |
ddce2d3a LC |
504 | # it finds an existing installation with a different localstatedir. Inherit |
505 | # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to | |
506 | # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short | |
507 | # enough for shebangs. | |
e76bdf8b | 508 | AM_DISTCHECK_CONFIGURE_FLAGS = \ |
ef5f5c86 | 509 | --localstatedir="$$dc_install_base/var" \ |
d388c2c4 | 510 | --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \ |
14af289e | 511 | --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \ |
aca54b39 | 512 | --with-nix-prefix="$(NIX_PREFIX)" \ |
ddce2d3a LC |
513 | --enable-daemon \ |
514 | ac_cv_guix_test_root="$(GUIX_TEST_ROOT)" | |
0e993428 | 515 | |
1165b08f LC |
516 | # The self-contained tarball. Add 'glibc-utf8-locales' along with glibc just |
517 | # so 'etc/profile' defines 'GUIX_LOCPATH' pointing to a valid set of locales. | |
9d3fb6c7 | 518 | guix-binary.%.tar.xz: |
33349e91 LC |
519 | $(AM_V_GEN)GUIX_PACKAGE_PATH= \ |
520 | tarball=`$(top_builddir)/pre-inst-env guix pack -K -C xz \ | |
521 | -s "$*" --localstatedir guix glibc-utf8-locales \ | |
522 | -e '(@@ (gnu packages commencement) glibc-final)'` ; \ | |
239c2266 | 523 | cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@" |
9d3fb6c7 LC |
524 | |
525 | ||
dfd24864 | 526 | dist-hook: $(distdir)/ChangeLog gen-AUTHORS gen-tarball-version |
a8ac45b1 AK |
527 | dist-hook: assert-no-store-file-names |
528 | ||
81f61c17 | 529 | distcheck-hook: assert-binaries-available assert-final-inputs-self-contained |
e793178a | 530 | |
e6860b5e LC |
531 | EXTRA_DIST += $(top_srcdir)/.version |
532 | BUILT_SOURCES += $(top_srcdir)/.version | |
533 | $(top_srcdir)/.version: | |
534 | echo $(VERSION) > "$@-t" && mv "$@-t" "$@" | |
535 | ||
536 | gen-tarball-version: | |
537 | echo $(VERSION) > "$(distdir)/.tarball-version" | |
538 | ||
dfd24864 | 539 | gen-ChangeLog $(distdir)/ChangeLog: |
e71ad29d | 540 | $(AM_V_GEN)if test -d .git; then \ |
e793178a LC |
541 | $(top_srcdir)/build-aux/gitlog-to-changelog \ |
542 | > $(distdir)/cl-t; \ | |
543 | rm -f $(distdir)/ChangeLog; \ | |
544 | mv $(distdir)/cl-t $(distdir)/ChangeLog; \ | |
545 | fi | |
546 | ||
a8ac45b1 | 547 | gen-AUTHORS: |
e71ad29d | 548 | $(AM_V_GEN)if test -d .git; then \ |
ac140f79 LC |
549 | rm -f "$(distdir)/AUTHORS"; \ |
550 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
551 | "$(top_srcdir)/build-aux/generate-authors.scm" \ | |
552 | "$(top_srcdir)" "$(distdir)/AUTHORS"; \ | |
553 | fi | |
a8ac45b1 | 554 | |
334dce14 LC |
555 | \f |
556 | # | |
557 | # Release management. | |
558 | # | |
559 | ||
560 | releasedir = release-$(PACKAGE_VERSION) | |
561 | ||
562 | PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) | |
563 | ||
564 | # List of source tarballs produced. This must be kept in sync with the | |
565 | # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'. | |
566 | SOURCE_TARBALLS = \ | |
567 | $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext)) | |
568 | ||
569 | # Systems supported by Guix. | |
2a396266 | 570 | SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux |
334dce14 LC |
571 | |
572 | # Guix binary tarballs. | |
573 | BINARY_TARBALLS = \ | |
574 | $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz) | |
575 | ||
576 | # Systems supported by GuixSD. | |
2a396266 | 577 | GUIXSD_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux |
334dce14 | 578 | |
a6c642ef LF |
579 | # Systems for which we build GuixSD VMs. |
580 | GUIXSD_VM_SYSTEMS ?= x86_64-linux | |
581 | ||
334dce14 LC |
582 | # Prefix of the GuixSD installation image file name. |
583 | GUIXSD_IMAGE_BASE = guixsd-usb-install-$(PACKAGE_VERSION) | |
584 | ||
a6c642ef LF |
585 | # Prefix of the GuixSD VM image file name. |
586 | GUIXSD_VM_IMAGE_BASE = guixsd-vm-image-$(PACKAGE_VERSION) | |
587 | ||
334dce14 LC |
588 | # Size of the installation image (for x86_64 typically). |
589 | GUIXSD_INSTALLATION_IMAGE_SIZE ?= 950MiB | |
590 | ||
a6c642ef LF |
591 | # Size of the VM image (for x86_64 typically). |
592 | GUIXSD_VM_IMAGE_SIZE ?= 2GiB | |
593 | ||
334dce14 LC |
594 | # The release process works in several phases: |
595 | # | |
596 | # 0. We assume the developer created a 'vX.Y' tag. | |
597 | # 1. Build the source tarball. | |
598 | # 2. Update the 'guix' package so that it corresponds to the 'vX.Y' tag. | |
599 | # 3. Build the binary tarballs for that 'guix' package. | |
600 | # 4. Update the 'guix' package again. | |
601 | # 5. Build the GuixSD installation images. The images will run 'guix' | |
602 | # corresponding to 'vX.Y' + 1 commit, and they will install 'vX.Y'. | |
603 | # | |
604 | # This 'release' target takes care of everything and copies the resulting | |
605 | # files to $(releasedir). | |
73c791b8 LC |
606 | # |
607 | # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext | |
608 | # issue described at <https://savannah.gnu.org/bugs/index.php?51027>. | |
609 | release: dist | |
2a396266 LC |
610 | cd po; git checkout . |
611 | @if ! git diff-index --quiet HEAD; then \ | |
612 | echo "There are uncommitted changes; stopping." >&2 ; \ | |
613 | exit 1 ; \ | |
614 | fi | |
334dce14 LC |
615 | $(MKDIR_P) "$(releasedir)" |
616 | rm -f "$(releasedir)"/* | |
617 | mv $(SOURCE_TARBALLS) "$(releasedir)" | |
334dce14 LC |
618 | $(top_builddir)/pre-inst-env "$(GUILE)" \ |
619 | $(top_srcdir)/build-aux/update-guix-package.scm \ | |
620 | "`git rev-parse HEAD`" "$(PACKAGE_VERSION)" | |
621 | git add $(top_srcdir)/gnu/packages/package-management.scm | |
622 | git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)." | |
623 | rm -f $(BINARY_TARBALLS) | |
624 | $(MAKE) $(BINARY_TARBALLS) | |
625 | for system in $(SUPPORTED_SYSTEMS) ; do \ | |
626 | mv "guix-binary.$$system.tar.xz" \ | |
627 | "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \ | |
628 | done | |
629 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
630 | $(top_srcdir)/build-aux/update-guix-package.scm \ | |
631 | "`git rev-parse HEAD`" | |
632 | git add $(top_srcdir)/gnu/packages/package-management.scm | |
633 | git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`." | |
634 | for system in $(GUIXSD_SUPPORTED_SYSTEMS) ; do \ | |
635 | image=`$(top_builddir)/pre-inst-env \ | |
636 | guix system disk-image \ | |
6344e959 | 637 | --system=$$system \ |
334dce14 LC |
638 | --image-size=$(GUIXSD_INSTALLATION_IMAGE_SIZE) \ |
639 | gnu/system/install.scm` ; \ | |
640 | if [ ! -f "$$image" ] ; then \ | |
641 | echo "failed to produced GuixSD installation image for $$system" >&2 ; \ | |
642 | exit 1 ; \ | |
643 | fi ; \ | |
644 | xz < "$$image" > "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" ; \ | |
645 | mv "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" \ | |
646 | "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz" ; \ | |
647 | done | |
a6c642ef LF |
648 | for system in $(GUIXSD_VM_SYSTEMS) ; do \ |
649 | image=`$(top_builddir)/pre-inst-env \ | |
650 | guix system vm-image \ | |
651 | --system=$$system \ | |
652 | --image-size=$(GUIXSD_VM_IMAGE_SIZE) \ | |
653 | gnu/system/examples/vm-image.tmpl` ; \ | |
654 | if [ ! -f "$$image" ] ; then \ | |
655 | echo "failed to produced GuixSD VM image for $$system" >&2 ; \ | |
656 | exit 1 ; \ | |
657 | fi ; \ | |
658 | xz < "$$image" > "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp" ; \ | |
659 | mv "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp" \ | |
660 | "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz" ; \ | |
661 | done | |
2a396266 LC |
662 | @echo |
663 | @echo "Congratulations! All the release files are now in $(releasedir)." | |
664 | @echo | |
334dce14 | 665 | |
94fa8d76 LC |
666 | update-guix-package: |
667 | git rev-parse HEAD | |
668 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
669 | $(top_srcdir)/build-aux/update-guix-package.scm \ | |
670 | "`git rev-parse HEAD`" | |
671 | ||
920803fb LC |
672 | # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>. |
673 | # Package data from this checkout is used by 'update-NEWS.scm'. | |
674 | GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance | |
675 | ||
676 | update-NEWS: $(GOBJECTS) | |
677 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
678 | $(top_srcdir)/build-aux/update-NEWS.scm \ | |
679 | $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data" | |
680 | ||
834129e0 | 681 | # Make sure we're not shipping a file that embeds a local /gnu/store file name. |
dfd24864 | 682 | assert-no-store-file-names: $(distdir)/ChangeLog |
e71ad29d | 683 | $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \ |
69e7322f LC |
684 | --exclude=*.info-[0-9] --exclude=*.dot \ |
685 | --exclude=*.eps --exclude-dir=bootstrap \ | |
686 | --exclude=guix-prettify.el \ | |
76b3fbbc | 687 | --exclude=ChangeLog \ |
69e7322f | 688 | -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \ |
a463ffd9 LC |
689 | then \ |
690 | echo "error: store file names embedded in the distribution" >&2 ; \ | |
691 | exit 1 ; \ | |
692 | fi | |
693 | ||
56fbf262 | 694 | # Make sure hydra.gnu.org has the important binaries. |
93cba30c | 695 | assert-binaries-available: $(GOBJECTS) |
e71ad29d | 696 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
56fbf262 LC |
697 | "$(top_srcdir)/build-aux/check-available-binaries.scm" |
698 | ||
81f61c17 | 699 | # Make sure the final inputs don't refer to bootstrap tools. |
93cba30c | 700 | assert-final-inputs-self-contained: $(GOBJECTS) |
e71ad29d | 701 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
81f61c17 LC |
702 | "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm" |
703 | ||
89cbec89 LC |
704 | # Compute the Hydra jobs and write them in the target file. |
705 | hydra-jobs.scm: $(GOBJECTS) | |
706 | $(AM_V_at)$(MKDIR_P) "`dirname "$@"`" | |
707 | $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \ | |
708 | "$(top_srcdir)/build-aux/hydra/evaluate.scm" \ | |
709 | "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp" | |
28dee3d2 | 710 | $(AM_V_at)mv "$@.tmp" "$@" |
89cbec89 | 711 | |
e6860b5e | 712 | .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version |
56fbf262 | 713 | .PHONY: assert-no-store-file-names assert-binaries-available |
81f61c17 | 714 | .PHONY: assert-final-inputs-self-contained |
e6860b5e | 715 | .PHONY: clean-go make-go |
920803fb | 716 | .PHONY: update-guix-package update-NEWS release |
8c3d8894 ML |
717 | |
718 | ## -------------- ## | |
719 | ## Silent rules. ## | |
720 | ## -------------- ## | |
721 | ||
722 | AM_V_DL = $(AM_V_DL_$(V)) | |
723 | AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY)) | |
724 | AM_V_DL_0 = @echo " DL " $@; | |
4c48878d ML |
725 | |
726 | AM_V_DOT = $(AM_V_DOT_$(V)) | |
727 | AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY)) | |
728 | AM_V_DOT_0 = @echo " DOT " $@; | |
71ed439b | 729 | |
8dddedf7 ML |
730 | AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V)) |
731 | AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY)) | |
732 | AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@; |