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