Makefile.am 35 KB

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