Makefile.am 33 KB

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