Makefile.am 37 KB

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