Makefile.am 37 KB

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