Makefile.am 41 KB

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