| 1 | # GNU Guix --- Functional package management for GNU |
| 2 | # Copyright © 2012-2026 Ludovic Courtès <[email protected]> |
| 3 | # Copyright © 2013 Andreas Enge <[email protected]> |
| 4 | # Copyright © 2015, 2017 Alex Kost <[email protected]> |
| 5 | # Copyright © 2016, 2018 Mathieu Lirzin <[email protected]> |
| 6 | # Copyright © 2016, 2017, 2018, 2019 Mark H Weaver <[email protected]> |
| 7 | # Copyright © 2017 Mathieu Othacehe <[email protected]> |
| 8 | # Copyright © 2017 Leo Famulari <[email protected]> |
| 9 | # Copyright © 2017 Ricardo Wurmus <[email protected]> |
| 10 | # Copyright © 2017, 2020, 2023, 2024 Janneke Nieuwenhuizen <[email protected]> |
| 11 | # Copyright © 2017 Arun Isaac <[email protected]> |
| 12 | # Copyright © 2018 Nikita <[email protected]> |
| 13 | # Copyright © 2018 Julien Lepiller <[email protected]> |
| 14 | # Copyright © 2018 Oleg Pykhalov <[email protected]> |
| 15 | # Copyright © 2018 Alex Vong <[email protected]> |
| 16 | # Copyright © 2019, 2023 Efraim Flashner <[email protected]> |
| 17 | # Copyright © 2020, 2021, 2023, 2025-2026 Maxim Cournoyer <[email protected]> |
| 18 | # Copyright © 2021 Chris Marusich <[email protected]> |
| 19 | # Copyright © 2021 Andrew Tropin <[email protected]> |
| 20 | # Copyright © 2023 Clément Lassieur <[email protected]> |
| 21 | # Copyright © 2023, 2024 Wilko Meyer <[email protected]> |
| 22 | # Copyright © 2024 gemmaro <[email protected]> |
| 23 | # Copyright © 2025 Florian Pelz <[email protected]> |
| 24 | # |
| 25 | # This file is part of GNU Guix. |
| 26 | # |
| 27 | # GNU Guix is free software; you can redistribute it and/or modify it |
| 28 | # under the terms of the GNU General Public License as published by |
| 29 | # the Free Software Foundation; either version 3 of the License, or (at |
| 30 | # your option) any later version. |
| 31 | # |
| 32 | # GNU Guix is distributed in the hope that it will be useful, but |
| 33 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 34 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 35 | # GNU General Public License for more details. |
| 36 | # |
| 37 | # You should have received a copy of the GNU General Public License |
| 38 | # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 39 | |
| 40 | MSGMERGE_UPDATE = @MSGMERGE@ --update |
| 41 | |
| 42 | bin_SCRIPTS = scripts/guix |
| 43 | |
| 44 | # Handle substitution of fully-expanded Autoconf variables. |
| 45 | do_subst = $(SED) \ |
| 46 | -e 's,[@]GUILE[@],$(GUILE),g' \ |
| 47 | -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \ |
| 48 | -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \ |
| 49 | -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \ |
| 50 | -e 's,[@]localedir[@],$(localedir),g' |
| 51 | |
| 52 | scripts/guix: scripts/guix.in Makefile guile$(EXEEXT) |
| 53 | $(AM_V_at)rm -f $@ $@-t |
| 54 | $(AM_V_at)$(MKDIR_P) "$(@D)" |
| 55 | $(AM_V_GEN)$(do_subst) < "$(srcdir)/[email protected]" > "$@-t" |
| 56 | $(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@" |
| 57 | |
| 58 | # This is our variant of the 'guile' executable, one that doesn't complain |
| 59 | # about locales. |
| 60 | pkglibexec_PROGRAMS = guile |
| 61 | guile_SOURCES = gnu/packages/aux-files/guile-launcher.c |
| 62 | guile_LDADD = $(GUILE_LIBS) |
| 63 | guile_CFLAGS = $(GUILE_CFLAGS) |
| 64 | |
| 65 | # Have the 'guix' command refer to our 'guile'. |
| 66 | install-exec-hook: |
| 67 | $(SED) -i "$(DESTDIR)$(bindir)/guix" \ |
| 68 | -e 's,^#![[:graph:]]\+,#!$(pkglibexecdir)/guile,g' |
| 69 | |
| 70 | nodist_noinst_SCRIPTS = \ |
| 71 | pre-inst-env \ |
| 72 | test-env |
| 73 | |
| 74 | # Modules that are not compiled but are installed nonetheless, such as |
| 75 | # build-side modules with unusual dependencies. |
| 76 | MODULES_NOT_COMPILED = \ |
| 77 | guix/build/po.scm \ |
| 78 | guix/man-db.scm |
| 79 | |
| 80 | include gnu/local.mk |
| 81 | include po/doc/local.mk |
| 82 | |
| 83 | MODULES = \ |
| 84 | guix/base16.scm \ |
| 85 | guix/base32.scm \ |
| 86 | guix/base64.scm \ |
| 87 | guix/ci.scm \ |
| 88 | guix/cpio.scm \ |
| 89 | guix/amd-gpu.scm \ |
| 90 | guix/cpu.scm \ |
| 91 | guix/deprecation.scm \ |
| 92 | guix/docker.scm \ |
| 93 | guix/records.scm \ |
| 94 | guix/openpgp.scm \ |
| 95 | guix/pki.scm \ |
| 96 | guix/progress.scm \ |
| 97 | guix/combinators.scm \ |
| 98 | guix/memoization.scm \ |
| 99 | guix/utils.scm \ |
| 100 | guix/sets.scm \ |
| 101 | guix/modules.scm \ |
| 102 | guix/download.scm \ |
| 103 | guix/discovery.scm \ |
| 104 | guix/android-repo-download.scm \ |
| 105 | guix/bzr-download.scm \ |
| 106 | guix/fossil-download.scm \ |
| 107 | guix/git-download.scm \ |
| 108 | guix/hg-download.scm \ |
| 109 | guix/hash.scm \ |
| 110 | guix/swh.scm \ |
| 111 | guix/monads.scm \ |
| 112 | guix/monad-repl.scm \ |
| 113 | guix/gexp.scm \ |
| 114 | guix/profiles.scm \ |
| 115 | guix/serialization.scm \ |
| 116 | guix/nar.scm \ |
| 117 | guix/narinfo.scm \ |
| 118 | guix/derivations.scm \ |
| 119 | guix/grafts.scm \ |
| 120 | guix/remote-procedures.scm \ |
| 121 | guix/repl.scm \ |
| 122 | guix/rpm.scm \ |
| 123 | guix/transformations.scm \ |
| 124 | guix/inferior.scm \ |
| 125 | guix/describe.scm \ |
| 126 | guix/quirks.scm \ |
| 127 | guix/channels.scm \ |
| 128 | guix/gnu-maintenance.scm \ |
| 129 | guix/self.scm \ |
| 130 | guix/substitutes.scm \ |
| 131 | guix/upstream.scm \ |
| 132 | guix/licenses.scm \ |
| 133 | guix/lint.scm \ |
| 134 | guix/glob.scm \ |
| 135 | guix/git.scm \ |
| 136 | guix/git-authenticate.scm \ |
| 137 | guix/graph.scm \ |
| 138 | guix/cache.scm \ |
| 139 | guix/cve.scm \ |
| 140 | guix/workers.scm \ |
| 141 | guix/least-authority.scm \ |
| 142 | guix/read-print.scm \ |
| 143 | guix/ipfs.scm \ |
| 144 | guix/platform.scm \ |
| 145 | guix/platforms/arm.scm \ |
| 146 | guix/platforms/avr.scm \ |
| 147 | guix/platforms/loongarch.scm \ |
| 148 | guix/platforms/mips.scm \ |
| 149 | guix/platforms/or1k.scm \ |
| 150 | guix/platforms/powerpc.scm \ |
| 151 | guix/platforms/riscv.scm \ |
| 152 | guix/platforms/x86.scm \ |
| 153 | guix/platforms/xtensa.scm \ |
| 154 | guix/build-system.scm \ |
| 155 | guix/build-system/agda.scm \ |
| 156 | guix/build-system/android-ndk.scm \ |
| 157 | guix/build-system/ant.scm \ |
| 158 | guix/build-system/asdf.scm \ |
| 159 | guix/build-system/cargo.scm \ |
| 160 | guix/build-system/channel.scm \ |
| 161 | guix/build-system/chicken.scm \ |
| 162 | guix/build-system/clojure.scm \ |
| 163 | guix/build-system/cmake.scm \ |
| 164 | guix/build-system/copy.scm \ |
| 165 | guix/build-system/composer.scm \ |
| 166 | guix/build-system/dub.scm \ |
| 167 | guix/build-system/dune.scm \ |
| 168 | guix/build-system/elm.scm \ |
| 169 | guix/build-system/emacs.scm \ |
| 170 | guix/build-system/font.scm \ |
| 171 | guix/build-system/glib-or-gtk.scm \ |
| 172 | guix/build-system/gnu.scm \ |
| 173 | guix/build-system/go.scm \ |
| 174 | guix/build-system/guile.scm \ |
| 175 | guix/build-system/hare.scm \ |
| 176 | guix/build-system/haskell.scm \ |
| 177 | guix/build-system/julia.scm \ |
| 178 | guix/build-system/linux-module.scm \ |
| 179 | guix/build-system/luanti.scm \ |
| 180 | guix/build-system/maven.scm \ |
| 181 | guix/build-system/meson.scm \ |
| 182 | guix/build-system/minetest.scm \ |
| 183 | guix/build-system/minify.scm \ |
| 184 | guix/build-system/mix.scm \ |
| 185 | guix/build-system/mozilla.scm \ |
| 186 | guix/build-system/node.scm \ |
| 187 | guix/build-system/ocaml.scm \ |
| 188 | guix/build-system/perl.scm \ |
| 189 | guix/build-system/pyproject.scm \ |
| 190 | guix/build-system/python.scm \ |
| 191 | guix/build-system/qt.scm \ |
| 192 | guix/build-system/r.scm \ |
| 193 | guix/build-system/rakudo.scm \ |
| 194 | guix/build-system/rebar.scm \ |
| 195 | guix/build-system/renpy.scm \ |
| 196 | guix/build-system/ruby.scm \ |
| 197 | guix/build-system/scons.scm \ |
| 198 | guix/build-system/texlive.scm \ |
| 199 | guix/build-system/tree-sitter.scm \ |
| 200 | guix/build-system/trivial.scm \ |
| 201 | guix/build-system/vim.scm \ |
| 202 | guix/build-system/waf.scm \ |
| 203 | guix/build-system/zig.scm \ |
| 204 | guix/ftp-client.scm \ |
| 205 | guix/http-client.scm \ |
| 206 | guix/gnupg.scm \ |
| 207 | guix/elf.scm \ |
| 208 | guix/profiling.scm \ |
| 209 | guix/store.scm \ |
| 210 | guix/cvs-download.scm \ |
| 211 | guix/svn-download.scm \ |
| 212 | guix/colors.scm \ |
| 213 | guix/i18n.scm \ |
| 214 | guix/diagnostics.scm \ |
| 215 | guix/ui.scm \ |
| 216 | guix/status.scm \ |
| 217 | guix/build/agda-build-system.scm \ |
| 218 | guix/build/android-ndk-build-system.scm \ |
| 219 | guix/build/ant-build-system.scm \ |
| 220 | guix/build/download.scm \ |
| 221 | guix/build/download-nar.scm \ |
| 222 | guix/build/cargo-build-system.scm \ |
| 223 | guix/build/cargo-utils.scm \ |
| 224 | guix/build/chicken-build-system.scm \ |
| 225 | guix/build/cmake-build-system.scm \ |
| 226 | guix/build/composer-build-system.scm \ |
| 227 | guix/build/dub-build-system.scm \ |
| 228 | guix/build/dune-build-system.scm \ |
| 229 | guix/build/elm-build-system.scm \ |
| 230 | guix/build/emacs-build-system.scm \ |
| 231 | guix/build/meson-build-system.scm \ |
| 232 | guix/build/minify-build-system.scm \ |
| 233 | guix/build/font-build-system.scm \ |
| 234 | guix/build/go-build-system.scm \ |
| 235 | guix/build/android-repo.scm \ |
| 236 | guix/build/asdf-build-system.scm \ |
| 237 | guix/build/bzr.scm \ |
| 238 | guix/build/copy-build-system.scm \ |
| 239 | guix/build/fossil.scm \ |
| 240 | guix/build/git.scm \ |
| 241 | guix/build/hg.scm \ |
| 242 | guix/build/glib-or-gtk-build-system.scm \ |
| 243 | guix/build/gnu-bootstrap.scm \ |
| 244 | guix/build/gnu-build-system.scm \ |
| 245 | guix/build/gnu-dist.scm \ |
| 246 | guix/build/guile-build-system.scm \ |
| 247 | guix/build/hare-build-system.scm \ |
| 248 | guix/build/luanti-build-system.scm \ |
| 249 | guix/build/maven-build-system.scm \ |
| 250 | guix/build/minetest-build-system.scm \ |
| 251 | guix/build/mix-build-system.scm \ |
| 252 | guix/build/node-build-system.scm \ |
| 253 | guix/build/perl-build-system.scm \ |
| 254 | guix/build/pyproject-build-system.scm \ |
| 255 | guix/build/python-build-system.scm \ |
| 256 | guix/build/ocaml-build-system.scm \ |
| 257 | guix/build/qt-build-system.scm \ |
| 258 | guix/build/r-build-system.scm \ |
| 259 | guix/build/renpy-build-system.scm \ |
| 260 | guix/build/rakudo-build-system.scm \ |
| 261 | guix/build/rebar-build-system.scm \ |
| 262 | guix/build/ruby-build-system.scm \ |
| 263 | guix/build/scons-build-system.scm \ |
| 264 | guix/build/texlive-build-system.scm \ |
| 265 | guix/build/tree-sitter-build-system.scm \ |
| 266 | guix/build/vim-build-system.scm \ |
| 267 | guix/build/waf-build-system.scm \ |
| 268 | guix/build/haskell-build-system.scm \ |
| 269 | guix/build/julia-build-system.scm \ |
| 270 | guix/build/kconfig.scm \ |
| 271 | guix/build/linux-module-build-system.scm \ |
| 272 | guix/build/store-copy.scm \ |
| 273 | guix/build/pack.scm \ |
| 274 | guix/build/utils.scm \ |
| 275 | guix/build/union.scm \ |
| 276 | guix/build/profiles.scm \ |
| 277 | guix/build/compile.scm \ |
| 278 | guix/build/cvs.scm \ |
| 279 | guix/build/svn.scm \ |
| 280 | guix/build/syscalls.scm \ |
| 281 | guix/build/gremlin.scm \ |
| 282 | guix/build/debug-link.scm \ |
| 283 | guix/build/clojure-build-system.scm \ |
| 284 | guix/build/clojure-utils.scm \ |
| 285 | guix/build/emacs-utils.scm \ |
| 286 | guix/build/java-utils.scm \ |
| 287 | guix/build/lisp-utils.scm \ |
| 288 | guix/build/meson-configuration.scm \ |
| 289 | guix/build/maven/java.scm \ |
| 290 | guix/build/maven/plugin.scm \ |
| 291 | guix/build/maven/pom.scm \ |
| 292 | guix/build/graft.scm \ |
| 293 | guix/build/bournish.scm \ |
| 294 | guix/build/qt-utils.scm \ |
| 295 | guix/build/zig-build-system.scm \ |
| 296 | guix/build/zig-utils.scm \ |
| 297 | guix/build/make-bootstrap.scm \ |
| 298 | guix/build/toml.scm \ |
| 299 | guix/search-paths.scm \ |
| 300 | guix/packages.scm \ |
| 301 | guix/import/apache.scm \ |
| 302 | guix/import/cabal.scm \ |
| 303 | guix/import/composer.scm \ |
| 304 | guix/import/cpan.scm \ |
| 305 | guix/import/cran.scm \ |
| 306 | guix/import/crate.scm \ |
| 307 | guix/import/crate/cargo-lock.scm \ |
| 308 | guix/import/egg.scm \ |
| 309 | guix/import/elm.scm \ |
| 310 | guix/import/elpa.scm \ |
| 311 | guix/import/gem.scm \ |
| 312 | guix/import/git.scm \ |
| 313 | guix/import/github.scm \ |
| 314 | guix/import/gnome.scm \ |
| 315 | guix/import/gnu.scm \ |
| 316 | guix/import/go.scm \ |
| 317 | guix/import/hackage.scm \ |
| 318 | guix/import/hexpm.scm \ |
| 319 | guix/import/json.scm \ |
| 320 | guix/import/kde.scm \ |
| 321 | guix/import/launchpad.scm \ |
| 322 | guix/import/luanti.scm \ |
| 323 | guix/import/minetest.scm \ |
| 324 | guix/import/nuget.scm \ |
| 325 | guix/import/npm-binary.scm \ |
| 326 | guix/import/opam.scm \ |
| 327 | guix/import/print.scm \ |
| 328 | guix/import/pypi.scm \ |
| 329 | guix/import/stackage.scm \ |
| 330 | guix/import/test.scm \ |
| 331 | guix/import/texlive.scm \ |
| 332 | guix/import/utils.scm \ |
| 333 | guix/scripts.scm \ |
| 334 | guix/scripts/download.scm \ |
| 335 | guix/scripts/perform-download.scm \ |
| 336 | guix/scripts/build.scm \ |
| 337 | guix/scripts/archive.scm \ |
| 338 | guix/scripts/import.scm \ |
| 339 | guix/scripts/package.scm \ |
| 340 | guix/scripts/locate.scm \ |
| 341 | guix/scripts/install.scm \ |
| 342 | guix/scripts/remove.scm \ |
| 343 | guix/scripts/upgrade.scm \ |
| 344 | guix/scripts/search.scm \ |
| 345 | guix/scripts/show.scm \ |
| 346 | guix/scripts/gc.scm \ |
| 347 | guix/scripts/hash.scm \ |
| 348 | guix/scripts/pack.scm \ |
| 349 | guix/scripts/pull.scm \ |
| 350 | guix/scripts/processes.scm \ |
| 351 | guix/scripts/substitute.scm \ |
| 352 | guix/scripts/authenticate.scm \ |
| 353 | guix/scripts/refresh.scm \ |
| 354 | guix/scripts/repl.scm \ |
| 355 | guix/scripts/describe.scm \ |
| 356 | guix/scripts/style.scm \ |
| 357 | guix/scripts/system.scm \ |
| 358 | guix/scripts/system/edit.scm \ |
| 359 | guix/scripts/system/reconfigure.scm \ |
| 360 | guix/scripts/system/search.scm \ |
| 361 | guix/scripts/home.scm \ |
| 362 | guix/scripts/home/edit.scm \ |
| 363 | guix/scripts/home/import.scm \ |
| 364 | guix/scripts/lint.scm \ |
| 365 | guix/scripts/challenge.scm \ |
| 366 | guix/scripts/import/composer.scm \ |
| 367 | guix/scripts/import/crate.scm \ |
| 368 | guix/scripts/import/cpan.scm \ |
| 369 | guix/scripts/import/cran.scm \ |
| 370 | guix/scripts/import/egg.scm \ |
| 371 | guix/scripts/import/elm.scm \ |
| 372 | guix/scripts/import/elpa.scm \ |
| 373 | guix/scripts/import/gem.scm \ |
| 374 | guix/scripts/import/gnu.scm \ |
| 375 | guix/scripts/import/go.scm \ |
| 376 | guix/scripts/import/hackage.scm \ |
| 377 | guix/scripts/import/hexpm.scm \ |
| 378 | guix/scripts/import/json.scm \ |
| 379 | guix/scripts/import/luanti.scm \ |
| 380 | guix/scripts/import/minetest.scm \ |
| 381 | guix/scripts/import/npm-binary.scm \ |
| 382 | guix/scripts/import/nuget.scm \ |
| 383 | guix/scripts/import/opam.scm \ |
| 384 | guix/scripts/import/pypi.scm \ |
| 385 | guix/scripts/import/stackage.scm \ |
| 386 | guix/scripts/import/texlive.scm \ |
| 387 | guix/scripts/environment.scm \ |
| 388 | guix/scripts/shell.scm \ |
| 389 | guix/scripts/publish.scm \ |
| 390 | guix/scripts/edit.scm \ |
| 391 | guix/scripts/size.scm \ |
| 392 | guix/scripts/git.scm \ |
| 393 | guix/scripts/git/authenticate.scm \ |
| 394 | guix/scripts/graph.scm \ |
| 395 | guix/scripts/weather.scm \ |
| 396 | guix/scripts/container.scm \ |
| 397 | guix/scripts/container/exec.scm \ |
| 398 | guix/scripts/deploy.scm \ |
| 399 | guix/scripts/time-machine.scm \ |
| 400 | guix.scm \ |
| 401 | $(GNU_SYSTEM_MODULES) |
| 402 | |
| 403 | if HAVE_GUILE_SSH |
| 404 | |
| 405 | MODULES += \ |
| 406 | guix/ssh.scm \ |
| 407 | guix/remote.scm \ |
| 408 | guix/scripts/copy.scm \ |
| 409 | guix/store/ssh.scm |
| 410 | |
| 411 | endif HAVE_GUILE_SSH |
| 412 | |
| 413 | if HAVE_GUILE_AVAHI |
| 414 | |
| 415 | MODULES += \ |
| 416 | guix/avahi.scm \ |
| 417 | guix/scripts/discover.scm |
| 418 | |
| 419 | endif HAVE_GUILE_AVAHI |
| 420 | |
| 421 | if BUILD_DAEMON_OFFLOAD |
| 422 | |
| 423 | MODULES += \ |
| 424 | guix/scripts/offload.scm |
| 425 | |
| 426 | endif BUILD_DAEMON_OFFLOAD |
| 427 | |
| 428 | INSTALLER_SCRIPT = guix/scripts/system/installer.scm |
| 429 | |
| 430 | if ENABLE_INSTALLER |
| 431 | MODULES += $(INSTALLER_SCRIPT) |
| 432 | else |
| 433 | MODULES_NOT_COMPILED += $(INSTALLER_SCRIPT) |
| 434 | endif !ENABLE_INSTALLER |
| 435 | |
| 436 | # Scheme implementation of the build daemon and related functionality. |
| 437 | STORE_MODULES = \ |
| 438 | guix/store/database.scm \ |
| 439 | guix/store/deduplication.scm \ |
| 440 | guix/store/roots.scm |
| 441 | |
| 442 | MODULES += $(STORE_MODULES) |
| 443 | |
| 444 | # Internal modules with test suite support. |
| 445 | dist_noinst_DATA = \ |
| 446 | guix/tests.scm \ |
| 447 | guix/tests/http.scm \ |
| 448 | guix/tests/git.scm \ |
| 449 | guix/tests/gnupg.scm |
| 450 | |
| 451 | # Auxiliary files for packages. |
| 452 | AUX_FILES = \ |
| 453 | gnu/packages/aux-files/chromium/master-preferences.json \ |
| 454 | gnu/packages/aux-files/emacs/comp-integrity.el \ |
| 455 | gnu/packages/aux-files/emacs/guix-emacs.el \ |
| 456 | gnu/packages/aux-files/findclass.php \ |
| 457 | gnu/packages/aux-files/guix.vim \ |
| 458 | gnu/packages/aux-files/guix-nvim.vim \ |
| 459 | gnu/packages/aux-files/linux-libre/7.1-arm64.conf \ |
| 460 | gnu/packages/aux-files/linux-libre/7.1-riscv.conf \ |
| 461 | gnu/packages/aux-files/linux-libre/7.1-x86_64.conf \ |
| 462 | gnu/packages/aux-files/linux-libre/7.0-arm64.conf \ |
| 463 | gnu/packages/aux-files/linux-libre/7.0-riscv.conf \ |
| 464 | gnu/packages/aux-files/linux-libre/7.0-x86_64.conf \ |
| 465 | gnu/packages/aux-files/linux-libre/6.19-arm64.conf \ |
| 466 | gnu/packages/aux-files/linux-libre/6.19-i686.conf \ |
| 467 | gnu/packages/aux-files/linux-libre/6.19-x86_64.conf \ |
| 468 | gnu/packages/aux-files/linux-libre/6.18-arm64.conf \ |
| 469 | gnu/packages/aux-files/linux-libre/6.18-i686.conf \ |
| 470 | gnu/packages/aux-files/linux-libre/6.18-x86_64.conf \ |
| 471 | gnu/packages/aux-files/linux-libre/6.12-arm.conf \ |
| 472 | gnu/packages/aux-files/linux-libre/6.12-arm64.conf \ |
| 473 | gnu/packages/aux-files/linux-libre/6.12-i686.conf \ |
| 474 | gnu/packages/aux-files/linux-libre/6.12-x86_64.conf \ |
| 475 | gnu/packages/aux-files/linux-libre/6.12-riscv.conf \ |
| 476 | gnu/packages/aux-files/linux-libre/6.6-arm.conf \ |
| 477 | gnu/packages/aux-files/linux-libre/6.6-arm64.conf \ |
| 478 | gnu/packages/aux-files/linux-libre/6.6-i686.conf \ |
| 479 | gnu/packages/aux-files/linux-libre/6.6-x86_64.conf \ |
| 480 | gnu/packages/aux-files/linux-libre/6.1-arm.conf \ |
| 481 | gnu/packages/aux-files/linux-libre/6.1-arm64.conf \ |
| 482 | gnu/packages/aux-files/linux-libre/6.1-i686.conf \ |
| 483 | gnu/packages/aux-files/linux-libre/6.1-x86_64.conf \ |
| 484 | gnu/packages/aux-files/linux-libre/5.15-arm.conf \ |
| 485 | gnu/packages/aux-files/linux-libre/5.15-arm64.conf \ |
| 486 | gnu/packages/aux-files/linux-libre/5.15-i686.conf \ |
| 487 | gnu/packages/aux-files/linux-libre/5.15-x86_64.conf \ |
| 488 | gnu/packages/aux-files/linux-libre/5.10-arm.conf \ |
| 489 | gnu/packages/aux-files/linux-libre/5.10-arm64.conf \ |
| 490 | gnu/packages/aux-files/linux-libre/5.10-i686.conf \ |
| 491 | gnu/packages/aux-files/linux-libre/5.10-x86_64.conf \ |
| 492 | gnu/packages/aux-files/ovmf/51-edk2-ovmf-2m-raw-x64-nosb.json \ |
| 493 | gnu/packages/aux-files/pack-audit.c \ |
| 494 | gnu/packages/aux-files/python/pytest_guix.py \ |
| 495 | gnu/packages/aux-files/python/sanity-check.py \ |
| 496 | gnu/packages/aux-files/python/sitecustomize.py \ |
| 497 | gnu/packages/aux-files/renpy/renpy.in \ |
| 498 | gnu/packages/aux-files/run-in-namespace.c \ |
| 499 | gnu/packages/aux-files/xml/patch-catalog-xml.xsl \ |
| 500 | gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml |
| 501 | |
| 502 | # Templates, examples. |
| 503 | EXAMPLES = \ |
| 504 | gnu/system/examples/bare-bones.tmpl \ |
| 505 | gnu/system/examples/bare-hurd.tmpl \ |
| 506 | gnu/system/examples/bare-hurd64.tmpl \ |
| 507 | gnu/system/examples/beaglebone-black.tmpl \ |
| 508 | gnu/system/examples/desktop.tmpl \ |
| 509 | gnu/system/examples/devel-hurd64.tmpl \ |
| 510 | gnu/system/examples/devel-hurd.tmpl \ |
| 511 | gnu/system/examples/lightweight-desktop.tmpl \ |
| 512 | gnu/system/examples/docker-image.tmpl \ |
| 513 | gnu/system/examples/plasma.tmpl \ |
| 514 | gnu/system/examples/raspberry-pi-64.tmpl \ |
| 515 | gnu/system/examples/raspberry-pi-64-nfs-root.tmpl \ |
| 516 | gnu/system/examples/vm-image.tmpl \ |
| 517 | gnu/system/examples/vm-image-efi.tmpl |
| 518 | |
| 519 | GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go) |
| 520 | |
| 521 | nobase_dist_guilemodule_DATA = \ |
| 522 | guix/d3.v3.js \ |
| 523 | guix/graph.js \ |
| 524 | guix/store/schema.sql \ |
| 525 | $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \ |
| 526 | $(MISC_DISTRO_FILES) |
| 527 | nobase_nodist_guilemodule_DATA = guix/config.scm |
| 528 | nobase_nodist_guileobject_DATA = $(GOBJECTS) |
| 529 | |
| 530 | # Handy way to remove the .go files without removing all the rest. |
| 531 | clean-go: |
| 532 | -$(RM) -f $(GOBJECTS) |
| 533 | @find . -path ./test-tmp -prune -o -name '*.go' -print | \ |
| 534 | if test -t 1; then \ |
| 535 | xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \ |
| 536 | else \ |
| 537 | xargs -r echo "warning: stray .go files:"; \ |
| 538 | fi |
| 539 | |
| 540 | |
| 541 | # Test extensions; has to be unconditional. |
| 542 | TEST_EXTENSIONS = .scm .sh |
| 543 | |
| 544 | if CAN_RUN_TESTS |
| 545 | |
| 546 | SCM_TESTS = \ |
| 547 | tests/accounts.scm \ |
| 548 | tests/base16.scm \ |
| 549 | tests/base32.scm \ |
| 550 | tests/base64.scm \ |
| 551 | tests/boot-parameters.scm \ |
| 552 | tests/bournish.scm \ |
| 553 | tests/builders.scm \ |
| 554 | tests/build-emacs-utils.scm \ |
| 555 | tests/build-utils.scm \ |
| 556 | tests/cache.scm \ |
| 557 | tests/challenge.scm \ |
| 558 | tests/channels.scm \ |
| 559 | tests/combinators.scm \ |
| 560 | tests/containers.scm \ |
| 561 | tests/cpio.scm \ |
| 562 | tests/cve.scm \ |
| 563 | tests/debug-link.scm \ |
| 564 | tests/derivations.scm \ |
| 565 | tests/discovery.scm \ |
| 566 | tests/file-systems.scm \ |
| 567 | tests/gexp.scm \ |
| 568 | tests/git.scm \ |
| 569 | tests/git-authenticate.scm \ |
| 570 | tests/glob.scm \ |
| 571 | tests/gnu-maintenance.scm \ |
| 572 | tests/grafts.scm \ |
| 573 | tests/graph.scm \ |
| 574 | tests/gremlin.scm \ |
| 575 | tests/import/composer.scm \ |
| 576 | tests/import/cpan.scm \ |
| 577 | tests/import/cran.scm \ |
| 578 | tests/import/crate.scm \ |
| 579 | tests/import/egg.scm \ |
| 580 | tests/import/elm.scm \ |
| 581 | tests/import/elpa.scm \ |
| 582 | tests/import/gem.scm \ |
| 583 | tests/import/git.scm \ |
| 584 | tests/import/github.scm \ |
| 585 | tests/import/hackage.scm \ |
| 586 | tests/import/hexpm.scm \ |
| 587 | tests/import/luanti.scm \ |
| 588 | tests/import/npm-binary.scm \ |
| 589 | tests/import/nuget.scm \ |
| 590 | tests/import/opam.scm \ |
| 591 | tests/import/print.scm \ |
| 592 | tests/import/pypi.scm \ |
| 593 | tests/import/texlive.scm \ |
| 594 | tests/import/utils.scm \ |
| 595 | tests/home-import.scm \ |
| 596 | tests/home-services.scm \ |
| 597 | tests/http-client.scm \ |
| 598 | tests/inferior.scm \ |
| 599 | tests/ipfs.scm \ |
| 600 | tests/ld-wrapper.scm \ |
| 601 | tests/lint.scm \ |
| 602 | tests/modules.scm \ |
| 603 | tests/monads.scm \ |
| 604 | tests/nar.scm \ |
| 605 | tests/networking.scm \ |
| 606 | tests/node.scm \ |
| 607 | tests/openpgp.scm \ |
| 608 | tests/packages.scm \ |
| 609 | tests/pack.scm \ |
| 610 | tests/pki.scm \ |
| 611 | tests/processes.scm \ |
| 612 | tests/profiles.scm \ |
| 613 | tests/publish.scm \ |
| 614 | tests/read-print.scm \ |
| 615 | tests/records.scm \ |
| 616 | tests/rpm.scm \ |
| 617 | tests/scripts.scm \ |
| 618 | tests/search-paths.scm \ |
| 619 | tests/services.scm \ |
| 620 | tests/services/file-sharing.scm \ |
| 621 | tests/services/configuration.scm \ |
| 622 | tests/services/lightdm.scm \ |
| 623 | tests/services/linux.scm \ |
| 624 | tests/services/pam-mount.scm \ |
| 625 | tests/services/telephony.scm \ |
| 626 | tests/services/vpn.scm \ |
| 627 | tests/sets.scm \ |
| 628 | tests/size.scm \ |
| 629 | tests/status.scm \ |
| 630 | tests/store-database.scm \ |
| 631 | tests/store-deadlock.scm \ |
| 632 | tests/store-deduplication.scm \ |
| 633 | tests/store-roots.scm \ |
| 634 | tests/store.scm \ |
| 635 | tests/substitute.scm \ |
| 636 | tests/swh.scm \ |
| 637 | tests/syscalls.scm \ |
| 638 | tests/system.scm \ |
| 639 | tests/style.scm \ |
| 640 | tests/toml.scm \ |
| 641 | tests/transformations.scm \ |
| 642 | tests/ui.scm \ |
| 643 | tests/union.scm \ |
| 644 | tests/upstream.scm \ |
| 645 | tests/utils.scm \ |
| 646 | tests/uuid.scm \ |
| 647 | tests/workers.scm |
| 648 | |
| 649 | if HAVE_GUILE_LIB |
| 650 | SCM_TESTS += tests/import/go.scm |
| 651 | else |
| 652 | EXTRA_DIST += tests/import/go.scm |
| 653 | endif |
| 654 | |
| 655 | if HAVE_GUILE_SSH |
| 656 | SCM_TESTS += tests/machine/hetzner.scm \ |
| 657 | tests/machine/hetzner/http.scm |
| 658 | else |
| 659 | EXTRA_DIST += tests/machine/hetzner.scm \ |
| 660 | tests/machine/hetzner/http.scm |
| 661 | endif |
| 662 | |
| 663 | if BUILD_DAEMON_OFFLOAD |
| 664 | SCM_TESTS += tests/offload.scm |
| 665 | else |
| 666 | EXTRA_DIST += tests/offload.scm |
| 667 | endif |
| 668 | |
| 669 | SH_TESTS = \ |
| 670 | tests/guix-build.sh \ |
| 671 | tests/guix-build-branch.sh \ |
| 672 | tests/guix-download.sh \ |
| 673 | tests/guix-gc.sh \ |
| 674 | tests/guix-git-authenticate.sh \ |
| 675 | tests/guix-hash.sh \ |
| 676 | tests/guix-locate.sh \ |
| 677 | tests/guix-pack.sh \ |
| 678 | tests/guix-pack-localstatedir.sh \ |
| 679 | tests/guix-pack-relocatable.sh \ |
| 680 | tests/guix-package.sh \ |
| 681 | tests/guix-package-aliases.sh \ |
| 682 | tests/guix-package-net.sh \ |
| 683 | tests/guix-style.sh \ |
| 684 | tests/guix-system.sh \ |
| 685 | tests/guix-home.sh \ |
| 686 | tests/guix-archive.sh \ |
| 687 | tests/guix-authenticate.sh \ |
| 688 | tests/guix-environment.sh \ |
| 689 | tests/guix-environment-container.sh \ |
| 690 | tests/guix-refresh.sh \ |
| 691 | tests/guix-shell.sh \ |
| 692 | tests/guix-shell-export-manifest.sh \ |
| 693 | tests/guix-time-machine.sh \ |
| 694 | tests/guix-graph.sh \ |
| 695 | tests/guix-describe.sh \ |
| 696 | tests/guix-repl.sh \ |
| 697 | tests/guix-lint.sh |
| 698 | |
| 699 | TESTS = $(SCM_TESTS) $(SH_TESTS) |
| 700 | |
| 701 | AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0 |
| 702 | |
| 703 | SCM_LOG_DRIVER = \ |
| 704 | $(top_builddir)/test-env --quiet-stderr \ |
| 705 | $(GUILE) --no-auto-compile -e main \ |
| 706 | $(top_srcdir)/build-aux/test-driver.scm |
| 707 | |
| 708 | AM_SCM_LOG_DRIVER_FLAGS = --brief=yes |
| 709 | |
| 710 | SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL) |
| 711 | AM_SH_LOG_FLAGS = -x -e |
| 712 | |
| 713 | # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it |
| 714 | # could end up removing files from the store while they are being used by |
| 715 | # other instances of the daemon. |
| 716 | tests/guix-gc.log: \ |
| 717 | $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \ |
| 718 | $(SCM_TESTS:%.scm=%.log) |
| 719 | |
| 720 | else !CAN_RUN_TESTS |
| 721 | |
| 722 | TESTS = |
| 723 | SH_TESTS = |
| 724 | SCM_TESTS = |
| 725 | |
| 726 | # Automake always generates a 'check' target, so better not override it. |
| 727 | check-local: |
| 728 | @echo |
| 729 | @echo "Cannot run tests because file name limits would be exceeded." >&2 |
| 730 | @echo "Look for 'length' in the 'config.log' file for details." >&2 |
| 731 | @echo |
| 732 | @exit 1 |
| 733 | |
| 734 | endif !CAN_RUN_TESTS |
| 735 | |
| 736 | check-system: $(GOBJECTS) |
| 737 | $(AM_V_at)$(top_builddir)/pre-inst-env \ |
| 738 | guix build -m $(top_srcdir)/etc/manifests/system-tests.scm -K |
| 739 | |
| 740 | # Public keys used to sign substitutes. |
| 741 | dist_pkgdata_DATA = \ |
| 742 | etc/substitutes/berlin.guix.gnu.org.pub \ |
| 743 | etc/substitutes/ci.guix.gnu.org.pub \ |
| 744 | etc/substitutes/ci.guix.info.pub \ |
| 745 | etc/substitutes/bordeaux.guix.gnu.org.pub |
| 746 | |
| 747 | # Bash completion file. |
| 748 | dist_bashcompletion_DATA = etc/completion/bash/guix \ |
| 749 | etc/completion/bash/guix-daemon |
| 750 | |
| 751 | # Zsh completion file. |
| 752 | dist_zshcompletion_DATA = etc/completion/zsh/_guix |
| 753 | |
| 754 | # Fish completion file. |
| 755 | dist_fishcompletion_DATA = etc/completion/fish/guix.fish |
| 756 | |
| 757 | # SELinux policy |
| 758 | nodist_selinux_policy_DATA = etc/guix-daemon.cil |
| 759 | |
| 760 | # AppArmor profiles. |
| 761 | dist_apparmor_profile_DATA = \ |
| 762 | etc/apparmor.d/guix \ |
| 763 | etc/apparmor.d/guix-daemon |
| 764 | |
| 765 | nodist_apparmor_profile_tunables_DATA = \ |
| 766 | etc/apparmor.d/tunables/guix |
| 767 | |
| 768 | EXTRA_DIST += \ |
| 769 | .dir-locals.el \ |
| 770 | .guix-authorizations \ |
| 771 | .guix-channel \ |
| 772 | CODE-OF-CONDUCT \ |
| 773 | HACKING \ |
| 774 | ROADMAP \ |
| 775 | TODO \ |
| 776 | bootstrap \ |
| 777 | manifest.scm \ |
| 778 | build-aux/build-self.scm \ |
| 779 | build-aux/check-channel-news.scm \ |
| 780 | build-aux/check-final-inputs-self-contained.scm \ |
| 781 | build-aux/compile-all.scm \ |
| 782 | build-aux/compile-as-derivation.scm \ |
| 783 | build-aux/config.rpath \ |
| 784 | build-aux/convert-xref.scm \ |
| 785 | build-aux/cuirass/evaluate.scm \ |
| 786 | build-aux/extract-syscall-ranges.sh \ |
| 787 | build-aux/generate-authors.scm \ |
| 788 | build-aux/gitlog-to-changelog \ |
| 789 | build-aux/git-version-gen \ |
| 790 | build-aux/keep-only-translated.scm \ |
| 791 | build-aux/mdate-from-git.scm \ |
| 792 | build-aux/test-driver.scm \ |
| 793 | build-aux/update-NEWS.scm \ |
| 794 | build-aux/update-guix-package.scm \ |
| 795 | build-aux/xgettext.scm \ |
| 796 | doc/build.scm \ |
| 797 | etc/guix-install.sh \ |
| 798 | etc/historical-authorizations \ |
| 799 | etc/news.scm \ |
| 800 | etc/teams.scm \ |
| 801 | etc/manifests/disarchive.scm \ |
| 802 | etc/manifests/hurd.scm \ |
| 803 | etc/manifests/kernels.scm \ |
| 804 | etc/manifests/release-minimal.scm \ |
| 805 | etc/manifests/release-desktop.scm \ |
| 806 | etc/manifests/release-user-packages.scm \ |
| 807 | etc/manifests/source.scm \ |
| 808 | etc/manifests/system-tests.scm \ |
| 809 | etc/manifests/time-travel.scm \ |
| 810 | etc/manifests/ungraft.scm \ |
| 811 | etc/manifests/upgrade.scm \ |
| 812 | scripts/guix.in \ |
| 813 | tests/cve-sample.json \ |
| 814 | tests/keys/openpgp/civodul.pub \ |
| 815 | tests/keys/openpgp/dsa.pub \ |
| 816 | tests/keys/openpgp/ed25519-2.pub \ |
| 817 | tests/keys/openpgp/ed25519-2.sec \ |
| 818 | tests/keys/openpgp/ed25519-3.pub \ |
| 819 | tests/keys/openpgp/ed25519-3.sec \ |
| 820 | tests/keys/openpgp/ed25519.pub \ |
| 821 | tests/keys/openpgp/ed25519.sec \ |
| 822 | tests/keys/openpgp/rsa.pub \ |
| 823 | tests/keys/openpgp/signing-key.pub \ |
| 824 | tests/keys/openpgp/signing-key.sec \ |
| 825 | tests/test.drv \ |
| 826 | $(TESTS) |
| 827 | |
| 828 | if !BUILD_DAEMON_OFFLOAD |
| 829 | |
| 830 | EXTRA_DIST += \ |
| 831 | guix/scripts/offload.scm |
| 832 | |
| 833 | endif !BUILD_DAEMON_OFFLOAD |
| 834 | |
| 835 | |
| 836 | CLEANFILES = \ |
| 837 | $(bin_SCRIPTS) \ |
| 838 | $(GOBJECTS) \ |
| 839 | $(SCM_TESTS:tests/%.scm=%.log) |
| 840 | |
| 841 | # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if |
| 842 | # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in |
| 843 | # there that are newer than the local .scm files (for instance because the |
| 844 | # user ran 'make install' recently). When that happens, we end up loading |
| 845 | # those previously-installed .go files, which may be stale, thereby breaking |
| 846 | # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly |
| 847 | # stale files from ~/.cache/guile/ccache. |
| 848 | %.go: make-go ; @: |
| 849 | make-go: make-core-go make-packages-go make-system-go make-cli-go |
| 850 | |
| 851 | # Define a rule to build a subset of the .go files. |
| 852 | define guile-compilation-rule |
| 853 | |
| 854 | $(1): $(2) |
| 855 | $(AM_V_at)echo "Compiling Scheme modules..." ; \ |
| 856 | unset GUILE_LOAD_COMPILED_PATH ; \ |
| 857 | XDG_CACHE_HOME=/nowhere \ |
| 858 | host="$(4)" srcdir="$(top_srcdir)" \ |
| 859 | $(top_builddir)/pre-inst-env \ |
| 860 | $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \ |
| 861 | --no-auto-compile \ |
| 862 | -s "$(top_srcdir)"/build-aux/compile-all.scm \ |
| 863 | --total $(words $(MODULES)) \ |
| 864 | --completed $(3) \ |
| 865 | $$(filter %.scm,$$^) |
| 866 | |
| 867 | endef |
| 868 | |
| 869 | # Split compilation in several steps, each of which building a subset of |
| 870 | # $(MODULES). The main goal is to reduce peak memory consumption, as reported |
| 871 | # in <https://issues.guix.gnu.org/48963>. Each 'eval' call below creates a |
| 872 | # 'make-*-go' phony target that builds the corresponding subset. |
| 873 | |
| 874 | first_fifth := \ |
| 875 | gnu/packages/a% gnu/packages/b% gnu/packages/c% |
| 876 | |
| 877 | second_fifth := \ |
| 878 | gnu/packages/d% gnu/packages/e% gnu/packages/f% |
| 879 | |
| 880 | third_fifth := \ |
| 881 | gnu/packages/g% gnu/packages/h% gnu/packages/i% |
| 882 | |
| 883 | fourth_fifth := \ |
| 884 | gnu/packages/j% gnu/packages/k% gnu/packages/l% gnu/packages/m% \ |
| 885 | gnu/packages/n% gnu/packages/o% |
| 886 | |
| 887 | MODULES_CORE := guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES))) |
| 888 | MODULES_PACKAGES1 := $(filter $(first_fifth),$(MODULES)) |
| 889 | MODULES_PACKAGES2 := $(filter $(second_fifth),$(MODULES)) |
| 890 | MODULES_PACKAGES3 := $(filter $(third_fifth),$(MODULES)) |
| 891 | MODULES_PACKAGES4 := $(filter $(fourth_fifth),$(MODULES)) |
| 892 | MODULES_PACKAGES5 := $(filter-out $(first_fifth) $(second_fifth) \ |
| 893 | $(third_fifth) $(fourth_fifth), \ |
| 894 | $(filter gnu/packages/%,$(MODULES))) |
| 895 | MODULES_PACKAGES := $(MODULES_PACKAGES1) $(MODULES_PACKAGES2) \ |
| 896 | $(MODULES_PACKAGES3) $(MODULES_PACKAGES4) \ |
| 897 | $(MODULES_PACKAGES5) |
| 898 | MODULES_SYSTEM := gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES))) |
| 899 | MODULES_CLI := $(filter guix/scripts/%,$(MODULES)) |
| 900 | MODULES_PO := guix/build/po.scm |
| 901 | |
| 902 | $(eval $(call guile-compilation-rule,make-core-go, \ |
| 903 | $(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \ |
| 904 | 0,$(host))) |
| 905 | .PHONY: make-core-go |
| 906 | |
| 907 | $(eval $(call guile-compilation-rule,make-packages1-go, \ |
| 908 | $(MODULES_PACKAGES1) make-core-go, \ |
| 909 | $(words $(MODULES_CORE)),$(host))) |
| 910 | .PHONY: make-packages1-go |
| 911 | |
| 912 | $(eval $(call guile-compilation-rule,make-packages2-go, \ |
| 913 | $(MODULES_PACKAGES2) make-core-go make-packages1-go, \ |
| 914 | $(words $(MODULES_CORE) $(MODULES_PACKAGES1)),$(host))) |
| 915 | .PHONY: make-packages2-go |
| 916 | |
| 917 | $(eval $(call guile-compilation-rule,make-packages3-go, \ |
| 918 | $(MODULES_PACKAGES3) make-core-go make-packages1-go make-packages2-go, \ |
| 919 | $(words $(MODULES_CORE) $(MODULES_PACKAGES1) $(MODULES_PACKAGES2)),$(host))) |
| 920 | .PHONY: make-packages3-go |
| 921 | |
| 922 | $(eval $(call guile-compilation-rule,make-packages4-go, \ |
| 923 | $(MODULES_PACKAGES4) make-core-go make-packages1-go make-packages2-go \ |
| 924 | make-packages3-go, \ |
| 925 | $(words $(MODULES_CORE) $(MODULES_PACKAGES1) $(MODULES_PACKAGES2) \ |
| 926 | $(MODULES_PACKAGES3)),$(host))) |
| 927 | .PHONY: make-packages4-go |
| 928 | |
| 929 | $(eval $(call guile-compilation-rule,make-packages5-go, \ |
| 930 | $(MODULES_PACKAGES5) make-core-go make-packages1-go make-packages2-go \ |
| 931 | make-packages3-go make-packages4-go, \ |
| 932 | $(words $(MODULES_CORE) $(MODULES_PACKAGES1) $(MODULES_PACKAGES2) \ |
| 933 | $(MODULES_PACKAGES3) $(MODULES_PACKAGES4)),$(host))) |
| 934 | .PHONY: make-packages5-go |
| 935 | |
| 936 | make-packages-go: make-packages1-go make-packages2-go \ |
| 937 | make-packages3-go make-packages4-go make-packages5-go |
| 938 | .PHONY: make-packages-go |
| 939 | |
| 940 | $(eval $(call guile-compilation-rule,make-system-go, \ |
| 941 | $(MODULES_SYSTEM) make-packages-go make-core-go, \ |
| 942 | $(words $(MODULES_CORE) $(MODULES_PACKAGES)),$(host))) |
| 943 | .PHONY: make-system-go |
| 944 | |
| 945 | $(eval $(call guile-compilation-rule,make-cli-go, \ |
| 946 | $(MODULES_CLI) make-system-go make-packages-go make-core-go, \ |
| 947 | $(words $(MODULES_CORE) $(MODULES_PACKAGES) $(MODULES_SYSTEM)),$(host))) |
| 948 | .PHONY: make-cli-go |
| 949 | |
| 950 | $(eval $(call guile-compilation-rule,guix/build/po.go, \ |
| 951 | $(MODULES_PO), \ |
| 952 | 0,$(build))) |
| 953 | |
| 954 | SUFFIXES = .go |
| 955 | |
| 956 | # Make sure source files are installed first, so that the mtime of |
| 957 | # installed compiled files is greater than that of installed source |
| 958 | # files. See |
| 959 | # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> |
| 960 | # for details. |
| 961 | guix_install_go_files = install-nobase_nodist_guileobjectDATA |
| 962 | $(guix_install_go_files): install-nobase_dist_guilemoduleDATA |
| 963 | |
| 964 | # The above trick doesn't work for 'config.go' because both 'config.scm' and |
| 965 | # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it |
| 966 | # special treatment. |
| 967 | install-data-hook: |
| 968 | touch "$(DESTDIR)$(guileobjectdir)/guix/config.go" |
| 969 | |
| 970 | # Assuming Guix is already installed and the daemon is up and running, this |
| 971 | # rule builds from $(srcdir), creating and building derivations. |
| 972 | as-derivation: |
| 973 | $(AM_V_at)echo "Building Guix in Guix..." ; \ |
| 974 | $(GUILE) --no-auto-compile \ |
| 975 | "$(top_srcdir)/build-aux/compile-as-derivation.scm" \ |
| 976 | "$(abs_top_srcdir)" |
| 977 | |
| 978 | SUBDIRS = po/guix po/packages |
| 979 | BUILT_SOURCES = |
| 980 | |
| 981 | include doc/local.mk |
| 982 | |
| 983 | if BUILD_DAEMON |
| 984 | |
| 985 | include nix/local.mk |
| 986 | |
| 987 | endif BUILD_DAEMON |
| 988 | |
| 989 | ACLOCAL_AMFLAGS = -I m4 |
| 990 | |
| 991 | # Pass an explicit '--localstatedir' so that configure does not error out if |
| 992 | # it finds an existing installation with a different localstatedir. Inherit |
| 993 | # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to |
| 994 | # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short |
| 995 | # enough for shebangs. |
| 996 | AM_DISTCHECK_CONFIGURE_FLAGS = \ |
| 997 | --localstatedir="$$dc_install_base/var" \ |
| 998 | --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \ |
| 999 | --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \ |
| 1000 | --enable-daemon \ |
| 1001 | ac_cv_guix_test_root="$(GUIX_TEST_ROOT)" |
| 1002 | |
| 1003 | # The self-contained tarball. |
| 1004 | guix-binary.%.tar.xz: |
| 1005 | $(AM_V_GEN)GUIX_PACKAGE_PATH= \ |
| 1006 | tarball=`$(top_builddir)/pre-inst-env guix pack -C xz \ |
| 1007 | --fallback \ |
| 1008 | -s "$*" --localstatedir --profile-name=current-guix \ |
| 1009 | guix` ; \ |
| 1010 | cp "$$tarball" "[email protected]" ; mv "[email protected]" "$@" |
| 1011 | |
| 1012 | # The `dist' target has other dependencies when building from Git |
| 1013 | # to assert and achieve reproducibility. |
| 1014 | if in_git_p |
| 1015 | |
| 1016 | # The dependency on dist-doc-pot-update is to clean possibly stale doc and po |
| 1017 | # files and only then generate the .pot files, which are not checked in. |
| 1018 | dist: dist-doc-pot-update |
| 1019 | dist-doc-pot-update: auto-clean |
| 1020 | $(MAKE) guile$(EXEEXT) |
| 1021 | $(MAKE) -C po/guix all |
| 1022 | $(MAKE) -C po/packages all |
| 1023 | $(MAKE) doc-pot-update |
| 1024 | |
| 1025 | dist-hook: gen-ChangeLog gen-AUTHORS |
| 1026 | |
| 1027 | # Assert that Autotools cache is up to date with Git, by checking |
| 1028 | # PACKAGE_VERSION against HEAD. Indented to get past Automake. |
| 1029 | ifeq ($(MAKECMDGOALS),dist) |
| 1030 | git_version = $(shell build-aux/git-version-gen .tarball-version) |
| 1031 | ifneq ($(PACKAGE_VERSION),$(git_version)) |
| 1032 | $(warning Autotools cache out of date.) |
| 1033 | $(info Autotools cache version: $(PACKAGE_VERSION).) |
| 1034 | $(info Git version: $(git_version).) |
| 1035 | $(info Please run ./bootstrap && ./configure $(DIST_CONFIGURE_FLAGS)) |
| 1036 | ifneq ($(GUIX_ALLOW_IRREPRODUCIBLE_TARBALL),yes) |
| 1037 | $(error Cannot create reproducible tarball) |
| 1038 | else |
| 1039 | $(warning Tarball will be irreproducible; distdir will not get removed!) |
| 1040 | endif # !GUIX_ALLOW_IRREPRODUCIBLE_TARBALL |
| 1041 | endif # PACKAGE_VERSION != git_version |
| 1042 | endif # MAKECMDGOALS dist |
| 1043 | |
| 1044 | else # !in_git_p |
| 1045 | |
| 1046 | dist: doc-pot-update |
| 1047 | |
| 1048 | ifeq ($(MAKECMDGOALS),dist) |
| 1049 | $(warning Not using Git, tarball will likely be irreproducible!) |
| 1050 | endif # MAKECMDGOALS dist |
| 1051 | endif # !in_git_p |
| 1052 | |
| 1053 | dist-hook: gen-tarball-version |
| 1054 | dist-hook: assert-no-store-file-names |
| 1055 | |
| 1056 | distcheck-hook: assert-binaries-available assert-final-inputs-self-contained |
| 1057 | |
| 1058 | EXTRA_DIST += $(top_srcdir)/.version |
| 1059 | BUILT_SOURCES += $(top_srcdir)/.version |
| 1060 | $(top_srcdir)/.version: config.status |
| 1061 | $(AM_V_GEN)echo $(VERSION) > "$@-t" && mv "$@-t" "$@" |
| 1062 | |
| 1063 | gen-tarball-version: |
| 1064 | echo $(VERSION) > "$(distdir)/.tarball-version" |
| 1065 | echo $(SOURCE_DATE_EPOCH) > $(distdir)/.tarball-timestamp |
| 1066 | |
| 1067 | gen-ChangeLog: |
| 1068 | $(AM_V_GEN)set -e; \ |
| 1069 | export LC_ALL=en_US.UTF-8; \ |
| 1070 | export TZ=UTC0; \ |
| 1071 | $(top_srcdir)/build-aux/gitlog-to-changelog \ |
| 1072 | > $(distdir)/ChangeLog.tmp; \ |
| 1073 | rm -f $(distdir)/ChangeLog; \ |
| 1074 | mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; |
| 1075 | |
| 1076 | gen-AUTHORS: |
| 1077 | $(AM_V_GEN)set -e; \ |
| 1078 | rm -f "$(distdir)/AUTHORS"; \ |
| 1079 | export LC_ALL=en_US.UTF-8; \ |
| 1080 | export TZ=UTC0; \ |
| 1081 | $(top_builddir)/pre-inst-env "$(GUILE)" \ |
| 1082 | "$(top_srcdir)/build-aux/generate-authors.scm" \ |
| 1083 | "$(top_srcdir)" "$(distdir)/AUTHORS"; |
| 1084 | |
| 1085 | # Like 'dist', but regenerate 'configure' so we get an up-to-date |
| 1086 | # 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to |
| 1087 | # do that whenever a 'dist' target is used.) |
| 1088 | dist-with-updated-version: |
| 1089 | @echo "Running './bootstrap' for new version string..." |
| 1090 | $(top_srcdir)/bootstrap |
| 1091 | $(MAKE) $(AM_MAKEFLAGS) $(top_srcdir)/.version dist |
| 1092 | |
| 1093 | .PHONY: dist-with-updated-version |
| 1094 | |
| 1095 | |
| 1096 | # |
| 1097 | # Release management. |
| 1098 | # |
| 1099 | |
| 1100 | # Reproducible tarball |
| 1101 | override GZIP_ENV = --best --no-name |
| 1102 | # Be friendly to Debian; avoid using EPOCH |
| 1103 | override am__tar = $${TAR-tar} \ |
| 1104 | --format=ustar \ |
| 1105 | --sort=name \ |
| 1106 | --mode=go=rX,u+rw,a-s \ |
| 1107 | --mtime=@$$(cat "$$tardir"/.tarball-timestamp) \ |
| 1108 | --owner=0 --group=0 --numeric-owner \ |
| 1109 | -cf - \ |
| 1110 | "$$tardir" |
| 1111 | |
| 1112 | releasedir = release-$(PACKAGE_VERSION) |
| 1113 | |
| 1114 | PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) |
| 1115 | |
| 1116 | # List of source tarballs produced. This must be kept in sync with the |
| 1117 | # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'. |
| 1118 | SOURCE_TARBALLS = \ |
| 1119 | $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext)) |
| 1120 | |
| 1121 | # Systems supported by Guix. |
| 1122 | SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \ |
| 1123 | powerpc64le-linux riscv64-linux |
| 1124 | |
| 1125 | # Guix binary tarballs. |
| 1126 | BINARY_TARBALLS = \ |
| 1127 | $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz) |
| 1128 | |
| 1129 | # Systems supported by the Guix System installer. |
| 1130 | # A Hurd install happens from a Linux installer image. |
| 1131 | GUIX_SYSTEM_INSTALLER_SYSTEMS ?= x86_64-linux i686-linux |
| 1132 | |
| 1133 | # Systems for which we build Guix VMs. |
| 1134 | GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux |
| 1135 | |
| 1136 | # Prefix of the Guix installation image file name. |
| 1137 | GUIX_SYSTEM_IMAGE_BASE = guix-system-install-$(PACKAGE_VERSION) |
| 1138 | |
| 1139 | # Prefix of the Guix VM image file name. |
| 1140 | GUIX_SYSTEM_VM_IMAGE_BASE = guix-system-vm-image-$(PACKAGE_VERSION) |
| 1141 | |
| 1142 | # Flags for 'guix system vm-image'. By default create a VM image that appears |
| 1143 | # to have a 20G hard disk. |
| 1144 | GUIX_SYSTEM_VM_IMAGE_FLAGS ?= --image-size=30G |
| 1145 | |
| 1146 | # Return the sequence of '-s' flags for the given systems. |
| 1147 | system_flags = $(foreach system,$(1),-s $(system)) |
| 1148 | |
| 1149 | # The release process works in several phases: |
| 1150 | # |
| 1151 | # 0. We assume the developer created a 'vX.Y.Z' tag. |
| 1152 | # 1. Build the source tarball. |
| 1153 | # 2. Update the 'guix' package so that it corresponds to the 'vX.Y.Z' tag. |
| 1154 | # 3. Build the binary tarballs for that 'guix' package. |
| 1155 | # 4. Update the 'guix' package again. |
| 1156 | # 5. Build the installation and VM images. The images will run 'guix' |
| 1157 | # corresponding to 'vX.Y.Z' + 1 commit, and they will install 'vX.Y.Z'. |
| 1158 | # |
| 1159 | # This is split into two targets, because a commit is made that has to be |
| 1160 | # pushed to Guix. |
| 1161 | # First, 'prepare-release' should be run, doing steps 1 and 2. |
| 1162 | # Then, the resulting commit should be pushed so that it's available |
| 1163 | # to be downloaded for the system images. |
| 1164 | # Afterwards, the 'release' target takes care of the rest. This 'release' |
| 1165 | # target takes care of everything and copies the resulting files to |
| 1166 | # $(releasedir). |
| 1167 | # |
| 1168 | # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext |
| 1169 | # issue described at <https://savannah.gnu.org/bugs/index.php?51027>. |
| 1170 | prepare-release: dist-with-updated-version all |
| 1171 | @if ! git diff-index --quiet HEAD; then \ |
| 1172 | echo "There are uncommitted changes; stopping." >&2 ; \ |
| 1173 | exit 1 ; \ |
| 1174 | fi |
| 1175 | $(MKDIR_P) "$(releasedir)" |
| 1176 | rm -f "$(releasedir)"/* |
| 1177 | mv $(SOURCE_TARBALLS) "$(releasedir)" |
| 1178 | # Bump the Guix package version and build it. |
| 1179 | GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \ |
| 1180 | $(top_builddir)/pre-inst-env "$(GUILE)" \ |
| 1181 | $(top_srcdir)/build-aux/update-guix-package.scm \ |
| 1182 | "`git rev-parse HEAD`" "$(PACKAGE_VERSION)" |
| 1183 | git add $(top_srcdir)/gnu/packages/package-management.scm |
| 1184 | git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)." |
| 1185 | $(top_builddir)/pre-inst-env guix build guix \ |
| 1186 | $(call system_flags,$(SUPPORTED_SYSTEMS)) \ |
| 1187 | -v1 --no-grafts --fallback |
| 1188 | |
| 1189 | @echo |
| 1190 | @echo "First step done! Source tarball is ready in $(releasedir)" |
| 1191 | @echo "Now push the resulting commit and run `make release`." |
| 1192 | @echo |
| 1193 | |
| 1194 | # Make sure you've ran prepare-release prior to running release and pushed |
| 1195 | # the commit to Guix. It might be pushed to any branch, such as version-X.Y.Z. |
| 1196 | release: all |
| 1197 | # Build the artifacts for current commit. |
| 1198 | # Use time-machine for provenance. |
| 1199 | $(MKDIR_P) "$(releasedir)" |
| 1200 | @echo "Building guix inferior for current commit." |
| 1201 | COMMIT="$$(git rev-parse HEAD)" && \ |
| 1202 | GUIX="$$(guix time-machine -q --commit=$$COMMIT)/bin/guix" && \ |
| 1203 | echo "Building artifacts for current commit: $$COMMIT." && \ |
| 1204 | ARTIFACTS="$$($$GUIX build --no-grafts \ |
| 1205 | -f ./etc/teams/release/artifacts.scm)" && \ |
| 1206 | echo "Artifacts built! Copying to $(releasedir)" && \ |
| 1207 | cp -f "$$ARTIFACTS"/* "$(releasedir)" |
| 1208 | @echo |
| 1209 | @echo "Congratulations! All the release files are now in $(releasedir)." |
| 1210 | @echo |
| 1211 | |
| 1212 | update-guix-package: |
| 1213 | git rev-parse HEAD |
| 1214 | $(top_builddir)/pre-inst-env "$(GUILE)" \ |
| 1215 | $(top_srcdir)/build-aux/update-guix-package.scm \ |
| 1216 | "`git rev-parse HEAD`" |
| 1217 | |
| 1218 | # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>. |
| 1219 | # Package data from this checkout is used by 'update-NEWS.scm'. |
| 1220 | GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance |
| 1221 | |
| 1222 | update-NEWS: $(GOBJECTS) |
| 1223 | $(top_builddir)/pre-inst-env "$(GUILE)" \ |
| 1224 | $(top_srcdir)/build-aux/update-NEWS.scm \ |
| 1225 | $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data" |
| 1226 | |
| 1227 | # Make sure we're not shipping a file that embeds a local /gnu/store file name. |
| 1228 | assert-no-store-file-names: |
| 1229 | $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \ |
| 1230 | --exclude=*.info-[0-9] --exclude=*.dot \ |
| 1231 | --exclude=*.eps --exclude-dir=bootstrap \ |
| 1232 | --exclude=guix-manual.pot --exclude=guix-manual.*.po \ |
| 1233 | --exclude=guix-cookbook.pot --exclude=guix-cookbook.*.po \ |
| 1234 | --exclude=guix-prettify.el \ |
| 1235 | --exclude=ChangeLog* \ |
| 1236 | --exclude=binutils-boot-2.20*.patch \ |
| 1237 | -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \ |
| 1238 | then \ |
| 1239 | echo "error: store file names embedded in the distribution" >&2 ; \ |
| 1240 | exit 1 ; \ |
| 1241 | fi |
| 1242 | |
| 1243 | # Make sure installer substitutes are available. Check only the primary |
| 1244 | # server so that '--display-missing' doesn't print two lists. |
| 1245 | assert-binaries-available: $(GOBJECTS) |
| 1246 | $(AM_V_at)$(top_builddir)/pre-inst-env \ |
| 1247 | guix weather -m "$(top_srcdir)/etc/manifests/release-minimal.scm" \ |
| 1248 | -m "$(top_srcdir)/etc/manifests/release-desktop.scm" \ |
| 1249 | --substitute-urls="https://ci.guix.gnu.org" \ |
| 1250 | --display-missing |
| 1251 | |
| 1252 | # Make sure the final inputs don't refer to bootstrap tools. |
| 1253 | assert-final-inputs-self-contained: $(GOBJECTS) |
| 1254 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
| 1255 | "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm" |
| 1256 | |
| 1257 | # Validate channel news. |
| 1258 | check-channel-news: $(GOBJECTS) |
| 1259 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
| 1260 | "$(top_srcdir)/build-aux/check-channel-news.scm" |
| 1261 | |
| 1262 | # Compute the Cuirass jobs. |
| 1263 | cuirass-jobs: $(GOBJECTS) |
| 1264 | rm -rf "$@" |
| 1265 | $(AM_V_at)$(MKDIR_P) "$@" |
| 1266 | $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
| 1267 | "$(top_srcdir)/build-aux/cuirass/evaluate.scm" "$@" |
| 1268 | |
| 1269 | .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version |
| 1270 | .PHONY: assert-no-store-file-names assert-binaries-available |
| 1271 | .PHONY: assert-final-inputs-self-contained check-channel-news |
| 1272 | .PHONY: clean-go make-go as-derivation |
| 1273 | .PHONY: update-guix-package update-NEWS cuirass-jobs release |
| 1274 | |
| 1275 | if in_git_p |
| 1276 | # Git auto-configuration. |
| 1277 | GIT_CORE_HOOKS_PATH := $(shell git config --global core.hooksPath 2>/dev/null) |
| 1278 | GIT_HOOKS_DIR := $(shell git rev-parse --git-path hooks 2>/dev/null) |
| 1279 | GIT_CONFIG_FILE := $(shell git rev-parse --git-path config 2>/dev/null) |
| 1280 | |
| 1281 | # Produce a warning/hint in cases where the Guix-provided hooks won't be |
| 1282 | # installed. Need some empty variable trickery as Automake strips extra blank |
| 1283 | # lines for some reason. |
| 1284 | override EMPTY := |
| 1285 | define NL |
| 1286 | |
| 1287 | $(EMPTY) |
| 1288 | endef |
| 1289 | |
| 1290 | ifneq ($(GIT_CORE_HOOKS_PATH),) |
| 1291 | $(warning Not installing Guix-provided git hooks; global hooks path set$(NL)$\ |
| 1292 | Hint: unset global git hooks path) |
| 1293 | @ENDIF@ |
| 1294 | |
| 1295 | ifeq ($(GIT_HOOKS_DIR),) |
| 1296 | $(warning Not installing Guix-provided git hooks; hooks dir not found$(NL)$\ |
| 1297 | Hint: avoid containerized environment when using a git worktree) |
| 1298 | @ENDIF@ |
| 1299 | |
| 1300 | ifeq ($(GIT_CONFIG_FILE),) |
| 1301 | $(warning Not installing Guix-provided git configurations; \ |
| 1302 | git config file not found$(NL)$\ |
| 1303 | Hint: avoid containerized environment when using a git worktree) |
| 1304 | @ENDIF@ |
| 1305 | |
| 1306 | $(GIT_HOOKS_DIR): |
| 1307 | if [ -n "$(GIT_HOOKS_DIR)" ]; then mkdir -p "$@"; fi |
| 1308 | |
| 1309 | $(GIT_HOOKS_DIR)/%: etc/git/% | $(GIT_HOOKS_DIR)/ |
| 1310 | if [ -n "$(GIT_HOOKS_DIR)" ]; then cp "$<" "$@"; fi |
| 1311 | |
| 1312 | git_hooks_checks = [ -n "$(GIT_HOOKS_DIR)" ] && [ -z "$(GIT_CORE_HOOKS_PATH)" ] |
| 1313 | |
| 1314 | # Special-case the pre-push hook installation, to ensure it is always |
| 1315 | # up-to-date with its source. |
| 1316 | .PHONY: $(GIT_HOOKS_DIR)/pre-push |
| 1317 | $(GIT_HOOKS_DIR)/pre-push: etc/git/pre-push | $(GIT_HOOKS_DIR) |
| 1318 | @if $(git_hooks_checks); then \ |
| 1319 | cmp "--silent" "$<" "$@" || cp "$<" "$@"; \ |
| 1320 | fi |
| 1321 | |
| 1322 | $(GIT_CONFIG_FILE): etc/git/gitconfig |
| 1323 | if [ -n "$(GIT_CONFIG_FILE)" ]; then \ |
| 1324 | git config --fixed-value --replace-all include.path \ |
| 1325 | ../etc/git/gitconfig ../etc/git/gitconfig; \ |
| 1326 | fi |
| 1327 | |
| 1328 | # Convenience targets. |
| 1329 | GIT_HOOKS_SOURCE_FILES := $(shell find etc/git -type f -executable) |
| 1330 | .PHONY: git-config git-hooks invalidate-hooks |
| 1331 | git-hooks: $(addprefix $(GIT_HOOKS_DIR)/,$(notdir $(GIT_HOOKS_SOURCE_FILES))) |
| 1332 | git-config: $(GIT_CONFIG_FILE) git-hooks |
| 1333 | |
| 1334 | # The etc/git/ config files are not distributed and have no use when building |
| 1335 | # from a tarball. Do not add dependencies on these to *_DATA when building |
| 1336 | # from a tarball, as that breaks the build. |
| 1337 | nodist_noinst_DATA = \ |
| 1338 | $(GIT_HOOKS_DIR)/pre-push \ |
| 1339 | $(GIT_HOOKS_DIR)/post-merge \ |
| 1340 | $(GIT_CONFIG_FILE) |
| 1341 | endif |
| 1342 | |
| 1343 | # Downloading up-to-date PO files. |
| 1344 | |
| 1345 | WEBLATE_REPO = https://codeberg.org/guix/translations |
| 1346 | |
| 1347 | # Shallow clone the Git repository behind Weblate and copy files from it if |
| 1348 | # they contain at least one translation, and they are well-formed (Scheme |
| 1349 | # format only), warn otherwise. Copied files are converted to a canonical |
| 1350 | # form. Note: The files will be minified to reduce file size, except the |
| 1351 | # guix domain, because they are comparatively small and it would need more |
| 1352 | # comprehensive PO file parsing abilities for plural forms. |
| 1353 | download-po: guix/build/po.go |
| 1354 | dir=$$(mktemp -d); \ |
| 1355 | git clone --depth 1 "$(WEBLATE_REPO)" "$$dir/translations" && \ |
| 1356 | for domain in po/doc po/guix po/packages; do \ |
| 1357 | for po in "$$dir/translations/$$domain"/*.po; do \ |
| 1358 | translated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | cut -f1 -d' '); \ |
| 1359 | untranslated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | rev | cut -f3 -d' ' | rev); \ |
| 1360 | untranslated=$${untranslated:-0}; \ |
| 1361 | total=$$(($$translated+$$untranslated)); \ |
| 1362 | target=$$(basename "$$po"); \ |
| 1363 | target="$$domain/$$target"; \ |
| 1364 | msgfmt -c "$$po"; \ |
| 1365 | if msgfmt -c "$$po" && [ "$$translated" != "0" ] && ([ "$$domain" != "po/doc" ] || [ "$$translated" -gt $$(($$total/10)) ] || [ -f $$target ]); then \ |
| 1366 | if [ "$$domain" != "po/guix" ]; then \ |
| 1367 | $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \ |
| 1368 | --no-auto-compile \ |
| 1369 | -s "$(top_srcdir)"/build-aux/keep-only-translated.scm \ |
| 1370 | "$$po" > "$$po".tmp; \ |
| 1371 | else ln -s "$$po" "$$po".tmp; fi; \ |
| 1372 | msgconv --no-wrap -o "$$po".tmp2 "$$po".tmp; \ |
| 1373 | rm "$$po".tmp; \ |
| 1374 | mv "$$po".tmp2 "$$target"; \ |
| 1375 | echo "copied $$target."; \ |
| 1376 | else \ |
| 1377 | echo "WARN: $$target ($$translated translated messages ($$((translated/total*100))%)) was not added/updated."; \ |
| 1378 | fi; \ |
| 1379 | done; \ |
| 1380 | done; \ |
| 1381 | for po in po/doc/*.po; do \ |
| 1382 | translated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | cut -f1 -d' '); \ |
| 1383 | untranslated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | rev | cut -f3 -d' ' | rev); \ |
| 1384 | untranslated=$${untranslated:-0}; \ |
| 1385 | total=$$(($$translated + $$untranslated)); \ |
| 1386 | if [ "$$translated" -lt "$$(($$total/20))" ]; then \ |
| 1387 | echo "WARN: $$po was removed because it is below the 5% threshold: $$((translated/total*100))%"; \ |
| 1388 | rm $$po; \ |
| 1389 | fi; \ |
| 1390 | done; \ |
| 1391 | rm -rf "$$dir" |
| 1392 | .PHONY: download-po |
| 1393 | |
| 1394 | # Regenerate 'CODEOWNERS' when 'teams.scm' is modified so we don't forget. |
| 1395 | if in_git_p |
| 1396 | if !CROSS_COMPILING |
| 1397 | CODEOWNERS: etc/teams.scm scripts/guix |
| 1398 | ./etc/teams.scm codeowners > "[email protected]" |
| 1399 | mv "[email protected]" "$@" |
| 1400 | |
| 1401 | BUILT_SOURCES += CODEOWNERS |
| 1402 | endif |
| 1403 | endif |
| 1404 | ## -------------- ## |
| 1405 | ## Silent rules. ## |
| 1406 | ## -------------- ## |
| 1407 | |
| 1408 | AM_V_DL = $(AM_V_DL_$(V)) |
| 1409 | AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY)) |
| 1410 | AM_V_DL_0 = @echo " DL " $@; |
| 1411 | |
| 1412 | AM_V_DOT = $(AM_V_DOT_$(V)) |
| 1413 | AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY)) |
| 1414 | AM_V_DOT_0 = @echo " DOT " $@; |
| 1415 | |
| 1416 | AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V)) |
| 1417 | AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY)) |
| 1418 | AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@; |
| 1419 | |
| 1420 | AM_V_PO4A = $(AM_V_PO4A_$(V)) |
| 1421 | AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY)) |
| 1422 | AM_V_PO4A_0 = @echo " PO4A " $@; |
| 1423 | |
| 1424 | AM_V_POXREF = $(AM_V_POXREF_$(V)) |
| 1425 | AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY)) |
| 1426 | AM_V_POXREF_0 = @echo " POXREF " $@; |