Makefile.am 35 KB

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