Makefile.am 32 KB

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