Makefile.am 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195
  1. # GNU Guix --- Functional package management for GNU
  2. # Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
  3. # Copyright © 2013 Andreas Enge <andreas@enge.fr>
  4. # Copyright © 2015, 2017 Alex Kost <alezost@gmail.com>
  5. # Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
  6. # Copyright © 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
  7. # Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
  8. # Copyright © 2017 Leo Famulari <leo@famulari.name>
  9. # Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
  10. # Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  11. # Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
  12. # Copyright © 2018 Nikita <nikita@n0.is>
  13. # Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
  14. # Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
  15. # Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
  16. # Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
  17. # Copyright © 2020, 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  18. # Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
  19. # Copyright © 2021 Andrew Tropin <andrew@trop.in>
  20. #
  21. # This file is part of GNU Guix.
  22. #
  23. # GNU Guix is free software; you can redistribute it and/or modify it
  24. # under the terms of the GNU General Public License as published by
  25. # the Free Software Foundation; either version 3 of the License, or (at
  26. # your option) any later version.
  27. #
  28. # GNU Guix is distributed in the hope that it will be useful, but
  29. # WITHOUT ANY WARRANTY; without even the implied warranty of
  30. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. # GNU General Public License for more details.
  32. #
  33. # You should have received a copy of the GNU General Public License
  34. # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  35. MSGMERGE_UPDATE = @MSGMERGE@ --update
  36. bin_SCRIPTS = scripts/guix
  37. # Handle substitution of fully-expanded Autoconf variables.
  38. do_subst = $(SED) \
  39. -e 's,[@]GUILE[@],$(GUILE),g' \
  40. -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
  41. -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
  42. -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \
  43. -e 's,[@]localedir[@],$(localedir),g'
  44. scripts/guix: scripts/guix.in Makefile
  45. $(AM_V_at)rm -f $@ $@-t
  46. $(AM_V_at)$(MKDIR_P) "$(@D)"
  47. $(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
  48. $(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
  49. # This is our variant of the 'guile' executable, one that doesn't complain
  50. # about locales.
  51. pkglibexec_PROGRAMS = guile
  52. guile_SOURCES = gnu/packages/aux-files/guile-launcher.c
  53. guile_LDADD = $(GUILE_LIBS)
  54. guile_CFLAGS = $(GUILE_CFLAGS)
  55. # Have the 'guix' command refer to our 'guile'.
  56. install-exec-hook:
  57. $(SED) -i "$(DESTDIR)$(bindir)/guix" \
  58. -e 's,^#![[:graph:]]\+,#!$(pkglibexecdir)/guile,g'
  59. nodist_noinst_SCRIPTS = \
  60. pre-inst-env \
  61. test-env
  62. # Modules that are not compiled but are installed nonetheless, such as
  63. # build-side modules with unusual dependencies.
  64. MODULES_NOT_COMPILED = \
  65. guix/build/po.scm \
  66. guix/man-db.scm
  67. include gnu/local.mk
  68. include po/doc/local.mk
  69. MODULES = \
  70. guix/base16.scm \
  71. guix/base32.scm \
  72. guix/base64.scm \
  73. guix/ci.scm \
  74. guix/cpio.scm \
  75. guix/cpu.scm \
  76. guix/deprecation.scm \
  77. guix/docker.scm \
  78. guix/records.scm \
  79. guix/openpgp.scm \
  80. guix/pki.scm \
  81. guix/progress.scm \
  82. guix/combinators.scm \
  83. guix/memoization.scm \
  84. guix/utils.scm \
  85. guix/sets.scm \
  86. guix/modules.scm \
  87. guix/download.scm \
  88. guix/discovery.scm \
  89. guix/android-repo-download.scm \
  90. guix/bzr-download.scm \
  91. guix/git-download.scm \
  92. guix/hg-download.scm \
  93. guix/hash.scm \
  94. guix/swh.scm \
  95. guix/monads.scm \
  96. guix/monad-repl.scm \
  97. guix/gexp.scm \
  98. guix/profiles.scm \
  99. guix/serialization.scm \
  100. guix/nar.scm \
  101. guix/narinfo.scm \
  102. guix/derivations.scm \
  103. guix/grafts.scm \
  104. guix/repl.scm \
  105. guix/rpm.scm \
  106. guix/transformations.scm \
  107. guix/inferior.scm \
  108. guix/describe.scm \
  109. guix/quirks.scm \
  110. guix/channels.scm \
  111. guix/gnu-maintenance.scm \
  112. guix/self.scm \
  113. guix/substitutes.scm \
  114. guix/upstream.scm \
  115. guix/licenses.scm \
  116. guix/lint.scm \
  117. guix/glob.scm \
  118. guix/git.scm \
  119. guix/git-authenticate.scm \
  120. guix/graph.scm \
  121. guix/cache.scm \
  122. guix/cve.scm \
  123. guix/workers.scm \
  124. guix/least-authority.scm \
  125. guix/read-print.scm \
  126. guix/ipfs.scm \
  127. guix/platform.scm \
  128. guix/platforms/arm.scm \
  129. guix/platforms/mips.scm \
  130. guix/platforms/powerpc.scm \
  131. guix/platforms/riscv.scm \
  132. guix/platforms/x86.scm \
  133. guix/build-system.scm \
  134. guix/build-system/android-ndk.scm \
  135. guix/build-system/ant.scm \
  136. guix/build-system/cargo.scm \
  137. guix/build-system/channel.scm \
  138. guix/build-system/chicken.scm \
  139. guix/build-system/clojure.scm \
  140. guix/build-system/cmake.scm \
  141. guix/build-system/dub.scm \
  142. guix/build-system/dune.scm \
  143. guix/build-system/elm.scm \
  144. guix/build-system/emacs.scm \
  145. guix/build-system/font.scm \
  146. guix/build-system/go.scm \
  147. guix/build-system/meson.scm \
  148. guix/build-system/mozilla.scm \
  149. guix/build-system/minify.scm \
  150. guix/build-system/minetest.scm \
  151. guix/build-system/asdf.scm \
  152. guix/build-system/copy.scm \
  153. guix/build-system/glib-or-gtk.scm \
  154. guix/build-system/gnu.scm \
  155. guix/build-system/guile.scm \
  156. guix/build-system/haskell.scm \
  157. guix/build-system/julia.scm \
  158. guix/build-system/linux-module.scm \
  159. guix/build-system/maven.scm \
  160. guix/build-system/node.scm \
  161. guix/build-system/perl.scm \
  162. guix/build-system/pyproject.scm \
  163. guix/build-system/python.scm \
  164. guix/build-system/renpy.scm \
  165. guix/build-system/ocaml.scm \
  166. guix/build-system/qt.scm \
  167. guix/build-system/waf.scm \
  168. guix/build-system/r.scm \
  169. guix/build-system/rakudo.scm \
  170. guix/build-system/rebar.scm \
  171. guix/build-system/ruby.scm \
  172. guix/build-system/scons.scm \
  173. guix/build-system/texlive.scm \
  174. guix/build-system/tree-sitter.scm \
  175. guix/build-system/trivial.scm \
  176. guix/ftp-client.scm \
  177. guix/http-client.scm \
  178. guix/gnupg.scm \
  179. guix/elf.scm \
  180. guix/profiling.scm \
  181. guix/store.scm \
  182. guix/cvs-download.scm \
  183. guix/svn-download.scm \
  184. guix/colors.scm \
  185. guix/i18n.scm \
  186. guix/diagnostics.scm \
  187. guix/ui.scm \
  188. guix/status.scm \
  189. guix/build/android-ndk-build-system.scm \
  190. guix/build/ant-build-system.scm \
  191. guix/build/download.scm \
  192. guix/build/download-nar.scm \
  193. guix/build/cargo-build-system.scm \
  194. guix/build/cargo-utils.scm \
  195. guix/build/chicken-build-system.scm \
  196. guix/build/cmake-build-system.scm \
  197. guix/build/dub-build-system.scm \
  198. guix/build/dune-build-system.scm \
  199. guix/build/elm-build-system.scm \
  200. guix/build/emacs-build-system.scm \
  201. guix/build/meson-build-system.scm \
  202. guix/build/minify-build-system.scm \
  203. guix/build/font-build-system.scm \
  204. guix/build/go-build-system.scm \
  205. guix/build/android-repo.scm \
  206. guix/build/asdf-build-system.scm \
  207. guix/build/bzr.scm \
  208. guix/build/copy-build-system.scm \
  209. guix/build/git.scm \
  210. guix/build/hg.scm \
  211. guix/build/glib-or-gtk-build-system.scm \
  212. guix/build/gnu-bootstrap.scm \
  213. guix/build/gnu-build-system.scm \
  214. guix/build/gnu-dist.scm \
  215. guix/build/guile-build-system.scm \
  216. guix/build/maven-build-system.scm \
  217. guix/build/minetest-build-system.scm \
  218. guix/build/node-build-system.scm \
  219. guix/build/perl-build-system.scm \
  220. guix/build/pyproject-build-system.scm \
  221. guix/build/python-build-system.scm \
  222. guix/build/ocaml-build-system.scm \
  223. guix/build/qt-build-system.scm \
  224. guix/build/r-build-system.scm \
  225. guix/build/renpy-build-system.scm \
  226. guix/build/rakudo-build-system.scm \
  227. guix/build/rebar-build-system.scm \
  228. guix/build/ruby-build-system.scm \
  229. guix/build/scons-build-system.scm \
  230. guix/build/texlive-build-system.scm \
  231. guix/build/tree-sitter-build-system.scm \
  232. guix/build/waf-build-system.scm \
  233. guix/build/haskell-build-system.scm \
  234. guix/build/julia-build-system.scm \
  235. guix/build/kconfig.scm \
  236. guix/build/linux-module-build-system.scm \
  237. guix/build/store-copy.scm \
  238. guix/build/json.scm \
  239. guix/build/pack.scm \
  240. guix/build/utils.scm \
  241. guix/build/union.scm \
  242. guix/build/profiles.scm \
  243. guix/build/compile.scm \
  244. guix/build/cvs.scm \
  245. guix/build/svn.scm \
  246. guix/build/syscalls.scm \
  247. guix/build/gremlin.scm \
  248. guix/build/debug-link.scm \
  249. guix/build/clojure-build-system.scm \
  250. guix/build/clojure-utils.scm \
  251. guix/build/emacs-utils.scm \
  252. guix/build/java-utils.scm \
  253. guix/build/lisp-utils.scm \
  254. guix/build/meson-configuration.scm \
  255. guix/build/maven/java.scm \
  256. guix/build/maven/plugin.scm \
  257. guix/build/maven/pom.scm \
  258. guix/build/graft.scm \
  259. guix/build/bournish.scm \
  260. guix/build/qt-utils.scm \
  261. guix/build/make-bootstrap.scm \
  262. guix/search-paths.scm \
  263. guix/packages.scm \
  264. guix/parameters.scm \
  265. guix/import/cabal.scm \
  266. guix/import/cpan.scm \
  267. guix/import/cran.scm \
  268. guix/import/crate.scm \
  269. guix/import/egg.scm \
  270. guix/import/elm.scm \
  271. guix/import/elpa.scm \
  272. guix/import/gem.scm \
  273. guix/import/git.scm \
  274. guix/import/github.scm \
  275. guix/import/gnome.scm \
  276. guix/import/gnu.scm \
  277. guix/import/go.scm \
  278. guix/import/hackage.scm \
  279. guix/import/hexpm.scm \
  280. guix/import/json.scm \
  281. guix/import/kde.scm \
  282. guix/import/launchpad.scm \
  283. guix/import/minetest.scm \
  284. guix/import/opam.scm \
  285. guix/import/print.scm \
  286. guix/import/pypi.scm \
  287. guix/import/stackage.scm \
  288. guix/import/test.scm \
  289. guix/import/texlive.scm \
  290. guix/import/utils.scm \
  291. guix/scripts.scm \
  292. guix/scripts/download.scm \
  293. guix/scripts/perform-download.scm \
  294. guix/scripts/build.scm \
  295. guix/scripts/archive.scm \
  296. guix/scripts/import.scm \
  297. guix/scripts/package.scm \
  298. guix/scripts/install.scm \
  299. guix/scripts/remove.scm \
  300. guix/scripts/upgrade.scm \
  301. guix/scripts/search.scm \
  302. guix/scripts/show.scm \
  303. guix/scripts/gc.scm \
  304. guix/scripts/hash.scm \
  305. guix/scripts/pack.scm \
  306. guix/scripts/pull.scm \
  307. guix/scripts/processes.scm \
  308. guix/scripts/substitute.scm \
  309. guix/scripts/authenticate.scm \
  310. guix/scripts/refresh.scm \
  311. guix/scripts/repl.scm \
  312. guix/scripts/describe.scm \
  313. guix/scripts/style.scm \
  314. guix/scripts/system.scm \
  315. guix/scripts/system/edit.scm \
  316. guix/scripts/system/reconfigure.scm \
  317. guix/scripts/system/search.scm \
  318. guix/scripts/home.scm \
  319. guix/scripts/home/edit.scm \
  320. guix/scripts/home/import.scm \
  321. guix/scripts/lint.scm \
  322. guix/scripts/challenge.scm \
  323. guix/scripts/import/crate.scm \
  324. guix/scripts/import/cpan.scm \
  325. guix/scripts/import/cran.scm \
  326. guix/scripts/import/egg.scm \
  327. guix/scripts/import/elm.scm \
  328. guix/scripts/import/elpa.scm \
  329. guix/scripts/import/gem.scm \
  330. guix/scripts/import/gnu.scm \
  331. guix/scripts/import/go.scm \
  332. guix/scripts/import/hackage.scm \
  333. guix/scripts/import/hexpm.scm \
  334. guix/scripts/import/json.scm \
  335. guix/scripts/import/minetest.scm \
  336. guix/scripts/import/opam.scm \
  337. guix/scripts/import/pypi.scm \
  338. guix/scripts/import/stackage.scm \
  339. guix/scripts/import/texlive.scm \
  340. guix/scripts/environment.scm \
  341. guix/scripts/shell.scm \
  342. guix/scripts/publish.scm \
  343. guix/scripts/edit.scm \
  344. guix/scripts/size.scm \
  345. guix/scripts/git.scm \
  346. guix/scripts/git/authenticate.scm \
  347. guix/scripts/graph.scm \
  348. guix/scripts/weather.scm \
  349. guix/scripts/container.scm \
  350. guix/scripts/container/exec.scm \
  351. guix/scripts/deploy.scm \
  352. guix/scripts/time-machine.scm \
  353. guix.scm \
  354. $(GNU_SYSTEM_MODULES)
  355. if HAVE_GUILE_SSH
  356. MODULES += \
  357. guix/ssh.scm \
  358. guix/remote.scm \
  359. guix/scripts/copy.scm \
  360. guix/store/ssh.scm
  361. endif HAVE_GUILE_SSH
  362. if HAVE_GUILE_AVAHI
  363. MODULES += \
  364. guix/avahi.scm \
  365. guix/scripts/discover.scm
  366. endif HAVE_GUILE_AVAHI
  367. if BUILD_DAEMON_OFFLOAD
  368. MODULES += \
  369. guix/scripts/offload.scm
  370. endif BUILD_DAEMON_OFFLOAD
  371. # Scheme implementation of the build daemon and related functionality.
  372. STORE_MODULES = \
  373. guix/store/database.scm \
  374. guix/store/deduplication.scm \
  375. guix/store/roots.scm
  376. MODULES += $(STORE_MODULES)
  377. # Internal modules with test suite support.
  378. dist_noinst_DATA = \
  379. guix/tests.scm \
  380. guix/tests/http.scm \
  381. guix/tests/git.scm \
  382. guix/tests/gnupg.scm
  383. # Auxiliary files for packages.
  384. AUX_FILES = \
  385. gnu/packages/aux-files/chromium/master-preferences.json \
  386. gnu/packages/aux-files/emacs/guix-emacs.el \
  387. gnu/packages/aux-files/guix.vim \
  388. gnu/packages/aux-files/linux-libre/6.3-arm.conf \
  389. gnu/packages/aux-files/linux-libre/6.3-arm64.conf \
  390. gnu/packages/aux-files/linux-libre/6.3-i686.conf \
  391. gnu/packages/aux-files/linux-libre/6.3-x86_64.conf \
  392. gnu/packages/aux-files/linux-libre/6.1-arm.conf \
  393. gnu/packages/aux-files/linux-libre/6.1-arm64.conf \
  394. gnu/packages/aux-files/linux-libre/6.1-i686.conf \
  395. gnu/packages/aux-files/linux-libre/6.1-x86_64.conf \
  396. gnu/packages/aux-files/linux-libre/5.15-arm.conf \
  397. gnu/packages/aux-files/linux-libre/5.15-arm64.conf \
  398. gnu/packages/aux-files/linux-libre/5.15-i686.conf \
  399. gnu/packages/aux-files/linux-libre/5.15-x86_64.conf \
  400. gnu/packages/aux-files/linux-libre/5.10-arm.conf \
  401. gnu/packages/aux-files/linux-libre/5.10-arm64.conf \
  402. gnu/packages/aux-files/linux-libre/5.10-i686.conf \
  403. gnu/packages/aux-files/linux-libre/5.10-x86_64.conf \
  404. gnu/packages/aux-files/linux-libre/5.4-arm.conf \
  405. gnu/packages/aux-files/linux-libre/5.4-arm64.conf \
  406. gnu/packages/aux-files/linux-libre/5.4-i686.conf \
  407. gnu/packages/aux-files/linux-libre/5.4-x86_64.conf \
  408. gnu/packages/aux-files/linux-libre/4.19-arm.conf \
  409. gnu/packages/aux-files/linux-libre/4.19-arm64.conf \
  410. gnu/packages/aux-files/linux-libre/4.19-i686.conf \
  411. gnu/packages/aux-files/linux-libre/4.19-x86_64.conf \
  412. gnu/packages/aux-files/linux-libre/4.14-arm.conf \
  413. gnu/packages/aux-files/linux-libre/4.14-i686.conf \
  414. gnu/packages/aux-files/linux-libre/4.14-x86_64.conf \
  415. gnu/packages/aux-files/pack-audit.c \
  416. gnu/packages/aux-files/python/sanity-check.py \
  417. gnu/packages/aux-files/python/sitecustomize.py \
  418. gnu/packages/aux-files/renpy/renpy.in \
  419. gnu/packages/aux-files/run-in-namespace.c \
  420. gnu/packages/aux-files/xml/patch-catalog-xml.xsl \
  421. gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml
  422. # Templates, examples.
  423. EXAMPLES = \
  424. gnu/system/examples/asus-c201.tmpl \
  425. gnu/system/examples/bare-bones.tmpl \
  426. gnu/system/examples/bare-hurd.tmpl \
  427. gnu/system/examples/beaglebone-black.tmpl \
  428. gnu/system/examples/desktop.tmpl \
  429. gnu/system/examples/lightweight-desktop.tmpl \
  430. gnu/system/examples/docker-image.tmpl \
  431. gnu/system/examples/raspberry-pi-64.tmpl \
  432. gnu/system/examples/raspberry-pi-64-nfs-root.tmpl \
  433. gnu/system/examples/vm-image.tmpl
  434. GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
  435. nobase_dist_guilemodule_DATA = \
  436. guix/d3.v3.js \
  437. guix/graph.js \
  438. guix/store/schema.sql \
  439. $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \
  440. $(MISC_DISTRO_FILES)
  441. nobase_nodist_guilemodule_DATA = guix/config.scm
  442. nobase_nodist_guileobject_DATA = $(GOBJECTS)
  443. # Handy way to remove the .go files without removing all the rest.
  444. clean-go:
  445. -$(RM) -f $(GOBJECTS)
  446. @find . -path ./test-tmp -prune -o -name '*.go' -print | \
  447. if test -t 1; then \
  448. xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \
  449. else \
  450. xargs -r echo "warning: stray .go files:"; \
  451. fi
  452. # Test extensions; has to be unconditional.
  453. TEST_EXTENSIONS = .scm .sh
  454. if CAN_RUN_TESTS
  455. SCM_TESTS = \
  456. tests/accounts.scm \
  457. tests/base16.scm \
  458. tests/base32.scm \
  459. tests/base64.scm \
  460. tests/boot-parameters.scm \
  461. tests/bournish.scm \
  462. tests/builders.scm \
  463. tests/build-emacs-utils.scm \
  464. tests/build-utils.scm \
  465. tests/cache.scm \
  466. tests/challenge.scm \
  467. tests/channels.scm \
  468. tests/combinators.scm \
  469. tests/containers.scm \
  470. tests/cpan.scm \
  471. tests/cpio.scm \
  472. tests/cran.scm \
  473. tests/crate.scm \
  474. tests/cve.scm \
  475. tests/debug-link.scm \
  476. tests/derivations.scm \
  477. tests/discovery.scm \
  478. tests/egg.scm \
  479. tests/elm.scm \
  480. tests/elpa.scm \
  481. tests/file-systems.scm \
  482. tests/gem.scm \
  483. tests/gexp.scm \
  484. tests/git.scm \
  485. tests/git-authenticate.scm \
  486. tests/glob.scm \
  487. tests/gnu-maintenance.scm \
  488. tests/grafts.scm \
  489. tests/graph.scm \
  490. tests/gremlin.scm \
  491. tests/hackage.scm \
  492. tests/home-import.scm \
  493. tests/home-services.scm \
  494. tests/http-client.scm \
  495. tests/import-git.scm \
  496. tests/import-github.scm \
  497. tests/import-utils.scm \
  498. tests/inferior.scm \
  499. tests/lint.scm \
  500. tests/minetest.scm \
  501. tests/modules.scm \
  502. tests/monads.scm \
  503. tests/nar.scm \
  504. tests/networking.scm \
  505. tests/opam.scm \
  506. tests/openpgp.scm \
  507. tests/packages.scm \
  508. tests/pack.scm \
  509. tests/pki.scm \
  510. tests/print.scm \
  511. tests/processes.scm \
  512. tests/profiles.scm \
  513. tests/publish.scm \
  514. tests/pypi.scm \
  515. tests/read-print.scm \
  516. tests/records.scm \
  517. tests/rpm.scm \
  518. tests/scripts.scm \
  519. tests/search-paths.scm \
  520. tests/services.scm \
  521. tests/services/file-sharing.scm \
  522. tests/services/configuration.scm \
  523. tests/services/lightdm.scm \
  524. tests/services/linux.scm \
  525. tests/services/telephony.scm \
  526. tests/sets.scm \
  527. tests/size.scm \
  528. tests/status.scm \
  529. tests/store-database.scm \
  530. tests/store-deduplication.scm \
  531. tests/store-roots.scm \
  532. tests/store.scm \
  533. tests/substitute.scm \
  534. tests/swh.scm \
  535. tests/syscalls.scm \
  536. tests/system.scm \
  537. tests/style.scm \
  538. tests/texlive.scm \
  539. tests/transformations.scm \
  540. tests/ui.scm \
  541. tests/union.scm \
  542. tests/upstream.scm \
  543. tests/utils.scm \
  544. tests/uuid.scm \
  545. tests/workers.scm
  546. if HAVE_GUILE_LIB
  547. SCM_TESTS += tests/go.scm
  548. else
  549. EXTRA_DIST += tests/go.scm
  550. endif
  551. if BUILD_DAEMON_OFFLOAD
  552. SCM_TESTS += tests/offload.scm
  553. else
  554. EXTRA_DIST += tests/offload.scm
  555. endif
  556. SH_TESTS = \
  557. tests/guix-build.sh \
  558. tests/guix-build-branch.sh \
  559. tests/guix-download.sh \
  560. tests/guix-gc.sh \
  561. tests/guix-git-authenticate.sh \
  562. tests/guix-hash.sh \
  563. tests/guix-pack.sh \
  564. tests/guix-pack-localstatedir.sh \
  565. tests/guix-pack-relocatable.sh \
  566. tests/guix-package.sh \
  567. tests/guix-package-aliases.sh \
  568. tests/guix-package-net.sh \
  569. tests/guix-style.sh \
  570. tests/guix-system.sh \
  571. tests/guix-home.sh \
  572. tests/guix-archive.sh \
  573. tests/guix-authenticate.sh \
  574. tests/guix-environment.sh \
  575. tests/guix-environment-container.sh \
  576. tests/guix-refresh.sh \
  577. tests/guix-shell.sh \
  578. tests/guix-shell-export-manifest.sh \
  579. tests/guix-graph.sh \
  580. tests/guix-describe.sh \
  581. tests/guix-repl.sh \
  582. tests/guix-lint.sh
  583. TESTS = $(SCM_TESTS) $(SH_TESTS)
  584. AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
  585. SCM_LOG_DRIVER = \
  586. $(top_builddir)/test-env --quiet-stderr \
  587. $(GUILE) --no-auto-compile -e main \
  588. $(top_srcdir)/build-aux/test-driver.scm
  589. AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
  590. SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
  591. AM_SH_LOG_FLAGS = -x -e
  592. # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
  593. # could end up removing files from the store while they are being used by
  594. # other instances of the daemon.
  595. tests/guix-gc.log: \
  596. $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
  597. $(SCM_TESTS:%.scm=%.log)
  598. else !CAN_RUN_TESTS
  599. TESTS =
  600. SH_TESTS =
  601. SCM_TESTS =
  602. # Automake always generates a 'check' target, so better not override it.
  603. check-local:
  604. @echo
  605. @echo "Cannot run tests because file name limits would be exceeded." >&2
  606. @echo "Look for 'length' in the 'config.log' file for details." >&2
  607. @echo
  608. @exit 1
  609. endif !CAN_RUN_TESTS
  610. check-system: $(GOBJECTS)
  611. $(AM_V_at)$(top_builddir)/pre-inst-env \
  612. guix build -m $(top_srcdir)/etc/system-tests.scm -K
  613. # Public keys used to sign substitutes.
  614. dist_pkgdata_DATA = \
  615. etc/substitutes/berlin.guix.gnu.org.pub \
  616. etc/substitutes/ci.guix.gnu.org.pub \
  617. etc/substitutes/ci.guix.info.pub \
  618. etc/substitutes/bordeaux.guix.gnu.org.pub
  619. # Bash completion file.
  620. dist_bashcompletion_DATA = etc/completion/bash/guix \
  621. etc/completion/bash/guix-daemon
  622. # Zsh completion file.
  623. dist_zshcompletion_DATA = etc/completion/zsh/_guix
  624. # Fish completion file.
  625. dist_fishcompletion_DATA = etc/completion/fish/guix.fish
  626. # SELinux policy
  627. nodist_selinux_policy_DATA = etc/guix-daemon.cil
  628. EXTRA_DIST += \
  629. .dir-locals.el \
  630. .guix-authorizations \
  631. .guix-channel \
  632. CODE-OF-CONDUCT \
  633. HACKING \
  634. ROADMAP \
  635. TODO \
  636. bootstrap \
  637. build-aux/build-self.scm \
  638. build-aux/check-channel-news.scm \
  639. build-aux/check-final-inputs-self-contained.scm \
  640. build-aux/compile-all.scm \
  641. build-aux/compile-as-derivation.scm \
  642. build-aux/config.rpath \
  643. build-aux/convert-xref.scm \
  644. build-aux/cuirass/hurd-manifest.scm \
  645. build-aux/generate-authors.scm \
  646. build-aux/test-driver.scm \
  647. build-aux/update-NEWS.scm \
  648. build-aux/update-guix-package.scm \
  649. doc/build.scm \
  650. etc/disarchive-manifest.scm \
  651. etc/guix-install.sh \
  652. etc/historical-authorizations \
  653. etc/news.scm \
  654. etc/kernels-manifest.scm \
  655. etc/release-manifest.scm \
  656. etc/source-manifest.scm \
  657. etc/system-tests.scm \
  658. etc/time-travel-manifest.scm \
  659. scripts/guix.in \
  660. tests/cve-sample.json \
  661. tests/keys/civodul.pub \
  662. tests/keys/dsa.pub \
  663. tests/keys/ed25519-2.pub \
  664. tests/keys/ed25519-2.sec \
  665. tests/keys/ed25519-3.pub \
  666. tests/keys/ed25519-3.sec \
  667. tests/keys/ed25519.pub \
  668. tests/keys/ed25519.sec \
  669. tests/keys/rsa.pub \
  670. tests/keys/signing-key.pub \
  671. tests/keys/signing-key.sec \
  672. tests/test.drv \
  673. $(TESTS)
  674. if !BUILD_DAEMON_OFFLOAD
  675. EXTRA_DIST += \
  676. guix/scripts/offload.scm
  677. endif !BUILD_DAEMON_OFFLOAD
  678. CLEANFILES = \
  679. $(bin_SCRIPTS) \
  680. $(GOBJECTS) \
  681. $(SCM_TESTS:tests/%.scm=%.log)
  682. # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
  683. # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
  684. # there that are newer than the local .scm files (for instance because the
  685. # user ran 'make install' recently). When that happens, we end up loading
  686. # those previously-installed .go files, which may be stale, thereby breaking
  687. # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly
  688. # stale files from ~/.cache/guile/ccache.
  689. %.go: make-go ; @:
  690. make-go: make-core-go make-packages-go make-system-go make-cli-go
  691. # Define a rule to build a subset of the .go files.
  692. define guile-compilation-rule
  693. $(1): $(2)
  694. $(AM_V_at)echo "Compiling Scheme modules..." ; \
  695. unset GUILE_LOAD_COMPILED_PATH ; \
  696. XDG_CACHE_HOME=/nowhere \
  697. host=$(host) srcdir="$(top_srcdir)" \
  698. $(top_builddir)/pre-inst-env \
  699. $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
  700. --no-auto-compile \
  701. -s "$(top_srcdir)"/build-aux/compile-all.scm \
  702. --total $(words $(MODULES)) \
  703. --completed $(3) \
  704. $$(filter %.scm,$$^)
  705. endef
  706. # Split compilation in several steps, each of which building a subset of
  707. # $(MODULES). The main goal is to reduce peak memory consumption, as reported
  708. # in <https://issues.guix.gnu.org/48963>. Each 'eval' call below creates a
  709. # 'make-*-go' phony target that builds the corresponding subset.
  710. first_half := \
  711. gnu/packages/a% gnu/packages/b% gnu/packages/c% gnu/packages/d% \
  712. gnu/packages/e% gnu/packages/f% gnu/packages/g% gnu/packages/h% \
  713. gnu/packages/i% gnu/packages/j% gnu/packages/k% gnu/packages/l%
  714. MODULES_CORE := guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES)))
  715. MODULES_PACKAGES1 := $(filter $(first_half),$(MODULES))
  716. MODULES_PACKAGES2 := $(filter-out $(first_half),$(filter gnu/packages/%,$(MODULES)))
  717. MODULES_PACKAGES := $(MODULES_PACKAGES1) $(MODULES_PACKAGES2)
  718. MODULES_SYSTEM := gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES)))
  719. MODULES_CLI := $(filter guix/scripts/%,$(MODULES))
  720. MODULES_PO := guix/build/po.scm
  721. $(eval $(call guile-compilation-rule,make-core-go, \
  722. $(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \
  723. 0))
  724. .PHONY: make-core-go
  725. $(eval $(call guile-compilation-rule,make-packages1-go, \
  726. $(MODULES_PACKAGES1) make-core-go, \
  727. $(words $(MODULES_CORE))))
  728. .PHONY: make-packages1-go
  729. $(eval $(call guile-compilation-rule,make-packages2-go, \
  730. $(MODULES_PACKAGES2) make-core-go make-packages1-go, \
  731. $(words $(MODULES_CORE) $(MODULES_PACKAGES1))))
  732. .PHONY: make-packages2-go
  733. make-packages-go: make-packages1-go make-packages2-go
  734. .PHONY: make-packages-go
  735. $(eval $(call guile-compilation-rule,make-system-go, \
  736. $(MODULES_SYSTEM) make-packages-go make-core-go, \
  737. $(words $(MODULES_CORE) $(MODULES_PACKAGES))))
  738. .PHONY: make-system-go
  739. $(eval $(call guile-compilation-rule,make-cli-go, \
  740. $(MODULES_CLI) make-system-go make-packages-go make-core-go, \
  741. $(words $(MODULES_CORE) $(MODULES_PACKAGES) $(MODULES_SYSTEM))))
  742. .PHONY: make-cli-go
  743. $(eval $(call guile-compilation-rule,guix/build/po.go, \
  744. $(MODULES_PO), \
  745. 0))
  746. SUFFIXES = .go
  747. # Make sure source files are installed first, so that the mtime of
  748. # installed compiled files is greater than that of installed source
  749. # files. See
  750. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
  751. # for details.
  752. guix_install_go_files = install-nobase_nodist_guileobjectDATA
  753. $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
  754. # The above trick doesn't work for 'config.go' because both 'config.scm' and
  755. # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it
  756. # special treatment.
  757. install-data-hook:
  758. touch "$(DESTDIR)$(guileobjectdir)/guix/config.go"
  759. # Commit corresponding to the 'v1.0.0' tag.
  760. commit_v1_0_0 = 6298c3ffd9654d3231a6f25390b056483e8f407c
  761. # Introduction of the 'guix' channel. Keep in sync with (guix channels)!
  762. channel_intro_commit = 9edb3f66fd807b096b48283debdcddccfea34bad
  763. channel_intro_signer = BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA
  764. # Authenticate the current Git checkout by checking signatures on every commit.
  765. GUIX_GIT_KEYRING = origin/keyring
  766. authenticate:
  767. $(AM_V_at)echo "Authenticating Git checkout..." ; \
  768. guix git authenticate \
  769. --keyring=$(GUIX_GIT_KEYRING) \
  770. --cache-key=channels/guix --stats \
  771. "$(channel_intro_commit)" "$(channel_intro_signer)"
  772. # Assuming Guix is already installed and the daemon is up and running, this
  773. # rule builds from $(srcdir), creating and building derivations.
  774. as-derivation:
  775. $(AM_V_at)echo "Building Guix in Guix..." ; \
  776. $(GUILE) --no-auto-compile \
  777. "$(top_srcdir)/build-aux/compile-as-derivation.scm" \
  778. "$(abs_top_srcdir)"
  779. SUBDIRS = po/guix po/packages
  780. BUILT_SOURCES =
  781. include doc/local.mk
  782. if BUILD_DAEMON
  783. include nix/local.mk
  784. endif BUILD_DAEMON
  785. ACLOCAL_AMFLAGS = -I m4
  786. # Pass an explicit '--localstatedir' so that configure does not error out if
  787. # it finds an existing installation with a different localstatedir. Inherit
  788. # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to
  789. # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short
  790. # enough for shebangs.
  791. AM_DISTCHECK_CONFIGURE_FLAGS = \
  792. --localstatedir="$$dc_install_base/var" \
  793. --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
  794. --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
  795. --enable-daemon \
  796. ac_cv_guix_test_root="$(GUIX_TEST_ROOT)"
  797. # The self-contained tarball.
  798. guix-binary.%.tar.xz:
  799. $(AM_V_GEN)GUIX_PACKAGE_PATH= \
  800. tarball=`$(top_builddir)/pre-inst-env guix pack -C xz \
  801. --fallback \
  802. -s "$*" --localstatedir --profile-name=current-guix \
  803. guix` ; \
  804. cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
  805. # The dependency on doc-pot-update is to generate the .pot files, which are
  806. # not checked in.
  807. dist: doc-pot-update
  808. dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
  809. dist-hook: assert-no-store-file-names
  810. distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
  811. EXTRA_DIST += $(top_srcdir)/.version
  812. BUILT_SOURCES += $(top_srcdir)/.version
  813. $(top_srcdir)/.version: config.status
  814. $(AM_V_GEN)echo $(VERSION) > "$@-t" && mv "$@-t" "$@"
  815. gen-tarball-version:
  816. echo $(VERSION) > "$(distdir)/.tarball-version"
  817. gen-ChangeLog:
  818. $(AM_V_GEN)if test -d .git; then \
  819. $(top_srcdir)/build-aux/gitlog-to-changelog \
  820. > $(distdir)/ChangeLog.tmp; \
  821. rm -f $(distdir)/ChangeLog; \
  822. mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
  823. fi
  824. gen-AUTHORS:
  825. $(AM_V_GEN)if test -d .git; then \
  826. rm -f "$(distdir)/AUTHORS"; \
  827. $(top_builddir)/pre-inst-env "$(GUILE)" \
  828. "$(top_srcdir)/build-aux/generate-authors.scm" \
  829. "$(top_srcdir)" "$(distdir)/AUTHORS"; \
  830. fi
  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. .PHONY: dist-with-updated-version
  839. #
  840. # Release management.
  841. #
  842. releasedir = release-$(PACKAGE_VERSION)
  843. PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
  844. # List of source tarballs produced. This must be kept in sync with the
  845. # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'.
  846. SOURCE_TARBALLS = \
  847. $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
  848. # Systems supported by Guix.
  849. SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \
  850. powerpc64le-linux
  851. # Guix binary tarballs.
  852. BINARY_TARBALLS = \
  853. $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz)
  854. # Systems supported by Guix System.
  855. GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
  856. # Systems for which we build Guix VMs.
  857. GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux
  858. # Prefix of the Guix installation image file name.
  859. GUIX_SYSTEM_IMAGE_BASE = guix-system-install-$(PACKAGE_VERSION)
  860. # Prefix of the Guix VM image file name.
  861. GUIX_SYSTEM_VM_IMAGE_BASE = guix-system-vm-image-$(PACKAGE_VERSION)
  862. # Flags for 'guix system vm-image'. By default create a VM image that appears
  863. # to have a 20G hard disk.
  864. GUIX_SYSTEM_VM_IMAGE_FLAGS ?= --image-size=30G
  865. # Return the sequence of '-s' flags for the given systems.
  866. system_flags = $(foreach system,$(1),-s $(system))
  867. # The release process works in several phases:
  868. #
  869. # 0. We assume the developer created a 'vX.Y.Z' tag.
  870. # 1. Build the source tarball.
  871. # 2. Update the 'guix' package so that it corresponds to the 'vX.Y.Z' tag.
  872. # 3. Build the binary tarballs for that 'guix' package.
  873. # 4. Update the 'guix' package again.
  874. # 5. Build the installation and VM images. The images will run 'guix'
  875. # corresponding to 'vX.Y.Z' + 1 commit, and they will install 'vX.Y.Z'.
  876. #
  877. # This 'release' target takes care of everything and copies the resulting
  878. # files to $(releasedir).
  879. #
  880. # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext
  881. # issue described at <https://savannah.gnu.org/bugs/index.php?51027>.
  882. release: dist-with-updated-version all
  883. @if ! git diff-index --quiet HEAD; then \
  884. echo "There are uncommitted changes; stopping." >&2 ; \
  885. exit 1 ; \
  886. fi
  887. $(MKDIR_P) "$(releasedir)"
  888. rm -f "$(releasedir)"/*
  889. mv $(SOURCE_TARBALLS) "$(releasedir)"
  890. # Bump the Guix package version and build it.
  891. GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \
  892. $(top_builddir)/pre-inst-env "$(GUILE)" \
  893. $(top_srcdir)/build-aux/update-guix-package.scm \
  894. "`git rev-parse HEAD`" "$(PACKAGE_VERSION)"
  895. git add $(top_srcdir)/gnu/packages/package-management.scm
  896. git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)."
  897. $(top_builddir)/pre-inst-env guix build guix \
  898. $(call system_flags,$(SUPPORTED_SYSTEMS)) \
  899. -v1 --no-grafts --fallback
  900. # Generate the binary release tarballs.
  901. rm -f $(BINARY_TARBALLS)
  902. $(MAKE) $(BINARY_TARBALLS)
  903. for system in $(SUPPORTED_SYSTEMS) ; do \
  904. mv "guix-binary.$$system.tar.xz" \
  905. "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \
  906. done
  907. # Build 'current-guix' to speed things up for the next step.
  908. $(top_builddir)/pre-inst-env guix build \
  909. -e '((@ (gnu packages package-management) current-guix))' \
  910. $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \
  911. -v1 --no-grafts --fallback
  912. # Generate the ISO installation images.
  913. for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \
  914. GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//'`" ; \
  915. image=`$(top_builddir)/pre-inst-env \
  916. guix system image -t iso9660 \
  917. --label="GUIX_$${system}_$(VERSION)" \
  918. --system=$$system --fallback \
  919. gnu/system/install.scm` ; \
  920. if [ ! -f "$$image" ] ; then \
  921. echo "failed to produce Guix installation image for $$system" >&2 ; \
  922. exit 1 ; \
  923. fi ; \
  924. cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \
  925. mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" \
  926. "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso" ; \
  927. done
  928. # Generate the VM images.
  929. for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \
  930. GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//'`" ; \
  931. image=`$(top_builddir)/pre-inst-env \
  932. guix system image -t qcow2 $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \
  933. --save-provenance \
  934. --system=$$system --fallback \
  935. gnu/system/examples/vm-image.tmpl` ; \
  936. if [ ! -f "$$image" ] ; then \
  937. echo "failed to produce Guix VM image for $$system" >&2 ; \
  938. exit 1 ; \
  939. fi ; \
  940. cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2"; \
  941. done
  942. @echo
  943. @echo "Congratulations! All the release files are now in $(releasedir)."
  944. @echo
  945. update-guix-package:
  946. git rev-parse HEAD
  947. $(top_builddir)/pre-inst-env "$(GUILE)" \
  948. $(top_srcdir)/build-aux/update-guix-package.scm \
  949. "`git rev-parse HEAD`"
  950. # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>.
  951. # Package data from this checkout is used by 'update-NEWS.scm'.
  952. GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance
  953. update-NEWS: $(GOBJECTS)
  954. $(top_builddir)/pre-inst-env "$(GUILE)" \
  955. $(top_srcdir)/build-aux/update-NEWS.scm \
  956. $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data"
  957. # Make sure we're not shipping a file that embeds a local /gnu/store file name.
  958. assert-no-store-file-names:
  959. $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
  960. --exclude=*.info-[0-9] --exclude=*.dot \
  961. --exclude=*.eps --exclude-dir=bootstrap \
  962. --exclude=guix-manual.pot --exclude=guix-manual.*.po \
  963. --exclude=guix-cookbook.pot --exclude=guix-cookbook.*.po \
  964. --exclude=guix-prettify.el \
  965. --exclude=ChangeLog* \
  966. --exclude=binutils-boot-2.20*.patch \
  967. -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
  968. then \
  969. echo "error: store file names embedded in the distribution" >&2 ; \
  970. exit 1 ; \
  971. fi
  972. # Make sure important substitutes are available. Check only the primary
  973. # server so that '--display-missing' doesn't print two lists.
  974. assert-binaries-available: $(GOBJECTS)
  975. $(AM_V_at)$(top_builddir)/pre-inst-env \
  976. guix weather -m "$(top_srcdir)/etc/release-manifest.scm" \
  977. --substitute-urls="https://ci.guix.gnu.org" \
  978. --display-missing
  979. # Make sure the final inputs don't refer to bootstrap tools.
  980. assert-final-inputs-self-contained: $(GOBJECTS)
  981. $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
  982. "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
  983. # Validate channel news.
  984. check-channel-news: $(GOBJECTS)
  985. $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
  986. "$(top_srcdir)/build-aux/check-channel-news.scm"
  987. # Compute the Cuirass jobs.
  988. cuirass-jobs: $(GOBJECTS)
  989. rm -rf "$@"
  990. $(AM_V_at)$(MKDIR_P) "$@"
  991. $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
  992. "$(top_srcdir)/build-aux/cuirass/evaluate.scm" "$@"
  993. .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
  994. .PHONY: assert-no-store-file-names assert-binaries-available
  995. .PHONY: assert-final-inputs-self-contained check-channel-news
  996. .PHONY: clean-go make-go as-derivation authenticate
  997. .PHONY: update-guix-package update-NEWS cuirass-jobs release
  998. # Git auto-configuration.
  999. .git/hooks/pre-push: etc/git/pre-push
  1000. $(AM_V_at)if test -d .git; then \
  1001. cp etc/git/pre-push .git/hooks/pre-push; \
  1002. fi
  1003. .git/config: etc/git/gitconfig
  1004. $(AM_V_at)if command -v git >/dev/null && test -d .git; then \
  1005. git config --add include.path ../etc/git/gitconfig; \
  1006. fi
  1007. nodist_noinst_DATA = .git/hooks/pre-push .git/config
  1008. # Downloading up-to-date PO files.
  1009. WEBLATE_REPO = https://framagit.org/tyreunom/guix-translations
  1010. # Shallow clone the Git repository behind Weblate and copy files from it if
  1011. # they contain at least one translation, and they are well-formed (Scheme
  1012. # format only), warn otherwise. Copied files are converted to a canonical
  1013. # form.
  1014. download-po:
  1015. dir=$$(mktemp -d); \
  1016. git clone --depth 1 "$(WEBLATE_REPO)" "$$dir/translations" && \
  1017. for domain in po/doc po/guix po/packages; do \
  1018. for po in "$$dir/translations/$$domain"/*.po; do \
  1019. translated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | cut -f1 -d' '); \
  1020. untranslated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | rev | cut -f3 -d' ' | rev); \
  1021. untranslated=$${untranslated:-0}; \
  1022. total=$$(($$translated+$$untranslated)); \
  1023. target=$$(basename "$$po"); \
  1024. target="$$domain/$$target"; \
  1025. msgfmt -c "$$po"; \
  1026. if msgfmt -c "$$po" && [ "$$translated" != "0" ] && ([ "$$domain" != "po/doc" ] || [ "$$translated" -gt $$(($$total/10)) ] || [ -f $$target ]); then \
  1027. msgfilter --no-wrap -i "$$po" cat > "$$po".tmp; \
  1028. mv "$$po".tmp "$$target"; \
  1029. echo "copied $$target."; \
  1030. else \
  1031. echo "WARN: $$target ($$translated translated messages ($$((translated/total*100))%)) was not added/updated."; \
  1032. fi; \
  1033. done; \
  1034. done; \
  1035. for po in po/doc/*.po; do \
  1036. translated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | cut -f1 -d' '); \
  1037. untranslated=$$(LANG=en_US.UTF-8 msgfmt --statistics "$$po" 2>&1 | rev | cut -f3 -d' ' | rev); \
  1038. untranslated=$${untranslated:-0}; \
  1039. total=$$(($$translated + $$untranslated)); \
  1040. if [ "$$translated" -lt "$$(($$total/20))" ]; then \
  1041. echo "WARN: $$po was removed because it is below the 5% threshold: $$((translated/total*100))%"; \
  1042. rm $$po; \
  1043. fi; \
  1044. done; \
  1045. rm -rf "$$dir"
  1046. .PHONY: download-po
  1047. ## -------------- ##
  1048. ## Silent rules. ##
  1049. ## -------------- ##
  1050. AM_V_DL = $(AM_V_DL_$(V))
  1051. AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
  1052. AM_V_DL_0 = @echo " DL " $@;
  1053. AM_V_DOT = $(AM_V_DOT_$(V))
  1054. AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
  1055. AM_V_DOT_0 = @echo " DOT " $@;
  1056. AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
  1057. AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
  1058. AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
  1059. AM_V_PO4A = $(AM_V_PO4A_$(V))
  1060. AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
  1061. AM_V_PO4A_0 = @echo " PO4A" $@;
  1062. AM_V_POXREF = $(AM_V_POXREF_$(V))
  1063. AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY))
  1064. AM_V_POXREF_0 = @echo " POXREF" $@;