Commit | Line | Data |
---|---|---|
233e7676 | 1 | # GNU Guix --- Functional package management for GNU |
10612d61 | 2 | # Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 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> |
cba386c1 | 5 | # Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org> |
274fa491 | 6 | # Copyright © 2016, 2017, 2018, 2019 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> |
205794c8 | 9 | # Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
59bcffa3 | 10 | # Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
3d0aa7f7 | 11 | # Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> |
3c986a7d | 12 | # Copyright © 2018 Nikita <nikita@n0.is> |
b9fe8fd6 | 13 | # Copyright © 2018 Julien Lepiller <julien@lepiller.eu> |
bba0fa24 | 14 | # Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> |
53f316ab | 15 | # Copyright © 2018 Alex Vong <alexvong1995@gmail.com> |
4e4c3114 | 16 | # Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> |
a16eb6c5 | 17 | # Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> |
af51c820 | 18 | # |
233e7676 | 19 | # This file is part of GNU Guix. |
af51c820 | 20 | # |
233e7676 | 21 | # GNU Guix is free software; you can redistribute it and/or modify it |
af51c820 LC |
22 | # under the terms of the GNU General Public License as published by |
23 | # the Free Software Foundation; either version 3 of the License, or (at | |
24 | # your option) any later version. | |
25 | # | |
233e7676 | 26 | # GNU Guix is distributed in the hope that it will be useful, but |
af51c820 LC |
27 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
28 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
29 | # GNU General Public License for more details. | |
30 | # | |
31 | # You should have received a copy of the GNU General Public License | |
233e7676 | 32 | # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
af51c820 | 33 | |
b9fe8fd6 JL |
34 | MSGMERGE_UPDATE = @MSGMERGE@ --update |
35 | ||
cba386c1 ML |
36 | bin_SCRIPTS = scripts/guix |
37 | ||
38 | # Handle substitution of fully-expanded Autoconf variables. | |
39 | do_subst = $(SED) \ | |
40 | -e 's,[@]GUILE[@],$(GUILE),g' \ | |
41 | -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \ | |
42 | -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \ | |
fd247542 | 43 | -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \ |
cba386c1 ML |
44 | -e 's,[@]localedir[@],$(localedir),g' |
45 | ||
46 | scripts/guix: scripts/guix.in Makefile | |
47 | $(AM_V_at)rm -f $@ $@-t | |
48 | $(AM_V_at)$(MKDIR_P) "$(@D)" | |
49 | $(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t" | |
50 | $(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@" | |
14a1c319 | 51 | |
880fe019 LC |
52 | # This is our variant of the 'guile' executable, one that doesn't complain |
53 | # about locales. | |
54 | pkglibexec_PROGRAMS = guile | |
55 | guile_SOURCES = gnu/packages/aux-files/guile-launcher.c | |
56 | guile_LDADD = $(GUILE_LIBS) | |
57 | guile_CFLAGS = $(GUILE_CFLAGS) | |
58 | ||
59 | # Have the 'guix' command refer to our 'guile'. | |
60 | install-exec-hook: | |
61 | $(SED) -i "$(DESTDIR)$(bindir)/guix" \ | |
62 | -e 's,^#![[:graph:]]\+,#!$(pkglibexecdir)/guile,g' | |
63 | ||
58867ae7 MW |
64 | nodist_noinst_SCRIPTS = \ |
65 | pre-inst-env \ | |
66 | test-env | |
67 | ||
4aabc8ea LC |
68 | # Modules that are not compiled but are installed nonetheless, such as |
69 | # build-side modules with unusual dependencies. | |
b8396f96 | 70 | MODULES_NOT_COMPILED = \ |
554b30d2 | 71 | guix/build/po.scm \ |
b8396f96 | 72 | guix/man-db.scm |
4aabc8ea | 73 | |
03d0e2d2 | 74 | include gnu/local.mk |
b9fe8fd6 | 75 | include po/doc/local.mk |
d516736c | 76 | |
af51c820 | 77 | MODULES = \ |
4c0c4db0 | 78 | guix/base16.scm \ |
ddc29a78 | 79 | guix/base32.scm \ |
e9c6c584 | 80 | guix/base64.scm \ |
6776af04 | 81 | guix/ci.scm \ |
7a18c3cc | 82 | guix/cpio.scm \ |
787da810 | 83 | guix/deprecation.scm \ |
6776af04 | 84 | guix/docker.scm \ |
c0cd1b3e | 85 | guix/records.scm \ |
43408e30 | 86 | guix/openpgp.scm \ |
8b420f74 | 87 | guix/pki.scm \ |
8c348825 | 88 | guix/progress.scm \ |
958dd3ce | 89 | guix/combinators.scm \ |
f9704f17 | 90 | guix/memoization.scm \ |
73fbb904 | 91 | guix/utils.scm \ |
d326767e | 92 | guix/sets.scm \ |
7ca87354 | 93 | guix/modules.scm \ |
de1355f1 | 94 | guix/download.scm \ |
cd903ef7 | 95 | guix/discovery.scm \ |
3feb8464 | 96 | guix/android-repo-download.scm \ |
4ac69ea1 | 97 | guix/bzr-download.scm \ |
9b5b5c17 | 98 | guix/git-download.scm \ |
c4e48b68 | 99 | guix/hg-download.scm \ |
de2bfe90 | 100 | guix/swh.scm \ |
b860f382 | 101 | guix/monads.scm \ |
b9b86078 | 102 | guix/monad-repl.scm \ |
21b679f6 | 103 | guix/gexp.scm \ |
cc4ecc2d | 104 | guix/profiles.scm \ |
0f41c26f LC |
105 | guix/serialization.scm \ |
106 | guix/nar.scm \ | |
681af174 | 107 | guix/narinfo.scm \ |
af51c820 | 108 | guix/derivations.scm \ |
7adf9b84 | 109 | guix/grafts.scm \ |
92a4087b | 110 | guix/repl.scm \ |
f68b3ba1 | 111 | guix/transformations.scm \ |
2ca299ca | 112 | guix/inferior.scm \ |
fe634eaf | 113 | guix/describe.scm \ |
20507347 | 114 | guix/quirks.scm \ |
0d39a3b9 | 115 | guix/channels.scm \ |
22189ed1 | 116 | guix/gnu-maintenance.scm \ |
eaae07ec | 117 | guix/self.scm \ |
112692c0 | 118 | guix/substitutes.scm \ |
0a7c5a09 | 119 | guix/upstream.scm \ |
838d78e3 | 120 | guix/licenses.scm \ |
f363c836 | 121 | guix/lint.scm \ |
f14c933d | 122 | guix/glob.scm \ |
7441f1db | 123 | guix/git.scm \ |
41f443c9 | 124 | guix/git-authenticate.scm \ |
8fb58371 | 125 | guix/graph.scm \ |
2ea2aac6 | 126 | guix/cache.scm \ |
0eef7551 | 127 | guix/cve.scm \ |
1563d6c7 | 128 | guix/workers.scm \ |
b18f45c2 | 129 | guix/ipfs.scm \ |
208f7cd1 | 130 | guix/build-system.scm \ |
436515cd | 131 | guix/build-system/android-ndk.scm \ |
5f7a1a4d | 132 | guix/build-system/ant.scm \ |
4b3cb7f4 | 133 | guix/build-system/cargo.scm \ |
64f032d7 | 134 | guix/build-system/chicken.scm \ |
1e5b79e5 | 135 | guix/build-system/clojure.scm \ |
c6bded8a | 136 | guix/build-system/cmake.scm \ |
65e862d1 | 137 | guix/build-system/dub.scm \ |
6e8986c8 | 138 | guix/build-system/dune.scm \ |
e9137a53 | 139 | guix/build-system/emacs.scm \ |
3d90fa98 | 140 | guix/build-system/font.scm \ |
91525b48 | 141 | guix/build-system/go.scm \ |
07c101e2 | 142 | guix/build-system/meson.scm \ |
88c8f247 | 143 | guix/build-system/minify.scm \ |
3df48515 | 144 | guix/build-system/minetest.scm \ |
a1b30f99 | 145 | guix/build-system/asdf.scm \ |
e90e6404 | 146 | guix/build-system/copy.scm \ |
be3425e5 | 147 | guix/build-system/glib-or-gtk.scm \ |
208f7cd1 | 148 | guix/build-system/gnu.scm \ |
2a3b1b32 | 149 | guix/build-system/guile.scm \ |
ce6fc7d6 | 150 | guix/build-system/haskell.scm \ |
a44a535e | 151 | guix/build-system/julia.scm \ |
ce631299 | 152 | guix/build-system/linux-module.scm \ |
55b90c90 | 153 | guix/build-system/maven.scm \ |
09a1f92f | 154 | guix/build-system/node.scm \ |
08fd1ebe | 155 | guix/build-system/perl.scm \ |
40506d5d | 156 | guix/build-system/python.scm \ |
e1bdab4f | 157 | guix/build-system/renpy.scm \ |
e6876cb9 | 158 | guix/build-system/ocaml.scm \ |
b6d852ce | 159 | guix/build-system/qt.scm \ |
a677c726 | 160 | guix/build-system/waf.scm \ |
f8f3bef6 | 161 | guix/build-system/r.scm \ |
4e4c3114 | 162 | guix/build-system/rakudo.scm \ |
c08f9818 | 163 | guix/build-system/ruby.scm \ |
3d0aa7f7 | 164 | guix/build-system/scons.scm \ |
205794c8 | 165 | guix/build-system/texlive.scm \ |
be13fbfa | 166 | guix/build-system/trivial.scm \ |
457dd86d | 167 | guix/ftp-client.scm \ |
3b8258c5 | 168 | guix/http-client.scm \ |
0fdd3bea | 169 | guix/gnupg.scm \ |
d5d16686 | 170 | guix/elf.scm \ |
03870da8 | 171 | guix/profiling.scm \ |
af51c820 | 172 | guix/store.scm \ |
89328d24 | 173 | guix/cvs-download.scm \ |
b3acf365 | 174 | guix/svn-download.scm \ |
5d9f9ad6 | 175 | guix/colors.scm \ |
37eed374 | 176 | guix/i18n.scm \ |
1b5ee3bd | 177 | guix/diagnostics.scm \ |
073c34d7 | 178 | guix/ui.scm \ |
dc0f74e5 | 179 | guix/status.scm \ |
436515cd | 180 | guix/build/android-ndk-build-system.scm \ |
5f7a1a4d | 181 | guix/build/ant-build-system.scm \ |
62cab99c | 182 | guix/build/download.scm \ |
37ce440d | 183 | guix/build/download-nar.scm \ |
4b3cb7f4 | 184 | guix/build/cargo-build-system.scm \ |
7d141788 | 185 | guix/build/cargo-utils.scm \ |
64f032d7 | 186 | guix/build/chicken-build-system.scm \ |
c6bded8a | 187 | guix/build/cmake-build-system.scm \ |
65e862d1 | 188 | guix/build/dub-build-system.scm \ |
6e8986c8 | 189 | guix/build/dune-build-system.scm \ |
e9137a53 | 190 | guix/build/emacs-build-system.scm \ |
07c101e2 | 191 | guix/build/meson-build-system.scm \ |
88c8f247 | 192 | guix/build/minify-build-system.scm \ |
3d90fa98 | 193 | guix/build/font-build-system.scm \ |
91525b48 | 194 | guix/build/go-build-system.scm \ |
3feb8464 | 195 | guix/build/android-repo.scm \ |
a1b30f99 | 196 | guix/build/asdf-build-system.scm \ |
4ac69ea1 | 197 | guix/build/bzr.scm \ |
e90e6404 | 198 | guix/build/copy-build-system.scm \ |
9b5b5c17 | 199 | guix/build/git.scm \ |
c4e48b68 | 200 | guix/build/hg.scm \ |
be3425e5 | 201 | guix/build/glib-or-gtk-build-system.scm \ |
9c9407f7 | 202 | guix/build/gnu-bootstrap.scm \ |
af51c820 | 203 | guix/build/gnu-build-system.scm \ |
fe12c345 | 204 | guix/build/gnu-dist.scm \ |
2a3b1b32 | 205 | guix/build/guile-build-system.scm \ |
55b90c90 | 206 | guix/build/maven-build-system.scm \ |
3df48515 | 207 | guix/build/minetest-build-system.scm \ |
09a1f92f | 208 | guix/build/node-build-system.scm \ |
08fd1ebe | 209 | guix/build/perl-build-system.scm \ |
40506d5d | 210 | guix/build/python-build-system.scm \ |
e6876cb9 | 211 | guix/build/ocaml-build-system.scm \ |
b6d852ce | 212 | guix/build/qt-build-system.scm \ |
f8f3bef6 | 213 | guix/build/r-build-system.scm \ |
e1bdab4f | 214 | guix/build/renpy-build-system.scm \ |
4e4c3114 | 215 | guix/build/rakudo-build-system.scm \ |
c08f9818 | 216 | guix/build/ruby-build-system.scm \ |
3d0aa7f7 | 217 | guix/build/scons-build-system.scm \ |
205794c8 | 218 | guix/build/texlive-build-system.scm \ |
a677c726 | 219 | guix/build/waf-build-system.scm \ |
9fd6c2ba | 220 | guix/build/haskell-build-system.scm \ |
a44a535e | 221 | guix/build/julia-build-system.scm \ |
ce631299 | 222 | guix/build/linux-module-build-system.scm \ |
6fd1a796 | 223 | guix/build/store-copy.scm \ |
a4bb1892 | 224 | guix/build/json.scm \ |
7708c0b5 | 225 | guix/build/pack.scm \ |
1273d44a | 226 | guix/build/utils.scm \ |
c8c88afa | 227 | guix/build/union.scm \ |
611adb1e | 228 | guix/build/profiles.scm \ |
2890ad33 | 229 | guix/build/compile.scm \ |
3309e3a1 | 230 | guix/build/rpath.scm \ |
89328d24 | 231 | guix/build/cvs.scm \ |
b3acf365 | 232 | guix/build/svn.scm \ |
875715ca | 233 | guix/build/syscalls.scm \ |
15aa2c38 | 234 | guix/build/gremlin.scm \ |
93c33389 | 235 | guix/build/debug-link.scm \ |
1e5b79e5 | 236 | guix/build/clojure-build-system.scm \ |
53f316ab | 237 | guix/build/clojure-utils.scm \ |
75f3b1a1 | 238 | guix/build/emacs-utils.scm \ |
59135f0d | 239 | guix/build/java-utils.scm \ |
a1b30f99 | 240 | guix/build/lisp-utils.scm \ |
3d3bc413 JL |
241 | guix/build/maven/java.scm \ |
242 | guix/build/maven/plugin.scm \ | |
243 | guix/build/maven/pom.scm \ | |
fb59e275 | 244 | guix/build/graft.scm \ |
f2e4805b | 245 | guix/build/bournish.scm \ |
2098d024 | 246 | guix/build/qt-utils.scm \ |
f13f60cb | 247 | guix/build/make-bootstrap.scm \ |
e89431bf | 248 | guix/search-paths.scm \ |
e3ce5d70 | 249 | guix/packages.scm \ |
a4154748 | 250 | guix/import/cabal.scm \ |
6776af04 | 251 | guix/import/cpan.scm \ |
e1248602 | 252 | guix/import/cran.scm \ |
6776af04 | 253 | guix/import/crate.scm \ |
bdc298ec | 254 | guix/import/egg.scm \ |
7f74a931 | 255 | guix/import/elpa.scm \ |
6776af04 EB |
256 | guix/import/gem.scm \ |
257 | guix/import/github.scm \ | |
258 | guix/import/gnome.scm \ | |
259 | guix/import/gnu.scm \ | |
02e2e093 | 260 | guix/import/go.scm \ |
6776af04 EB |
261 | guix/import/hackage.scm \ |
262 | guix/import/json.scm \ | |
d1dce0c3 | 263 | guix/import/kde.scm \ |
ae031d45 | 264 | guix/import/launchpad.scm \ |
467e874a | 265 | guix/import/minetest.scm \ |
6776af04 EB |
266 | guix/import/opam.scm \ |
267 | guix/import/print.scm \ | |
268 | guix/import/pypi.scm \ | |
6776af04 | 269 | guix/import/stackage.scm \ |
afbc9419 | 270 | guix/import/texlive.scm \ |
6776af04 | 271 | guix/import/utils.scm \ |
88981dd3 | 272 | guix/scripts.scm \ |
de1355f1 | 273 | guix/scripts/download.scm \ |
94d92c77 | 274 | guix/scripts/perform-download.scm \ |
de1355f1 | 275 | guix/scripts/build.scm \ |
760c60d6 | 276 | guix/scripts/archive.scm \ |
de1355f1 LC |
277 | guix/scripts/import.scm \ |
278 | guix/scripts/package.scm \ | |
d824cfba LC |
279 | guix/scripts/install.scm \ |
280 | guix/scripts/remove.scm \ | |
281 | guix/scripts/upgrade.scm \ | |
da56f109 | 282 | guix/scripts/search.scm \ |
aeb51370 | 283 | guix/scripts/show.scm \ |
de1355f1 LC |
284 | guix/scripts/gc.scm \ |
285 | guix/scripts/hash.scm \ | |
239c2266 | 286 | guix/scripts/pack.scm \ |
de1355f1 | 287 | guix/scripts/pull.scm \ |
63eb2b89 | 288 | guix/scripts/processes.scm \ |
2c74fde0 | 289 | guix/scripts/substitute.scm \ |
526382ff | 290 | guix/scripts/authenticate.scm \ |
de1355f1 | 291 | guix/scripts/refresh.scm \ |
2ca299ca | 292 | guix/scripts/repl.scm \ |
bd747018 | 293 | guix/scripts/describe.scm \ |
523e4896 | 294 | guix/scripts/system.scm \ |
0649321d | 295 | guix/scripts/system/search.scm \ |
5c793753 | 296 | guix/scripts/system/reconfigure.scm \ |
b4f5e0e8 | 297 | guix/scripts/lint.scm \ |
d23c20f1 | 298 | guix/scripts/challenge.scm \ |
6776af04 | 299 | guix/scripts/import/crate.scm \ |
e1248602 | 300 | guix/scripts/import/cran.scm \ |
bdc298ec | 301 | guix/scripts/import/egg.scm \ |
6776af04 EB |
302 | guix/scripts/import/elpa.scm \ |
303 | guix/scripts/import/gem.scm \ | |
7047133f | 304 | guix/scripts/import/gnu.scm \ |
02e2e093 | 305 | guix/scripts/import/go.scm \ |
a4154748 | 306 | guix/scripts/import/hackage.scm \ |
6776af04 | 307 | guix/scripts/import/json.scm \ |
467e874a | 308 | guix/scripts/import/minetest.scm \ |
6776af04 EB |
309 | guix/scripts/import/opam.scm \ |
310 | guix/scripts/import/pypi.scm \ | |
311 | guix/scripts/import/stackage.scm \ | |
afbc9419 | 312 | guix/scripts/import/texlive.scm \ |
372c4bbc | 313 | guix/scripts/environment.scm \ |
aff8ce7c | 314 | guix/scripts/publish.scm \ |
39bee8a2 | 315 | guix/scripts/edit.scm \ |
fcc58db6 | 316 | guix/scripts/size.scm \ |
a9871278 LC |
317 | guix/scripts/git.scm \ |
318 | guix/scripts/git/authenticate.scm \ | |
88856916 | 319 | guix/scripts/graph.scm \ |
6776af04 | 320 | guix/scripts/weather.scm \ |
32efa254 DT |
321 | guix/scripts/container.scm \ |
322 | guix/scripts/container/exec.scm \ | |
5cbb832f | 323 | guix/scripts/deploy.scm \ |
f675f8de | 324 | guix/scripts/time-machine.scm \ |
e3ce5d70 | 325 | guix.scm \ |
d516736c | 326 | $(GNU_SYSTEM_MODULES) |
af51c820 | 327 | |
987a29ba LC |
328 | if HAVE_GUILE_SSH |
329 | ||
330 | MODULES += \ | |
f11c444d | 331 | guix/ssh.scm \ |
9d8ab803 | 332 | guix/remote.scm \ |
285f63e8 LC |
333 | guix/scripts/copy.scm \ |
334 | guix/store/ssh.scm | |
987a29ba LC |
335 | |
336 | endif HAVE_GUILE_SSH | |
337 | ||
35a32fef MO |
338 | if HAVE_GUILE_AVAHI |
339 | ||
340 | MODULES += \ | |
341 | guix/avahi.scm \ | |
342 | guix/scripts/discover.scm | |
343 | ||
344 | endif HAVE_GUILE_AVAHI | |
345 | ||
49e6291a LC |
346 | if BUILD_DAEMON_OFFLOAD |
347 | ||
348 | MODULES += \ | |
349 | guix/scripts/offload.scm | |
350 | ||
351 | endif BUILD_DAEMON_OFFLOAD | |
352 | ||
7f9d184d CR |
353 | # Scheme implementation of the build daemon and related functionality. |
354 | STORE_MODULES = \ | |
bf5bf577 | 355 | guix/store/database.scm \ |
72eda062 LC |
356 | guix/store/deduplication.scm \ |
357 | guix/store/roots.scm | |
7f9d184d | 358 | |
7f9d184d | 359 | MODULES += $(STORE_MODULES) |
7f9d184d | 360 | |
17ab08bc | 361 | # Internal modules with test suite support. |
873f6f13 LC |
362 | dist_noinst_DATA = \ |
363 | guix/tests.scm \ | |
364 | guix/tests/http.scm \ | |
c83eedba LC |
365 | guix/tests/git.scm \ |
366 | guix/tests/gnupg.scm | |
c1bc358f | 367 | |
7994250f AK |
368 | # Auxiliary files for packages. |
369 | AUX_FILES = \ | |
a7e70ec2 | 370 | gnu/packages/aux-files/chromium/master-preferences.json \ |
59d04f63 | 371 | gnu/packages/aux-files/emacs/guix-emacs.el \ |
53b51b44 | 372 | gnu/packages/aux-files/guix.vim \ |
627db561 LF |
373 | gnu/packages/aux-files/linux-libre/5.13-arm.conf \ |
374 | gnu/packages/aux-files/linux-libre/5.13-arm64.conf \ | |
375 | gnu/packages/aux-files/linux-libre/5.13-i686.conf \ | |
376 | gnu/packages/aux-files/linux-libre/5.13-x86_64.conf \ | |
66b5bc31 LF |
377 | gnu/packages/aux-files/linux-libre/5.10-arm.conf \ |
378 | gnu/packages/aux-files/linux-libre/5.10-arm64.conf \ | |
379 | gnu/packages/aux-files/linux-libre/5.10-i686.conf \ | |
380 | gnu/packages/aux-files/linux-libre/5.10-x86_64.conf \ | |
952820c5 | 381 | gnu/packages/aux-files/linux-libre/5.4-arm.conf \ |
952820c5 MW |
382 | gnu/packages/aux-files/linux-libre/5.4-arm64.conf \ |
383 | gnu/packages/aux-files/linux-libre/5.4-i686.conf \ | |
384 | gnu/packages/aux-files/linux-libre/5.4-x86_64.conf \ | |
ce7ceef3 MW |
385 | gnu/packages/aux-files/linux-libre/4.19-arm.conf \ |
386 | gnu/packages/aux-files/linux-libre/4.19-arm64.conf \ | |
387 | gnu/packages/aux-files/linux-libre/4.19-i686.conf \ | |
388 | gnu/packages/aux-files/linux-libre/4.19-x86_64.conf \ | |
c114c9c5 MW |
389 | gnu/packages/aux-files/linux-libre/4.14-arm.conf \ |
390 | gnu/packages/aux-files/linux-libre/4.14-i686.conf \ | |
391 | gnu/packages/aux-files/linux-libre/4.14-x86_64.conf \ | |
7994250f AK |
392 | gnu/packages/aux-files/linux-libre/4.9-i686.conf \ |
393 | gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \ | |
394 | gnu/packages/aux-files/linux-libre/4.4-i686.conf \ | |
395 | gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \ | |
64562321 | 396 | gnu/packages/aux-files/pack-audit.c \ |
47a60325 | 397 | gnu/packages/aux-files/run-in-namespace.c |
1959fb04 | 398 | |
ebc32b31 LC |
399 | # Templates, examples. |
400 | EXAMPLES = \ | |
df2a9616 | 401 | gnu/system/examples/asus-c201.tmpl \ |
36ffaca2 | 402 | gnu/system/examples/bare-bones.tmpl \ |
59bcffa3 | 403 | gnu/system/examples/bare-hurd.tmpl \ |
9f1e39d1 | 404 | gnu/system/examples/beaglebone-black.tmpl \ |
d038b674 | 405 | gnu/system/examples/desktop.tmpl \ |
a6c642ef | 406 | gnu/system/examples/lightweight-desktop.tmpl \ |
1b0d2b2a | 407 | gnu/system/examples/docker-image.tmpl \ |
a6c642ef | 408 | gnu/system/examples/vm-image.tmpl |
ebc32b31 | 409 | |
17ab08bc | 410 | GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go) |
af51c820 | 411 | |
4aabc8ea | 412 | nobase_dist_guilemodule_DATA = \ |
10612d61 LC |
413 | guix/d3.v3.js \ |
414 | guix/graph.js \ | |
3931c761 | 415 | guix/store/schema.sql \ |
4aabc8ea | 416 | $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \ |
74574fd1 | 417 | $(MISC_DISTRO_FILES) |
9437fd73 LC |
418 | nobase_nodist_guilemodule_DATA = guix/config.scm |
419 | nobase_nodist_guileobject_DATA = $(GOBJECTS) | |
800cdeef | 420 | |
70a9c720 LC |
421 | # Handy way to remove the .go files without removing all the rest. |
422 | clean-go: | |
423 | -$(RM) -f $(GOBJECTS) | |
92becc3f | 424 | @find . -path ./test-tmp -prune -o -name '*.go' -print | \ |
cdf26f40 EB |
425 | if test -t 1; then \ |
426 | xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \ | |
427 | else \ | |
428 | xargs -r echo "warning: stray .go files:"; \ | |
429 | fi | |
70a9c720 | 430 | |
af51c820 | 431 | |
bb251307 LC |
432 | # Test extensions; has to be unconditional. |
433 | TEST_EXTENSIONS = .scm .sh | |
434 | ||
435 | if CAN_RUN_TESTS | |
436 | ||
30dd8310 | 437 | SCM_TESTS = \ |
12277003 | 438 | tests/accounts.scm \ |
4c0c4db0 | 439 | tests/base16.scm \ |
ddc29a78 | 440 | tests/base32.scm \ |
e9c6c584 | 441 | tests/base64.scm \ |
9d449b94 | 442 | tests/boot-parameters.scm \ |
12277003 RV |
443 | tests/bournish.scm \ |
444 | tests/builders.scm \ | |
445 | tests/build-utils.scm \ | |
446 | tests/cache.scm \ | |
447 | tests/challenge.scm \ | |
af12790b | 448 | tests/channels.scm \ |
12277003 RV |
449 | tests/combinators.scm \ |
450 | tests/containers.scm \ | |
6776af04 | 451 | tests/cpan.scm \ |
7a18c3cc | 452 | tests/cpio.scm \ |
12277003 | 453 | tests/cran.scm \ |
6776af04 | 454 | tests/crate.scm \ |
12277003 RV |
455 | tests/cve.scm \ |
456 | tests/debug-link.scm \ | |
457 | tests/derivations.scm \ | |
cd903ef7 | 458 | tests/discovery.scm \ |
bdc298ec | 459 | tests/egg.scm \ |
7f74a931 | 460 | tests/elpa.scm \ |
12277003 RV |
461 | tests/file-systems.scm \ |
462 | tests/gem.scm \ | |
21b679f6 | 463 | tests/gexp.scm \ |
873f6f13 | 464 | tests/git.scm \ |
c83eedba | 465 | tests/git-authenticate.scm \ |
12277003 RV |
466 | tests/glob.scm \ |
467 | tests/gnu-maintenance.scm \ | |
468 | tests/grafts.scm \ | |
469 | tests/graph.scm \ | |
15aa2c38 | 470 | tests/gremlin.scm \ |
12277003 RV |
471 | tests/hackage.scm \ |
472 | tests/import-utils.scm \ | |
473 | tests/inferior.scm \ | |
aff8ce7c | 474 | tests/lint.scm \ |
467e874a | 475 | tests/minetest.scm \ |
12277003 RV |
476 | tests/modules.scm \ |
477 | tests/monads.scm \ | |
478 | tests/nar.scm \ | |
5658ae8a | 479 | tests/networking.scm \ |
6776af04 | 480 | tests/opam.scm \ |
43408e30 | 481 | tests/openpgp.scm \ |
12277003 | 482 | tests/packages.scm \ |
850edd77 | 483 | tests/pack.scm \ |
12277003 RV |
484 | tests/pki.scm \ |
485 | tests/print.scm \ | |
486 | tests/processes.scm \ | |
487 | tests/profiles.scm \ | |
488 | tests/publish.scm \ | |
6776af04 | 489 | tests/pypi.scm \ |
12277003 RV |
490 | tests/records.scm \ |
491 | tests/scripts.scm \ | |
12277003 RV |
492 | tests/search-paths.scm \ |
493 | tests/services.scm \ | |
db6b9d2f | 494 | tests/services/file-sharing.scm \ |
a77e3a58 | 495 | tests/services/configuration.scm \ |
d3e439e3 | 496 | tests/services/linux.scm \ |
10f55470 | 497 | tests/services/telephony.scm \ |
12277003 RV |
498 | tests/sets.scm \ |
499 | tests/size.scm \ | |
12277003 | 500 | tests/status.scm \ |
c5a2e1ff | 501 | tests/store-database.scm \ |
12277003 RV |
502 | tests/store-deduplication.scm \ |
503 | tests/store-roots.scm \ | |
504 | tests/store.scm \ | |
505 | tests/substitute.scm \ | |
506 | tests/swh.scm \ | |
507 | tests/syscalls.scm \ | |
508 | tests/system.scm \ | |
509 | tests/texlive.scm \ | |
f68b3ba1 | 510 | tests/transformations.scm \ |
12277003 RV |
511 | tests/ui.scm \ |
512 | tests/union.scm \ | |
513 | tests/upstream.scm \ | |
514 | tests/utils.scm \ | |
515 | tests/uuid.scm \ | |
4c0c65ac | 516 | tests/workers.scm |
30dd8310 | 517 | |
38d337a5 MC |
518 | if HAVE_GUILE_LIB |
519 | SCM_TESTS += tests/go.scm | |
0f853ab7 MC |
520 | else |
521 | EXTRA_DIST += tests/go.scm | |
38d337a5 MC |
522 | endif |
523 | ||
069d2bf2 LC |
524 | if BUILD_DAEMON_OFFLOAD |
525 | SCM_TESTS += tests/offload.scm | |
526 | else | |
527 | EXTRA_DIST += tests/offload.scm | |
528 | endif | |
529 | ||
30dd8310 | 530 | SH_TESTS = \ |
0afdc485 | 531 | tests/guix-build.sh \ |
96915a44 | 532 | tests/guix-build-branch.sh \ |
37d19403 | 533 | tests/guix-download.sh \ |
fe8ff028 | 534 | tests/guix-gc.sh \ |
a9871278 | 535 | tests/guix-git-authenticate.sh \ |
ccbce848 | 536 | tests/guix-hash.sh \ |
272c0709 | 537 | tests/guix-pack.sh \ |
08f41083 | 538 | tests/guix-pack-localstatedir.sh \ |
b07014f5 | 539 | tests/guix-pack-relocatable.sh \ |
0820098d | 540 | tests/guix-package.sh \ |
d824cfba | 541 | tests/guix-package-aliases.sh \ |
57b86237 | 542 | tests/guix-package-net.sh \ |
c1202fb1 | 543 | tests/guix-system.sh \ |
760c60d6 | 544 | tests/guix-archive.sh \ |
dd7c013d | 545 | tests/guix-authenticate.sh \ |
cad25264 | 546 | tests/guix-environment.sh \ |
f535dcbe | 547 | tests/guix-environment-container.sh \ |
88856916 | 548 | tests/guix-graph.sh \ |
bd747018 | 549 | tests/guix-describe.sh \ |
c924e541 | 550 | tests/guix-repl.sh \ |
dd7c013d | 551 | tests/guix-lint.sh |
af51c820 | 552 | |
30dd8310 LC |
553 | TESTS = $(SCM_TESTS) $(SH_TESTS) |
554 | ||
a9edb211 | 555 | AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0 |
352ec143 | 556 | |
4d9ed584 LC |
557 | SCM_LOG_DRIVER = \ |
558 | $(top_builddir)/test-env --quiet-stderr \ | |
559 | $(GUILE) --no-auto-compile -e main \ | |
560 | $(top_srcdir)/build-aux/test-driver.scm | |
561 | ||
a9edb211 | 562 | AM_SCM_LOG_DRIVER_FLAGS = --brief=yes |
97298ffa | 563 | |
69cfce50 | 564 | SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL) |
97298ffa | 565 | AM_SH_LOG_FLAGS = -x -e |
af51c820 | 566 | |
3a33730a LC |
567 | # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it |
568 | # could end up removing files from the store while they are being used by | |
569 | # other instances of the daemon. | |
570 | tests/guix-gc.log: \ | |
571 | $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \ | |
572 | $(SCM_TESTS:%.scm=%.log) | |
573 | ||
bb251307 LC |
574 | else !CAN_RUN_TESTS |
575 | ||
576 | TESTS = | |
577 | SH_TESTS = | |
578 | SCM_TESTS = | |
579 | ||
580 | # Automake always generates a 'check' target, so better not override it. | |
581 | check-local: | |
582 | @echo | |
583 | @echo "Cannot run tests because file name limits would be exceeded." >&2 | |
584 | @echo "Look for 'length' in the 'config.log' file for details." >&2 | |
585 | @echo | |
586 | @exit 1 | |
587 | ||
588 | endif !CAN_RUN_TESTS | |
589 | ||
4f024ef3 | 590 | check-system: $(GOBJECTS) |
e9f693d0 | 591 | $(AM_V_at)$(top_builddir)/pre-inst-env \ |
5ec4156b | 592 | guix build -m $(top_srcdir)/etc/system-tests.scm -K |
e9f693d0 | 593 | |
3a8bfebe | 594 | # Public keys used to sign substitutes. |
d9a0bd4c | 595 | dist_pkgdata_DATA = \ |
d283bb96 | 596 | etc/substitutes/berlin.guix.gnu.org.pub \ |
757e633d | 597 | etc/substitutes/ci.guix.gnu.org.pub \ |
26499816 CB |
598 | etc/substitutes/ci.guix.info.pub \ |
599 | etc/substitutes/bordeaux.guix.gnu.org.pub | |
3a33730a | 600 | |
ee3e157d | 601 | # Bash completion file. |
bba0fa24 OP |
602 | dist_bashcompletion_DATA = etc/completion/bash/guix \ |
603 | etc/completion/bash/guix-daemon | |
ee3e157d | 604 | |
96dbc930 ELB |
605 | # Zsh completion file. |
606 | dist_zshcompletion_DATA = etc/completion/zsh/_guix | |
607 | ||
b83fc85f | 608 | # Fish completion file. |
609 | dist_fishcompletion_DATA = etc/completion/fish/guix.fish | |
610 | ||
b617a9fe | 611 | # SELinux policy |
d4031410 | 612 | nodist_selinux_policy_DATA = etc/guix-daemon.cil |
b617a9fe | 613 | |
b9fe8fd6 | 614 | EXTRA_DIST += \ |
81f61c17 LC |
615 | HACKING \ |
616 | ROADMAP \ | |
617 | TODO \ | |
e15fcdd1 | 618 | CODE-OF-CONDUCT \ |
81f61c17 | 619 | .dir-locals.el \ |
627e61f1 | 620 | .guix-authorizations \ |
dcc90d15 | 621 | .guix-channel \ |
c92e5612 | 622 | scripts/guix.in \ |
6f4e8693 | 623 | etc/guix-install.sh \ |
90ca791a | 624 | etc/news.scm \ |
f292c501 | 625 | etc/release-manifest.scm \ |
5ec4156b | 626 | etc/system-tests.scm \ |
4b9b8b2e | 627 | etc/historical-authorizations \ |
f81ac34d | 628 | build-aux/build-self.scm \ |
de6af327 | 629 | build-aux/compile-all.scm \ |
45265d55 | 630 | build-aux/cuirass/hurd-manifest.scm \ |
81f61c17 | 631 | build-aux/check-final-inputs-self-contained.scm \ |
1ad5209d | 632 | build-aux/check-channel-news.scm \ |
2cfc8d69 | 633 | build-aux/compile-as-derivation.scm \ |
1c2ae810 | 634 | build-aux/generate-authors.scm \ |
3cf0dbda | 635 | build-aux/test-driver.scm \ |
94fa8d76 | 636 | build-aux/update-guix-package.scm \ |
920803fb | 637 | build-aux/update-NEWS.scm \ |
81f61c17 LC |
638 | tests/test.drv \ |
639 | tests/signing-key.pub \ | |
640 | tests/signing-key.sec \ | |
74afaa37 | 641 | tests/cve-sample.json \ |
43408e30 LC |
642 | tests/civodul.key \ |
643 | tests/rsa.key \ | |
644 | tests/dsa.key \ | |
645 | tests/ed25519.key \ | |
646 | tests/ed25519.sec \ | |
c83eedba LC |
647 | tests/ed25519bis.key \ |
648 | tests/ed25519bis.sec \ | |
81f61c17 LC |
649 | build-aux/config.rpath \ |
650 | bootstrap \ | |
ccadafdc | 651 | doc/build.scm \ |
ed795c06 | 652 | $(TESTS) |
d7672884 | 653 | |
49e6291a LC |
654 | if !BUILD_DAEMON_OFFLOAD |
655 | ||
656 | EXTRA_DIST += \ | |
657 | guix/scripts/offload.scm | |
658 | ||
659 | endif !BUILD_DAEMON_OFFLOAD | |
660 | ||
661 | ||
30dd8310 | 662 | CLEANFILES = \ |
cba386c1 | 663 | $(bin_SCRIPTS) \ |
30dd8310 | 664 | $(GOBJECTS) \ |
9bff16b3 | 665 | $(SCM_TESTS:tests/%.scm=%.log) |
af51c820 | 666 | |
28561d85 LC |
667 | # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if |
668 | # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in | |
669 | # there that are newer than the local .scm files (for instance because the | |
670 | # user ran 'make install' recently). When that happens, we end up loading | |
671 | # those previously-installed .go files, which may be stale, thereby breaking | |
d92e23dc LC |
672 | # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly |
673 | # stale files from ~/.cache/guile/ccache. | |
de6af327 | 674 | %.go: make-go ; @: |
ef82ba9d LC |
675 | make-go: make-core-go make-packages-go make-system-go make-cli-go |
676 | ||
677 | # Define a rule to build a subset of the .go files. | |
678 | define guile-compilation-rule | |
679 | ||
680 | $(1): $(2) | |
681 | $(AM_V_at)echo "Compiling Scheme modules..." ; \ | |
682 | unset GUILE_LOAD_COMPILED_PATH ; \ | |
683 | XDG_CACHE_HOME=/nowhere \ | |
684 | host=$(host) srcdir="$(top_srcdir)" \ | |
685 | $(top_builddir)/pre-inst-env \ | |
686 | $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \ | |
687 | --no-auto-compile \ | |
688 | -s "$(top_srcdir)"/build-aux/compile-all.scm \ | |
689 | --total $(words $(MODULES)) \ | |
690 | --completed $(3) \ | |
691 | $$(filter %.scm,$$^) | |
692 | ||
693 | .PHONY: $(1) | |
694 | ||
695 | endef | |
696 | ||
697 | # Split compilation in several steps, each of which building a subset of | |
698 | # $(MODULES). The main goal is to reduce peak memory consumption, as reported | |
699 | # in <https://issues.guix.gnu.org/48963>. Each 'eval' call below creates a | |
700 | # 'make-*-go' phony target that builds the corresponding subset. | |
701 | ||
0a02abde | 702 | MODULES_CORE = guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES))) |
ef82ba9d | 703 | MODULES_PACKAGES = $(filter gnu/packages/%,$(MODULES)) |
0a02abde | 704 | MODULES_SYSTEM = gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES))) |
ef82ba9d LC |
705 | MODULES_CLI = $(filter guix/scripts/%,$(MODULES)) |
706 | ||
707 | $(eval $(call guile-compilation-rule,make-core-go, \ | |
708 | $(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \ | |
709 | 0)) | |
710 | ||
711 | $(eval $(call guile-compilation-rule,make-packages-go, \ | |
712 | $(MODULES_PACKAGES) make-core-go, \ | |
713 | $(words $(MODULES_CORE)))) | |
714 | ||
715 | $(eval $(call guile-compilation-rule,make-system-go, \ | |
716 | $(MODULES_SYSTEM) make-packages-go make-core-go, \ | |
717 | $(words $(MODULES_CORE) $(MODULES_PACKAGES)))) | |
718 | ||
719 | $(eval $(call guile-compilation-rule,make-cli-go, \ | |
720 | $(MODULES_CLI) make-system-go make-packages-go make-core-go, \ | |
721 | $(words $(MODULES_CORE) $(MODULES_PACKAGES) $(MODULES_SYSTEM)))) | |
af51c820 LC |
722 | |
723 | SUFFIXES = .go | |
724 | ||
725 | # Make sure source files are installed first, so that the mtime of | |
726 | # installed compiled files is greater than that of installed source | |
727 | # files. See | |
728 | # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> | |
729 | # for details. | |
9437fd73 | 730 | guix_install_go_files = install-nobase_nodist_guileobjectDATA |
af51c820 | 731 | $(guix_install_go_files): install-nobase_dist_guilemoduleDATA |
f68b0893 | 732 | |
6005bd07 | 733 | # The above trick doesn't work for 'config.go' because both 'config.scm' and |
9437fd73 | 734 | # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it |
6005bd07 | 735 | # special treatment. |
92d00ca4 | 736 | install-data-hook: |
9437fd73 | 737 | touch "$(DESTDIR)$(guileobjectdir)/guix/config.go" |
6005bd07 | 738 | |
5d95ac91 LC |
739 | # Commit corresponding to the 'v1.0.0' tag. |
740 | commit_v1_0_0 = 6298c3ffd9654d3231a6f25390b056483e8f407c | |
1e43ab2c | 741 | |
96bf434c LC |
742 | # Introduction of the 'guix' channel. Keep in sync with (guix channels)! |
743 | channel_intro_commit = 9edb3f66fd807b096b48283debdcddccfea34bad | |
744 | channel_intro_signer = BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA | |
745 | ||
1dba0b45 | 746 | # Authenticate the current Git checkout by checking signatures on every commit. |
ef6596a2 | 747 | GUIX_GIT_KEYRING = origin/keyring |
1dba0b45 | 748 | authenticate: |
1e43ab2c | 749 | $(AM_V_at)echo "Authenticating Git checkout..." ; \ |
1dba0b45 | 750 | guix git authenticate \ |
ef6596a2 | 751 | --keyring=$(GUIX_GIT_KEYRING) \ |
96bf434c LC |
752 | --cache-key=channels/guix --stats \ |
753 | "$(channel_intro_commit)" "$(channel_intro_signer)" | |
1e43ab2c | 754 | |
2cfc8d69 LC |
755 | # Assuming Guix is already installed and the daemon is up and running, this |
756 | # rule builds from $(srcdir), creating and building derivations. | |
757 | as-derivation: | |
758 | $(AM_V_at)echo "Building Guix in Guix..." ; \ | |
759 | $(GUILE) --no-auto-compile \ | |
760 | "$(top_srcdir)/build-aux/compile-as-derivation.scm" \ | |
761 | "$(abs_top_srcdir)" | |
6005bd07 | 762 | |
ee764179 | 763 | SUBDIRS = po/guix po/packages |
931c132a | 764 | BUILT_SOURCES = |
a9424c08 | 765 | |
03d0e2d2 | 766 | include doc/local.mk |
568717fd | 767 | |
c2033df4 LC |
768 | if BUILD_DAEMON |
769 | ||
03d0e2d2 | 770 | include nix/local.mk |
c2033df4 LC |
771 | |
772 | endif BUILD_DAEMON | |
773 | ||
f68b0893 | 774 | ACLOCAL_AMFLAGS = -I m4 |
ef5f5c86 LC |
775 | |
776 | # Pass an explicit '--localstatedir' so that configure does not error out if | |
ddce2d3a LC |
777 | # it finds an existing installation with a different localstatedir. Inherit |
778 | # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to | |
779 | # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short | |
780 | # enough for shebangs. | |
e76bdf8b | 781 | AM_DISTCHECK_CONFIGURE_FLAGS = \ |
ef5f5c86 | 782 | --localstatedir="$$dc_install_base/var" \ |
d388c2c4 | 783 | --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \ |
14af289e | 784 | --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \ |
ddce2d3a LC |
785 | --enable-daemon \ |
786 | ac_cv_guix_test_root="$(GUIX_TEST_ROOT)" | |
0e993428 | 787 | |
e9926f80 | 788 | # The self-contained tarball. |
9d3fb6c7 | 789 | guix-binary.%.tar.xz: |
33349e91 | 790 | $(AM_V_GEN)GUIX_PACKAGE_PATH= \ |
1cfa6bcc | 791 | tarball=`$(top_builddir)/pre-inst-env guix pack -C xz \ |
98148830 | 792 | --fallback \ |
808084e9 | 793 | -s "$*" --localstatedir --profile-name=current-guix \ |
c8b1799f | 794 | guix` ; \ |
239c2266 | 795 | cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@" |
9d3fb6c7 LC |
796 | |
797 | ||
f995f710 MC |
798 | # The dependency on doc-pot-update is to generate the .pot files, which are |
799 | # not checked in. | |
800 | dist: doc-pot-update | |
b3f4df3f | 801 | |
1f1a0050 | 802 | dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version |
a8ac45b1 AK |
803 | dist-hook: assert-no-store-file-names |
804 | ||
81f61c17 | 805 | distcheck-hook: assert-binaries-available assert-final-inputs-self-contained |
e793178a | 806 | |
e6860b5e LC |
807 | EXTRA_DIST += $(top_srcdir)/.version |
808 | BUILT_SOURCES += $(top_srcdir)/.version | |
c6e8f40f LC |
809 | $(top_srcdir)/.version: config.status |
810 | $(AM_V_GEN)echo $(VERSION) > "$@-t" && mv "$@-t" "$@" | |
e6860b5e LC |
811 | |
812 | gen-tarball-version: | |
813 | echo $(VERSION) > "$(distdir)/.tarball-version" | |
814 | ||
1f1a0050 | 815 | gen-ChangeLog: |
e71ad29d | 816 | $(AM_V_GEN)if test -d .git; then \ |
e793178a | 817 | $(top_srcdir)/build-aux/gitlog-to-changelog \ |
1f1a0050 | 818 | > $(distdir)/ChangeLog.tmp; \ |
e793178a | 819 | rm -f $(distdir)/ChangeLog; \ |
1f1a0050 | 820 | mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \ |
e793178a LC |
821 | fi |
822 | ||
a8ac45b1 | 823 | gen-AUTHORS: |
e71ad29d | 824 | $(AM_V_GEN)if test -d .git; then \ |
ac140f79 LC |
825 | rm -f "$(distdir)/AUTHORS"; \ |
826 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
827 | "$(top_srcdir)/build-aux/generate-authors.scm" \ | |
828 | "$(top_srcdir)" "$(distdir)/AUTHORS"; \ | |
829 | fi | |
a8ac45b1 | 830 | |
08b14ab2 LC |
831 | # Like 'dist', but regenerate 'configure' so we get an up-to-date |
832 | # 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to | |
833 | # do that whenever a 'dist' target is used.) | |
834 | dist-with-updated-version: | |
835 | @echo "Running './bootstrap' for new version string..." | |
836 | $(top_srcdir)/bootstrap | |
837 | $(MAKE) $(AM_MAKEFLAGS) $(top_srcdir)/.version dist | |
838 | ||
839 | .PHONY: dist-with-updated-version | |
840 | ||
334dce14 LC |
841 | \f |
842 | # | |
843 | # Release management. | |
844 | # | |
845 | ||
846 | releasedir = release-$(PACKAGE_VERSION) | |
847 | ||
848 | PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) | |
849 | ||
850 | # List of source tarballs produced. This must be kept in sync with the | |
851 | # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'. | |
852 | SOURCE_TARBALLS = \ | |
853 | $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext)) | |
854 | ||
855 | # Systems supported by Guix. | |
a16eb6c5 CM |
856 | SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \ |
857 | powerpc64le-linux | |
334dce14 LC |
858 | |
859 | # Guix binary tarballs. | |
860 | BINARY_TARBALLS = \ | |
861 | $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz) | |
862 | ||
13f62aef LC |
863 | # Systems supported by Guix System. |
864 | GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux | |
334dce14 | 865 | |
13f62aef LC |
866 | # Systems for which we build Guix VMs. |
867 | GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux | |
a6c642ef | 868 | |
13f62aef LC |
869 | # Prefix of the Guix installation image file name. |
870 | GUIX_SYSTEM_IMAGE_BASE = guix-system-install-$(PACKAGE_VERSION) | |
334dce14 | 871 | |
13f62aef LC |
872 | # Prefix of the Guix VM image file name. |
873 | GUIX_SYSTEM_VM_IMAGE_BASE = guix-system-vm-image-$(PACKAGE_VERSION) | |
a6c642ef | 874 | |
dbab5eb8 LC |
875 | # Flags for 'guix system vm-image'. By default create a VM image that appears |
876 | # to have a 20G hard disk. | |
877 | GUIX_SYSTEM_VM_IMAGE_FLAGS ?= --image-size=30G | |
878 | ||
35a09fd9 LC |
879 | # Return the sequence of '-s' flags for the given systems. |
880 | system_flags = $(foreach system,$(1),-s $(system)) | |
881 | ||
334dce14 LC |
882 | # The release process works in several phases: |
883 | # | |
54dc9d36 | 884 | # 0. We assume the developer created a 'vX.Y.Z' tag. |
334dce14 | 885 | # 1. Build the source tarball. |
54dc9d36 | 886 | # 2. Update the 'guix' package so that it corresponds to the 'vX.Y.Z' tag. |
334dce14 LC |
887 | # 3. Build the binary tarballs for that 'guix' package. |
888 | # 4. Update the 'guix' package again. | |
54dc9d36 MC |
889 | # 5. Build the installation and VM images. The images will run 'guix' |
890 | # corresponding to 'vX.Y.Z' + 1 commit, and they will install 'vX.Y.Z'. | |
334dce14 LC |
891 | # |
892 | # This 'release' target takes care of everything and copies the resulting | |
893 | # files to $(releasedir). | |
73c791b8 LC |
894 | # |
895 | # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext | |
896 | # issue described at <https://savannah.gnu.org/bugs/index.php?51027>. | |
86811312 | 897 | release: dist-with-updated-version all |
2a396266 LC |
898 | @if ! git diff-index --quiet HEAD; then \ |
899 | echo "There are uncommitted changes; stopping." >&2 ; \ | |
900 | exit 1 ; \ | |
901 | fi | |
334dce14 LC |
902 | $(MKDIR_P) "$(releasedir)" |
903 | rm -f "$(releasedir)"/* | |
904 | mv $(SOURCE_TARBALLS) "$(releasedir)" | |
54dc9d36 | 905 | # Bump the Guix package version and build it. |
3de898b4 MC |
906 | GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \ |
907 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
908 | $(top_srcdir)/build-aux/update-guix-package.scm \ | |
909 | "`git rev-parse HEAD`" "$(PACKAGE_VERSION)" | |
334dce14 LC |
910 | git add $(top_srcdir)/gnu/packages/package-management.scm |
911 | git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)." | |
c8b1799f | 912 | $(top_builddir)/pre-inst-env guix build guix \ |
35a09fd9 | 913 | $(call system_flags,$(SUPPORTED_SYSTEMS)) \ |
98148830 | 914 | -v1 --no-grafts --fallback |
54dc9d36 | 915 | # Generate the binary release tarballs. |
334dce14 LC |
916 | rm -f $(BINARY_TARBALLS) |
917 | $(MAKE) $(BINARY_TARBALLS) | |
918 | for system in $(SUPPORTED_SYSTEMS) ; do \ | |
919 | mv "guix-binary.$$system.tar.xz" \ | |
920 | "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \ | |
921 | done | |
54dc9d36 | 922 | # Bump the Guix package version and build it (again). |
3de898b4 MC |
923 | GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \ |
924 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
925 | $(top_srcdir)/build-aux/update-guix-package.scm \ | |
926 | "`git rev-parse HEAD`" | |
334dce14 LC |
927 | git add $(top_srcdir)/gnu/packages/package-management.scm |
928 | git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`." | |
35a09fd9 LC |
929 | $(top_builddir)/pre-inst-env guix build guix \ |
930 | $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \ | |
98148830 | 931 | -v1 --no-grafts --fallback |
54dc9d36 | 932 | # Generate the ISO installation images. |
13f62aef | 933 | for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \ |
334dce14 | 934 | image=`$(top_builddir)/pre-inst-env \ |
7aeef7ee | 935 | guix system image -t iso9660 \ |
313f4926 | 936 | --label="GUIX_$${system}_$(VERSION)" \ |
98148830 | 937 | --system=$$system --fallback \ |
334dce14 LC |
938 | gnu/system/install.scm` ; \ |
939 | if [ ! -f "$$image" ] ; then \ | |
13f62aef | 940 | echo "failed to produced Guix installation image for $$system" >&2 ; \ |
334dce14 LC |
941 | exit 1 ; \ |
942 | fi ; \ | |
82c0f34c LC |
943 | cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \ |
944 | mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" \ | |
945 | "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso" ; \ | |
334dce14 | 946 | done |
54dc9d36 | 947 | # Generate the VM images. |
13f62aef | 948 | for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \ |
a6c642ef | 949 | image=`$(top_builddir)/pre-inst-env \ |
7aeef7ee | 950 | guix system image -t qcow2 $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \ |
9d0b9c7c | 951 | --save-provenance \ |
98148830 | 952 | --system=$$system --fallback \ |
a6c642ef LF |
953 | gnu/system/examples/vm-image.tmpl` ; \ |
954 | if [ ! -f "$$image" ] ; then \ | |
13f62aef | 955 | echo "failed to produced Guix VM image for $$system" >&2 ; \ |
a6c642ef LF |
956 | exit 1 ; \ |
957 | fi ; \ | |
b1b41a23 | 958 | cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2"; \ |
a6c642ef | 959 | done |
2a396266 LC |
960 | @echo |
961 | @echo "Congratulations! All the release files are now in $(releasedir)." | |
962 | @echo | |
334dce14 | 963 | |
94fa8d76 LC |
964 | update-guix-package: |
965 | git rev-parse HEAD | |
966 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
967 | $(top_srcdir)/build-aux/update-guix-package.scm \ | |
968 | "`git rev-parse HEAD`" | |
969 | ||
920803fb LC |
970 | # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>. |
971 | # Package data from this checkout is used by 'update-NEWS.scm'. | |
972 | GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance | |
973 | ||
974 | update-NEWS: $(GOBJECTS) | |
975 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
976 | $(top_srcdir)/build-aux/update-NEWS.scm \ | |
977 | $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data" | |
978 | ||
834129e0 | 979 | # Make sure we're not shipping a file that embeds a local /gnu/store file name. |
1f1a0050 | 980 | assert-no-store-file-names: |
e71ad29d | 981 | $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \ |
69e7322f LC |
982 | --exclude=*.info-[0-9] --exclude=*.dot \ |
983 | --exclude=*.eps --exclude-dir=bootstrap \ | |
7bc46ecc RW |
984 | --exclude=guix-manual.pot --exclude=guix-manual.*.po \ |
985 | --exclude=guix-cookbook.pot --exclude=guix-cookbook.*.po \ | |
69e7322f | 986 | --exclude=guix-prettify.el \ |
1f1a0050 | 987 | --exclude=ChangeLog* \ |
0b2ea781 | 988 | --exclude=binutils-boot-2.20*.patch \ |
69e7322f | 989 | -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \ |
a463ffd9 LC |
990 | then \ |
991 | echo "error: store file names embedded in the distribution" >&2 ; \ | |
992 | exit 1 ; \ | |
993 | fi | |
994 | ||
0bc02bec | 995 | # Make sure important substitutes are available. |
93cba30c | 996 | assert-binaries-available: $(GOBJECTS) |
f292c501 LC |
997 | $(AM_V_at)$(top_builddir)/pre-inst-env \ |
998 | guix weather -m "$(top_srcdir)/etc/release-manifest.scm" \ | |
999 | --display-missing | |
56fbf262 | 1000 | |
81f61c17 | 1001 | # Make sure the final inputs don't refer to bootstrap tools. |
93cba30c | 1002 | assert-final-inputs-self-contained: $(GOBJECTS) |
e71ad29d | 1003 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
81f61c17 LC |
1004 | "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm" |
1005 | ||
1ad5209d LC |
1006 | # Validate channel news. |
1007 | check-channel-news: $(GOBJECTS) | |
1008 | $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ | |
1009 | "$(top_srcdir)/build-aux/check-channel-news.scm" | |
1010 | ||
76bea3f8 MO |
1011 | # Compute the Cuirass jobs. |
1012 | cuirass-jobs: $(GOBJECTS) | |
1013 | rm -rf "$@" | |
1014 | $(AM_V_at)$(MKDIR_P) "$@" | |
89cbec89 | 1015 | $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \ |
76bea3f8 | 1016 | "$(top_srcdir)/build-aux/cuirass/evaluate.scm" "$@" |
454caca8 | 1017 | |
e6860b5e | 1018 | .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version |
56fbf262 | 1019 | .PHONY: assert-no-store-file-names assert-binaries-available |
1ad5209d | 1020 | .PHONY: assert-final-inputs-self-contained check-channel-news |
1e43ab2c | 1021 | .PHONY: clean-go make-go as-derivation authenticate |
76bea3f8 | 1022 | .PHONY: update-guix-package update-NEWS cuirass-jobs release |
8c3d8894 | 1023 | |
61a224ad LC |
1024 | # Downloading up-to-date PO files. |
1025 | ||
45549e9f JL |
1026 | WEBLATE_REPO = https://framagit.org/tyreunom/guix-translations |
1027 | ||
1028 | # Shallow clone the Git repository behind Weblate and copy files from it if | |
1029 | # they contain at least one translation, and they are well-formed (Scheme | |
1030 | # format only), warn otherwise. Copied files are converted to a canonical | |
1031 | # form. | |
1032 | download-po: | |
1033 | dir=$$(mktemp -d); \ | |
1034 | git clone --depth 1 "$(WEBLATE_REPO)" "$$dir/translations"; \ | |
1035 | for domain in po/doc po/guix po/packages; do \ | |
1036 | for po in "$$dir/translations/$$domain"/*.po; do \ | |
1037 | translated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | cut -f1 -d' '); \ | |
1038 | target=$$(basename "$$po"); \ | |
1039 | target="$$domain/$$target"; \ | |
1040 | if msgfmt -c "$$po" && [ "$$translated" != "0" ]; then \ | |
1041 | msgfilter --no-wrap -i "$$po" cat > "$$po".tmp; \ | |
1042 | mv "$$po".tmp "$$target"; \ | |
1043 | echo "copied $$target."; \ | |
1044 | else \ | |
1045 | echo "WARN: $$target ($$translated translated messages) was not added/updated."; \ | |
1046 | fi; \ | |
1047 | done; \ | |
1048 | done; \ | |
1049 | rm -rf "$$dir" | |
61a224ad LC |
1050 | .PHONY: download-po |
1051 | ||
8c3d8894 ML |
1052 | ## -------------- ## |
1053 | ## Silent rules. ## | |
1054 | ## -------------- ## | |
1055 | ||
1056 | AM_V_DL = $(AM_V_DL_$(V)) | |
1057 | AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY)) | |
1058 | AM_V_DL_0 = @echo " DL " $@; | |
4c48878d ML |
1059 | |
1060 | AM_V_DOT = $(AM_V_DOT_$(V)) | |
1061 | AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY)) | |
1062 | AM_V_DOT_0 = @echo " DOT " $@; | |
71ed439b | 1063 | |
8dddedf7 ML |
1064 | AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V)) |
1065 | AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY)) | |
1066 | AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@; | |
b9fe8fd6 JL |
1067 | |
1068 | AM_V_PO4A = $(AM_V_PO4A_$(V)) | |
1069 | AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY)) | |
1070 | AM_V_PO4A_0 = @echo " PO4A" $@; | |
06c4778a LC |
1071 | |
1072 | AM_V_POXREF = $(AM_V_POXREF_$(V)) | |
1073 | AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY)) | |
1074 | AM_V_POXREF_0 = @echo " POXREF" $@; |