Makefile.am 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076
  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/authenticate.scm \
  274. guix/scripts/refresh.scm \
  275. guix/scripts/repl.scm \
  276. guix/scripts/describe.scm \
  277. guix/scripts/system.scm \
  278. guix/scripts/system/search.scm \
  279. guix/scripts/system/reconfigure.scm \
  280. guix/scripts/lint.scm \
  281. guix/scripts/challenge.scm \
  282. guix/scripts/import/crate.scm \
  283. guix/scripts/import/cran.scm \
  284. guix/scripts/import/elpa.scm \
  285. guix/scripts/import/gem.scm \
  286. guix/scripts/import/gnu.scm \
  287. guix/scripts/import/hackage.scm \
  288. guix/scripts/import/json.scm \
  289. guix/scripts/import/nix.scm \
  290. guix/scripts/import/opam.scm \
  291. guix/scripts/import/pypi.scm \
  292. guix/scripts/import/stackage.scm \
  293. guix/scripts/import/texlive.scm \
  294. guix/scripts/environment.scm \
  295. guix/scripts/publish.scm \
  296. guix/scripts/edit.scm \
  297. guix/scripts/size.scm \
  298. guix/scripts/git.scm \
  299. guix/scripts/git/authenticate.scm \
  300. guix/scripts/graph.scm \
  301. guix/scripts/weather.scm \
  302. guix/scripts/container.scm \
  303. guix/scripts/container/exec.scm \
  304. guix/scripts/deploy.scm \
  305. guix/scripts/time-machine.scm \
  306. guix.scm \
  307. $(GNU_SYSTEM_MODULES)
  308. if HAVE_GUILE_SSH
  309. MODULES += \
  310. guix/ssh.scm \
  311. guix/remote.scm \
  312. guix/scripts/copy.scm \
  313. guix/store/ssh.scm
  314. endif HAVE_GUILE_SSH
  315. if HAVE_GUILE_AVAHI
  316. MODULES += \
  317. guix/avahi.scm \
  318. guix/scripts/discover.scm
  319. endif HAVE_GUILE_AVAHI
  320. if BUILD_DAEMON_OFFLOAD
  321. MODULES += \
  322. guix/scripts/offload.scm
  323. endif BUILD_DAEMON_OFFLOAD
  324. # Scheme implementation of the build daemon and related functionality.
  325. STORE_MODULES = \
  326. guix/store/database.scm \
  327. guix/store/deduplication.scm \
  328. guix/store/roots.scm
  329. MODULES += $(STORE_MODULES)
  330. # Internal modules with test suite support.
  331. dist_noinst_DATA = \
  332. guix/tests.scm \
  333. guix/tests/http.scm \
  334. guix/tests/git.scm \
  335. guix/tests/gnupg.scm
  336. # Auxiliary files for packages.
  337. AUX_FILES = \
  338. gnu/packages/aux-files/chromium/master-preferences.json \
  339. gnu/packages/aux-files/emacs/guix-emacs.el \
  340. gnu/packages/aux-files/guix.vim \
  341. gnu/packages/aux-files/linux-libre/5.11-arm.conf \
  342. gnu/packages/aux-files/linux-libre/5.11-arm64.conf \
  343. gnu/packages/aux-files/linux-libre/5.11-i686.conf \
  344. gnu/packages/aux-files/linux-libre/5.11-x86_64.conf \
  345. gnu/packages/aux-files/linux-libre/5.10-arm.conf \
  346. gnu/packages/aux-files/linux-libre/5.10-arm64.conf \
  347. gnu/packages/aux-files/linux-libre/5.10-i686.conf \
  348. gnu/packages/aux-files/linux-libre/5.10-x86_64.conf \
  349. gnu/packages/aux-files/linux-libre/5.4-arm.conf \
  350. gnu/packages/aux-files/linux-libre/5.4-arm64.conf \
  351. gnu/packages/aux-files/linux-libre/5.4-i686.conf \
  352. gnu/packages/aux-files/linux-libre/5.4-x86_64.conf \
  353. gnu/packages/aux-files/linux-libre/4.19-arm.conf \
  354. gnu/packages/aux-files/linux-libre/4.19-arm64.conf \
  355. gnu/packages/aux-files/linux-libre/4.19-i686.conf \
  356. gnu/packages/aux-files/linux-libre/4.19-x86_64.conf \
  357. gnu/packages/aux-files/linux-libre/4.14-arm.conf \
  358. gnu/packages/aux-files/linux-libre/4.14-i686.conf \
  359. gnu/packages/aux-files/linux-libre/4.14-x86_64.conf \
  360. gnu/packages/aux-files/linux-libre/4.9-i686.conf \
  361. gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \
  362. gnu/packages/aux-files/linux-libre/4.4-i686.conf \
  363. gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \
  364. gnu/packages/aux-files/pack-audit.c \
  365. gnu/packages/aux-files/run-in-namespace.c
  366. # Templates, examples.
  367. EXAMPLES = \
  368. gnu/system/examples/asus-c201.tmpl \
  369. gnu/system/examples/bare-bones.tmpl \
  370. gnu/system/examples/bare-hurd.tmpl \
  371. gnu/system/examples/beaglebone-black.tmpl \
  372. gnu/system/examples/desktop.tmpl \
  373. gnu/system/examples/lightweight-desktop.tmpl \
  374. gnu/system/examples/docker-image.tmpl \
  375. gnu/system/examples/vm-image.tmpl
  376. GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
  377. nobase_dist_guilemodule_DATA = \
  378. guix/d3.v3.js \
  379. guix/graph.js \
  380. guix/store/schema.sql \
  381. $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \
  382. $(MISC_DISTRO_FILES)
  383. nobase_nodist_guilemodule_DATA = guix/config.scm
  384. nobase_nodist_guileobject_DATA = $(GOBJECTS)
  385. # Handy way to remove the .go files without removing all the rest.
  386. clean-go:
  387. -$(RM) -f $(GOBJECTS)
  388. @find . -path ./test-tmp -prune -o -name '*.go' -print | \
  389. if test -t 1; then \
  390. xargs -r echo -e "\033[31mwarning:\033[0m stray .go files:"; \
  391. else \
  392. xargs -r echo "warning: stray .go files:"; \
  393. fi
  394. # Test extensions; has to be unconditional.
  395. TEST_EXTENSIONS = .scm .sh
  396. if CAN_RUN_TESTS
  397. SCM_TESTS = \
  398. tests/accounts.scm \
  399. tests/base16.scm \
  400. tests/base32.scm \
  401. tests/base64.scm \
  402. tests/boot-parameters.scm \
  403. tests/bournish.scm \
  404. tests/builders.scm \
  405. tests/build-utils.scm \
  406. tests/cache.scm \
  407. tests/challenge.scm \
  408. tests/channels.scm \
  409. tests/combinators.scm \
  410. tests/containers.scm \
  411. tests/cpan.scm \
  412. tests/cpio.scm \
  413. tests/cran.scm \
  414. tests/crate.scm \
  415. tests/cve.scm \
  416. tests/debug-link.scm \
  417. tests/derivations.scm \
  418. tests/discovery.scm \
  419. tests/elpa.scm \
  420. tests/file-systems.scm \
  421. tests/gem.scm \
  422. tests/gexp.scm \
  423. tests/git.scm \
  424. tests/git-authenticate.scm \
  425. tests/glob.scm \
  426. tests/gnu-maintenance.scm \
  427. tests/grafts.scm \
  428. tests/graph.scm \
  429. tests/gremlin.scm \
  430. tests/hackage.scm \
  431. tests/import-utils.scm \
  432. tests/inferior.scm \
  433. tests/lint.scm \
  434. tests/modules.scm \
  435. tests/monads.scm \
  436. tests/nar.scm \
  437. tests/networking.scm \
  438. tests/opam.scm \
  439. tests/openpgp.scm \
  440. tests/packages.scm \
  441. tests/pack.scm \
  442. tests/pki.scm \
  443. tests/print.scm \
  444. tests/processes.scm \
  445. tests/profiles.scm \
  446. tests/publish.scm \
  447. tests/pypi.scm \
  448. tests/records.scm \
  449. tests/scripts.scm \
  450. tests/search-paths.scm \
  451. tests/services.scm \
  452. tests/services/file-sharing.scm \
  453. tests/services/linux.scm \
  454. tests/sets.scm \
  455. tests/size.scm \
  456. tests/snix.scm \
  457. tests/status.scm \
  458. tests/store-database.scm \
  459. tests/store-deduplication.scm \
  460. tests/store-roots.scm \
  461. tests/store.scm \
  462. tests/substitute.scm \
  463. tests/swh.scm \
  464. tests/syscalls.scm \
  465. tests/system.scm \
  466. tests/texlive.scm \
  467. tests/transformations.scm \
  468. tests/ui.scm \
  469. tests/union.scm \
  470. tests/upstream.scm \
  471. tests/utils.scm \
  472. tests/uuid.scm \
  473. tests/workers.scm
  474. if BUILD_DAEMON_OFFLOAD
  475. SCM_TESTS += tests/offload.scm
  476. else
  477. EXTRA_DIST += tests/offload.scm
  478. endif
  479. SH_TESTS = \
  480. tests/guix-build.sh \
  481. tests/guix-build-branch.sh \
  482. tests/guix-download.sh \
  483. tests/guix-gc.sh \
  484. tests/guix-git-authenticate.sh \
  485. tests/guix-hash.sh \
  486. tests/guix-pack.sh \
  487. tests/guix-pack-localstatedir.sh \
  488. tests/guix-pack-relocatable.sh \
  489. tests/guix-package.sh \
  490. tests/guix-package-aliases.sh \
  491. tests/guix-package-net.sh \
  492. tests/guix-system.sh \
  493. tests/guix-archive.sh \
  494. tests/guix-authenticate.sh \
  495. tests/guix-environment.sh \
  496. tests/guix-environment-container.sh \
  497. tests/guix-graph.sh \
  498. tests/guix-describe.sh \
  499. tests/guix-repl.sh \
  500. tests/guix-lint.sh
  501. TESTS = $(SCM_TESTS) $(SH_TESTS)
  502. AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
  503. SCM_LOG_DRIVER = \
  504. $(top_builddir)/test-env --quiet-stderr \
  505. $(GUILE) --no-auto-compile -e main \
  506. $(top_srcdir)/build-aux/test-driver.scm
  507. AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
  508. SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
  509. AM_SH_LOG_FLAGS = -x -e
  510. # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
  511. # could end up removing files from the store while they are being used by
  512. # other instances of the daemon.
  513. tests/guix-gc.log: \
  514. $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
  515. $(SCM_TESTS:%.scm=%.log)
  516. else !CAN_RUN_TESTS
  517. TESTS =
  518. SH_TESTS =
  519. SCM_TESTS =
  520. # Automake always generates a 'check' target, so better not override it.
  521. check-local:
  522. @echo
  523. @echo "Cannot run tests because file name limits would be exceeded." >&2
  524. @echo "Look for 'length' in the 'config.log' file for details." >&2
  525. @echo
  526. @exit 1
  527. endif !CAN_RUN_TESTS
  528. check-system: $(GOBJECTS)
  529. $(AM_V_at)$(top_builddir)/pre-inst-env \
  530. guix build -m $(top_srcdir)/etc/system-tests.scm -K
  531. # Public keys used to sign substitutes.
  532. dist_pkgdata_DATA = \
  533. etc/substitutes/berlin.guix.gnu.org.pub \
  534. etc/substitutes/ci.guix.gnu.org.pub \
  535. etc/substitutes/ci.guix.info.pub
  536. # Bash completion file.
  537. dist_bashcompletion_DATA = etc/completion/bash/guix \
  538. etc/completion/bash/guix-daemon
  539. # Zsh completion file.
  540. dist_zshcompletion_DATA = etc/completion/zsh/_guix
  541. # Fish completion file.
  542. dist_fishcompletion_DATA = etc/completion/fish/guix.fish
  543. # SELinux policy
  544. nodist_selinux_policy_DATA = etc/guix-daemon.cil
  545. EXTRA_DIST += \
  546. HACKING \
  547. ROADMAP \
  548. TODO \
  549. CODE-OF-CONDUCT \
  550. .dir-locals.el \
  551. .guix-authorizations \
  552. .guix-channel \
  553. scripts/guix.in \
  554. etc/guix-install.sh \
  555. etc/news.scm \
  556. etc/release-manifest.scm \
  557. etc/system-tests.scm \
  558. etc/historical-authorizations \
  559. build-aux/build-self.scm \
  560. build-aux/compile-all.scm \
  561. build-aux/hydra/evaluate.scm \
  562. build-aux/hydra/gnu-system.scm \
  563. build-aux/hydra/guix.scm \
  564. build-aux/hydra/guix-modular.scm \
  565. build-aux/cuirass/gnu-system.scm \
  566. build-aux/cuirass/guix-modular.scm \
  567. build-aux/cuirass/hurd-manifest.scm \
  568. build-aux/cuirass/hydra-to-cuirass.scm \
  569. build-aux/check-final-inputs-self-contained.scm \
  570. build-aux/check-channel-news.scm \
  571. build-aux/compile-as-derivation.scm \
  572. build-aux/generate-authors.scm \
  573. build-aux/test-driver.scm \
  574. build-aux/update-guix-package.scm \
  575. build-aux/update-NEWS.scm \
  576. tests/test.drv \
  577. tests/signing-key.pub \
  578. tests/signing-key.sec \
  579. tests/cve-sample.json \
  580. tests/civodul.key \
  581. tests/rsa.key \
  582. tests/dsa.key \
  583. tests/ed25519.key \
  584. tests/ed25519.sec \
  585. tests/ed25519bis.key \
  586. tests/ed25519bis.sec \
  587. build-aux/config.rpath \
  588. bootstrap \
  589. doc/build.scm \
  590. $(TESTS)
  591. if !BUILD_DAEMON_OFFLOAD
  592. EXTRA_DIST += \
  593. guix/scripts/offload.scm
  594. endif !BUILD_DAEMON_OFFLOAD
  595. CLEANFILES = \
  596. $(bin_SCRIPTS) \
  597. $(GOBJECTS) \
  598. $(SCM_TESTS:tests/%.scm=%.log)
  599. # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
  600. # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
  601. # there that are newer than the local .scm files (for instance because the
  602. # user ran 'make install' recently). When that happens, we end up loading
  603. # those previously-installed .go files, which may be stale, thereby breaking
  604. # the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly
  605. # stale files from ~/.cache/guile/ccache.
  606. %.go: make-go ; @:
  607. make-go: $(MODULES) guix/config.scm $(dist_noinst_DATA)
  608. $(AM_V_at)echo "Compiling Scheme modules..." ; \
  609. unset GUILE_LOAD_COMPILED_PATH ; \
  610. XDG_CACHE_HOME=/nowhere \
  611. host=$(host) srcdir="$(top_srcdir)" \
  612. $(top_builddir)/pre-inst-env \
  613. $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
  614. --no-auto-compile \
  615. -s "$(top_srcdir)"/build-aux/compile-all.scm $^
  616. SUFFIXES = .go
  617. # Make sure source files are installed first, so that the mtime of
  618. # installed compiled files is greater than that of installed source
  619. # files. See
  620. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
  621. # for details.
  622. guix_install_go_files = install-nobase_nodist_guileobjectDATA
  623. $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
  624. # The above trick doesn't work for 'config.go' because both 'config.scm' and
  625. # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it
  626. # special treatment.
  627. install-data-hook:
  628. touch "$(DESTDIR)$(guileobjectdir)/guix/config.go"
  629. # Commit corresponding to the 'v1.0.0' tag.
  630. commit_v1_0_0 = 6298c3ffd9654d3231a6f25390b056483e8f407c
  631. # Introduction of the 'guix' channel. Keep in sync with (guix channels)!
  632. channel_intro_commit = 9edb3f66fd807b096b48283debdcddccfea34bad
  633. channel_intro_signer = BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA
  634. # Authenticate the current Git checkout by checking signatures on every commit.
  635. GUIX_GIT_KEYRING = origin/keyring
  636. authenticate:
  637. $(AM_V_at)echo "Authenticating Git checkout..." ; \
  638. guix git authenticate \
  639. --keyring=$(GUIX_GIT_KEYRING) \
  640. --cache-key=channels/guix --stats \
  641. "$(channel_intro_commit)" "$(channel_intro_signer)"
  642. # Assuming Guix is already installed and the daemon is up and running, this
  643. # rule builds from $(srcdir), creating and building derivations.
  644. as-derivation:
  645. $(AM_V_at)echo "Building Guix in Guix..." ; \
  646. $(GUILE) --no-auto-compile \
  647. "$(top_srcdir)/build-aux/compile-as-derivation.scm" \
  648. "$(abs_top_srcdir)"
  649. SUBDIRS = po/guix po/packages
  650. BUILT_SOURCES =
  651. include doc/local.mk
  652. if BUILD_DAEMON
  653. include nix/local.mk
  654. endif BUILD_DAEMON
  655. ACLOCAL_AMFLAGS = -I m4
  656. # Pass an explicit '--localstatedir' so that configure does not error out if
  657. # it finds an existing installation with a different localstatedir. Inherit
  658. # 'ac_cv_guix_test_root' so that "make check" in $(distdir) does not have to
  659. # repopulate the whole store, and to make sure $(GUIX_TEST_ROOT) is short
  660. # enough for shebangs.
  661. AM_DISTCHECK_CONFIGURE_FLAGS = \
  662. --localstatedir="$$dc_install_base/var" \
  663. --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
  664. --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
  665. --enable-daemon \
  666. ac_cv_guix_test_root="$(GUIX_TEST_ROOT)"
  667. # Name of the 'guix' package shipped in the binary tarball.
  668. GUIX_FOR_BINARY_TARBALL = guix
  669. # The self-contained tarball.
  670. guix-binary.%.tar.xz:
  671. $(AM_V_GEN)GUIX_PACKAGE_PATH= \
  672. tarball=`$(top_builddir)/pre-inst-env guix pack -C xz \
  673. --fallback \
  674. -s "$*" --localstatedir --profile-name=current-guix \
  675. $(GUIX_FOR_BINARY_TARBALL)` ; \
  676. cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
  677. dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
  678. dist-hook: assert-no-store-file-names
  679. dist-hook: doc-po-update
  680. distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
  681. EXTRA_DIST += $(top_srcdir)/.version
  682. BUILT_SOURCES += $(top_srcdir)/.version
  683. $(top_srcdir)/.version: config.status
  684. $(AM_V_GEN)echo $(VERSION) > "$@-t" && mv "$@-t" "$@"
  685. gen-tarball-version:
  686. echo $(VERSION) > "$(distdir)/.tarball-version"
  687. gen-ChangeLog:
  688. $(AM_V_GEN)if test -d .git; then \
  689. $(top_srcdir)/build-aux/gitlog-to-changelog \
  690. > $(distdir)/ChangeLog.tmp; \
  691. rm -f $(distdir)/ChangeLog; \
  692. mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
  693. fi
  694. gen-AUTHORS:
  695. $(AM_V_GEN)if test -d .git; then \
  696. rm -f "$(distdir)/AUTHORS"; \
  697. $(top_builddir)/pre-inst-env "$(GUILE)" \
  698. "$(top_srcdir)/build-aux/generate-authors.scm" \
  699. "$(top_srcdir)" "$(distdir)/AUTHORS"; \
  700. fi
  701. # Like 'dist', but regenerate 'configure' so we get an up-to-date
  702. # 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to
  703. # do that whenever a 'dist' target is used.)
  704. dist-with-updated-version:
  705. @echo "Running './bootstrap' for new version string..."
  706. $(top_srcdir)/bootstrap
  707. $(MAKE) $(AM_MAKEFLAGS) $(top_srcdir)/.version dist
  708. .PHONY: dist-with-updated-version
  709. #
  710. # Release management.
  711. #
  712. releasedir = release-$(PACKAGE_VERSION)
  713. PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
  714. # List of source tarballs produced. This must be kept in sync with the
  715. # 'dist-' options of 'AM_INIT_AUTOMAKE' in 'configure.ac'.
  716. SOURCE_TARBALLS = \
  717. $(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
  718. # Systems supported by Guix.
  719. SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux
  720. # Guix binary tarballs.
  721. BINARY_TARBALLS = \
  722. $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz)
  723. # Systems supported by Guix System.
  724. GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
  725. # Systems for which we build Guix VMs.
  726. GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux
  727. # Prefix of the Guix installation image file name.
  728. GUIX_SYSTEM_IMAGE_BASE = guix-system-install-$(PACKAGE_VERSION)
  729. # Prefix of the Guix VM image file name.
  730. GUIX_SYSTEM_VM_IMAGE_BASE = guix-system-vm-image-$(PACKAGE_VERSION)
  731. # Flags for 'guix system vm-image'. By default create a VM image that appears
  732. # to have a 20G hard disk.
  733. GUIX_SYSTEM_VM_IMAGE_FLAGS ?= --image-size=30G
  734. # Return the sequence of '-s' flags for the given systems.
  735. system_flags = $(foreach system,$(1),-s $(system))
  736. # The release process works in several phases:
  737. #
  738. # 0. We assume the developer created a 'vX.Y' tag.
  739. # 1. Build the source tarball.
  740. # 2. Update the 'guix' package so that it corresponds to the 'vX.Y' tag.
  741. # 3. Build the binary tarballs for that 'guix' package.
  742. # 4. Update the 'guix' package again.
  743. # 5. Build the installation images. The images will run 'guix'
  744. # corresponding to 'vX.Y' + 1 commit, and they will install 'vX.Y'.
  745. #
  746. # This 'release' target takes care of everything and copies the resulting
  747. # files to $(releasedir).
  748. #
  749. # XXX: Depend on 'dist' rather than 'distcheck' to work around the Gettext
  750. # issue described at <https://savannah.gnu.org/bugs/index.php?51027>.
  751. release: dist-with-updated-version
  752. cd po; git checkout .
  753. @if ! git diff-index --quiet HEAD; then \
  754. echo "There are uncommitted changes; stopping." >&2 ; \
  755. exit 1 ; \
  756. fi
  757. $(MKDIR_P) "$(releasedir)"
  758. rm -f "$(releasedir)"/*
  759. mv $(SOURCE_TARBALLS) "$(releasedir)"
  760. GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \
  761. $(top_builddir)/pre-inst-env "$(GUILE)" \
  762. $(top_srcdir)/build-aux/update-guix-package.scm \
  763. "`git rev-parse HEAD`" "$(PACKAGE_VERSION)"
  764. git add $(top_srcdir)/gnu/packages/package-management.scm
  765. git commit -m "gnu: guix: Update to $(PACKAGE_VERSION)."
  766. $(top_builddir)/pre-inst-env guix build $(GUIX_FOR_BINARY_TARBALL) \
  767. $(call system_flags,$(SUPPORTED_SYSTEMS)) \
  768. -v1 --no-grafts --fallback
  769. rm -f $(BINARY_TARBALLS)
  770. $(MAKE) $(BINARY_TARBALLS)
  771. for system in $(SUPPORTED_SYSTEMS) ; do \
  772. mv "guix-binary.$$system.tar.xz" \
  773. "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \
  774. done
  775. GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \
  776. $(top_builddir)/pre-inst-env "$(GUILE)" \
  777. $(top_srcdir)/build-aux/update-guix-package.scm \
  778. "`git rev-parse HEAD`"
  779. git add $(top_srcdir)/gnu/packages/package-management.scm
  780. git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`."
  781. $(top_builddir)/pre-inst-env guix build guix \
  782. $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \
  783. -v1 --no-grafts --fallback
  784. for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \
  785. image=`$(top_builddir)/pre-inst-env \
  786. guix system disk-image -t iso9660 \
  787. --label="GUIX_$${system}_$(VERSION)" \
  788. --system=$$system --fallback \
  789. gnu/system/install.scm` ; \
  790. if [ ! -f "$$image" ] ; then \
  791. echo "failed to produced Guix installation image for $$system" >&2 ; \
  792. exit 1 ; \
  793. fi ; \
  794. xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" ; \
  795. mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" \
  796. "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz" ; \
  797. done
  798. for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \
  799. image=`$(top_builddir)/pre-inst-env \
  800. guix system vm-image $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \
  801. --save-provenance \
  802. --system=$$system --fallback \
  803. gnu/system/examples/vm-image.tmpl` ; \
  804. if [ ! -f "$$image" ] ; then \
  805. echo "failed to produced Guix VM image for $$system" >&2 ; \
  806. exit 1 ; \
  807. fi ; \
  808. xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz.tmp" ; \
  809. mv "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz.tmp" \
  810. "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.xz" ; \
  811. done
  812. @echo
  813. @echo "Congratulations! All the release files are now in $(releasedir)."
  814. @echo
  815. update-guix-package:
  816. git rev-parse HEAD
  817. $(top_builddir)/pre-inst-env "$(GUILE)" \
  818. $(top_srcdir)/build-aux/update-guix-package.scm \
  819. "`git rev-parse HEAD`"
  820. # Location of a checkout of <git://git.savannah.gnu.org/guix/maintenance.git>.
  821. # Package data from this checkout is used by 'update-NEWS.scm'.
  822. GUIX_MAINTENANCE_DIRECTORY ?= $(top_srcdir)/../guix-maintenance
  823. update-NEWS: $(GOBJECTS)
  824. $(top_builddir)/pre-inst-env "$(GUILE)" \
  825. $(top_srcdir)/build-aux/update-NEWS.scm \
  826. $(top_srcdir)/NEWS "$(GUIX_MAINTENANCE_DIRECTORY)/data"
  827. # Make sure we're not shipping a file that embeds a local /gnu/store file name.
  828. assert-no-store-file-names:
  829. $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
  830. --exclude=*.info-[0-9] --exclude=*.dot \
  831. --exclude=*.eps --exclude-dir=bootstrap \
  832. --exclude=guix-manual.pot --exclude=guix-manual.*.po \
  833. --exclude=guix-cookbook.pot --exclude=guix-cookbook.*.po \
  834. --exclude=guix-prettify.el \
  835. --exclude=ChangeLog* \
  836. --exclude=binutils-boot-2.20*.patch \
  837. -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
  838. then \
  839. echo "error: store file names embedded in the distribution" >&2 ; \
  840. exit 1 ; \
  841. fi
  842. # Make sure important substitutes are available.
  843. assert-binaries-available: $(GOBJECTS)
  844. $(AM_V_at)$(top_builddir)/pre-inst-env \
  845. guix weather -m "$(top_srcdir)/etc/release-manifest.scm" \
  846. --display-missing
  847. # Make sure the final inputs don't refer to bootstrap tools.
  848. assert-final-inputs-self-contained: $(GOBJECTS)
  849. $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
  850. "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
  851. # Validate channel news.
  852. check-channel-news: $(GOBJECTS)
  853. $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
  854. "$(top_srcdir)/build-aux/check-channel-news.scm"
  855. # Compute the Hydra jobs and write them in the target file.
  856. hydra-jobs.scm: $(GOBJECTS)
  857. $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
  858. $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
  859. "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
  860. "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
  861. $(AM_V_at)mv "$@.tmp" "$@"
  862. # Compute the Cuirass jobs and write them in the target file.
  863. cuirass-jobs.scm: $(GOBJECTS)
  864. $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
  865. $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
  866. "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
  867. "$(top_srcdir)/build-aux/cuirass/gnu-system.scm" \
  868. cuirass > "$@.tmp"
  869. $(AM_V_at)mv "$@.tmp" "$@"
  870. .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
  871. .PHONY: assert-no-store-file-names assert-binaries-available
  872. .PHONY: assert-final-inputs-self-contained check-channel-news
  873. .PHONY: clean-go make-go as-derivation authenticate
  874. .PHONY: update-guix-package update-NEWS release
  875. # Downloading up-to-date PO files.
  876. # make-download-po-rule DOMAIN DIRECTORY [FILE-NAME-PREFIX]
  877. define make-download-po-rule
  878. download-po.$(1):
  879. if [ -f "$(top_srcdir)/$(2)/LINGUAS" ]; then \
  880. LINGUAS="`grep -v '^[[:blank:]]*#' < $(top_srcdir)/$(2)/LINGUAS`" ; \
  881. else \
  882. LINGUAS="`(cd $(top_srcdir)/$(2); \
  883. for i in *.po; do echo $$$$i; done) | cut -d . -f 2`" ; \
  884. fi ; \
  885. for lang in $$$$LINGUAS; do \
  886. if wget -nv -O "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" \
  887. "https://translate.fedoraproject.org/api/translations/guix/$(1)/$$$$lang/file/" ; \
  888. then \
  889. msgfilter --no-wrap -i "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" \
  890. cat > "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp2" ; \
  891. rm "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" ; \
  892. mv "$(top_srcdir)/$(2)/$(3)$$$$lang.po"{.tmp2,} ; \
  893. else \
  894. rm "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" ; \
  895. fi ; \
  896. done
  897. .PHONY: download-po.$(1)
  898. endef
  899. # Checking po files for issues. This is useful to run after downloading new
  900. # po files.
  901. # make-check-po-rule DOMAIN DIRECTORY [FILE-NAME-PREFIX]
  902. define make-check-po-rule
  903. check-po.$(1):
  904. if [ -f "$(top_srcdir)/$(2)/LINGUAS" ]; then \
  905. LINGUAS="`grep -v '^[[:blank:]]*#' < $(top_srcdir)/$(2)/LINGUAS`" ; \
  906. else \
  907. LINGUAS="`(cd $(top_srcdir)/$(2); \
  908. for i in *.po; do echo $$$$i; done) | cut -d . -f 2`" ; \
  909. fi ; \
  910. for lang in $$$$LINGUAS; do \
  911. if [ -f "$(top_srcdir)/$(2)/$(3)$$$$lang.po" ]; \
  912. then \
  913. if ! msgfmt -c "$(top_srcdir)/$(2)/$(3)$$$$lang.po" ; \
  914. then \
  915. exit 1 ; \
  916. fi ; \
  917. fi ; \
  918. done
  919. .PHONY: check-po.$(1)
  920. endef
  921. $(eval $(call make-download-po-rule,documentation-cookbook,po/doc,guix-cookbook.))
  922. $(eval $(call make-download-po-rule,documentation-manual,po/doc,guix-manual.))
  923. $(eval $(call make-download-po-rule,guix,po/guix))
  924. $(eval $(call make-download-po-rule,packages,po/packages))
  925. $(eval $(call make-check-po-rule,documentation-cookbook,po/doc,guix-cookbook.))
  926. $(eval $(call make-check-po-rule,documentation-manual,po/doc,guix-manual.))
  927. $(eval $(call make-check-po-rule,guix,po/guix))
  928. $(eval $(call make-check-po-rule,packages,po/packages))
  929. download-po: $(foreach domain,guix packages documentation-manual documentation-cookbook,download-po.$(domain))
  930. .PHONY: download-po
  931. check-po: $(foreach domain,guix packages documentation-manual documentation-cookbook,check-po.$(domain))
  932. .PHONY: check-po
  933. ## -------------- ##
  934. ## Silent rules. ##
  935. ## -------------- ##
  936. AM_V_DL = $(AM_V_DL_$(V))
  937. AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
  938. AM_V_DL_0 = @echo " DL " $@;
  939. AM_V_DOT = $(AM_V_DOT_$(V))
  940. AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
  941. AM_V_DOT_0 = @echo " DOT " $@;
  942. AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
  943. AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
  944. AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
  945. AM_V_PO4A = $(AM_V_PO4A_$(V))
  946. AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
  947. AM_V_PO4A_0 = @echo " PO4A" $@;
  948. AM_V_POXREF = $(AM_V_POXREF_$(V))
  949. AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY))
  950. AM_V_POXREF_0 = @echo " POXREF" $@;