You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

334 lines
9.0 KiB

  1. # GNU Guix --- Functional package management for GNU
  2. # Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
  3. # Copyright © 2013 Andreas Enge <andreas@enge.fr>
  4. #
  5. # This file is part of GNU Guix.
  6. #
  7. # GNU Guix is free software; you can redistribute it and/or modify it
  8. # under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 3 of the License, or (at
  10. # your option) any later version.
  11. #
  12. # GNU Guix is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. bin_SCRIPTS = \
  20. scripts/guix
  21. nodist_noinst_SCRIPTS = \
  22. pre-inst-env \
  23. test-env
  24. include gnu-system.am
  25. MODULES = \
  26. guix/base32.scm \
  27. guix/base64.scm \
  28. guix/records.scm \
  29. guix/hash.scm \
  30. guix/pk-crypto.scm \
  31. guix/pki.scm \
  32. guix/utils.scm \
  33. guix/download.scm \
  34. guix/git-download.scm \
  35. guix/monads.scm \
  36. guix/monad-repl.scm \
  37. guix/gexp.scm \
  38. guix/profiles.scm \
  39. guix/serialization.scm \
  40. guix/nar.scm \
  41. guix/derivations.scm \
  42. guix/gnu-maintenance.scm \
  43. guix/licenses.scm \
  44. guix/build-system.scm \
  45. guix/build-system/cmake.scm \
  46. guix/build-system/gnu.scm \
  47. guix/build-system/perl.scm \
  48. guix/build-system/python.scm \
  49. guix/build-system/ruby.scm \
  50. guix/build-system/trivial.scm \
  51. guix/ftp-client.scm \
  52. guix/http-client.scm \
  53. guix/gnupg.scm \
  54. guix/store.scm \
  55. guix/svn-download.scm \
  56. guix/ui.scm \
  57. guix/build/download.scm \
  58. guix/build/cmake-build-system.scm \
  59. guix/build/git.scm \
  60. guix/build/gnu-build-system.scm \
  61. guix/build/gnu-dist.scm \
  62. guix/build/perl-build-system.scm \
  63. guix/build/python-build-system.scm \
  64. guix/build/ruby-build-system.scm \
  65. guix/build/store-copy.scm \
  66. guix/build/utils.scm \
  67. guix/build/union.scm \
  68. guix/build/pull.scm \
  69. guix/build/rpath.scm \
  70. guix/build/svn.scm \
  71. guix/build/syscalls.scm \
  72. guix/build/emacs-utils.scm \
  73. guix/packages.scm \
  74. guix/import/utils.scm \
  75. guix/import/snix.scm \
  76. guix/import/pypi.scm \
  77. guix/scripts/download.scm \
  78. guix/scripts/build.scm \
  79. guix/scripts/archive.scm \
  80. guix/scripts/import.scm \
  81. guix/scripts/package.scm \
  82. guix/scripts/gc.scm \
  83. guix/scripts/hash.scm \
  84. guix/scripts/pull.scm \
  85. guix/scripts/substitute-binary.scm \
  86. guix/scripts/authenticate.scm \
  87. guix/scripts/refresh.scm \
  88. guix/scripts/system.scm \
  89. guix/scripts/lint.scm \
  90. guix/scripts/import/nix.scm \
  91. guix/scripts/import/pypi.scm \
  92. guix.scm \
  93. $(GNU_SYSTEM_MODULES)
  94. if BUILD_DAEMON_OFFLOAD
  95. MODULES += \
  96. guix/scripts/offload.scm
  97. endif BUILD_DAEMON_OFFLOAD
  98. # Internal module with test suite support.
  99. noinst_DATA = guix/tests.scm
  100. # Because of the autoload hack in (guix build download), we must build it
  101. # first to avoid errors on systems where (gnutls) is unavailable.
  102. guix/scripts/download.go: guix/build/download.go
  103. guix/download.go: guix/build/download.go
  104. # Linux-Libre configurations.
  105. KCONFIGS = \
  106. gnu/packages/linux-libre-i686.conf \
  107. gnu/packages/linux-libre-x86_64.conf
  108. # Templates, examples.
  109. EXAMPLES = \
  110. gnu/system/os-config.tmpl
  111. GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
  112. nobase_dist_guilemodule_DATA = $(MODULES) $(KCONFIGS) $(EXAMPLES)
  113. nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
  114. # Do we need to provide our own non-broken (srfi srfi-37) module?
  115. if INSTALL_SRFI_37
  116. nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
  117. GOBJECTS += srfi/srfi-37.go
  118. srfi/srfi-37.scm: srfi/srfi-37.scm.in
  119. $(MKDIR_P) srfi
  120. cp "$<" "$@"
  121. endif INSTALL_SRFI_37
  122. # Handy way to remove the .go files without removing all the rest.
  123. clean-go:
  124. -$(RM) -f $(GOBJECTS)
  125. SCM_TESTS = \
  126. tests/base32.scm \
  127. tests/base64.scm \
  128. tests/hash.scm \
  129. tests/pk-crypto.scm \
  130. tests/pki.scm \
  131. tests/substitute-binary.scm \
  132. tests/builders.scm \
  133. tests/derivations.scm \
  134. tests/ui.scm \
  135. tests/records.scm \
  136. tests/utils.scm \
  137. tests/build-utils.scm \
  138. tests/packages.scm \
  139. tests/snix.scm \
  140. tests/store.scm \
  141. tests/monads.scm \
  142. tests/gexp.scm \
  143. tests/nar.scm \
  144. tests/union.scm \
  145. tests/profiles.scm \
  146. tests/syscalls.scm \
  147. tests/lint.scm
  148. if HAVE_GUILE_JSON
  149. SCM_TESTS += tests/pypi.scm
  150. endif
  151. SH_TESTS = \
  152. tests/guix-build.sh \
  153. tests/guix-download.sh \
  154. tests/guix-gc.sh \
  155. tests/guix-hash.sh \
  156. tests/guix-package.sh \
  157. tests/guix-system.sh \
  158. tests/guix-archive.sh \
  159. tests/guix-authenticate.sh
  160. if BUILD_DAEMON
  161. SH_TESTS += tests/guix-register.sh
  162. endif BUILD_DAEMON
  163. TESTS = $(SCM_TESTS) $(SH_TESTS)
  164. TEST_EXTENSIONS = .scm .sh
  165. AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
  166. SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
  167. AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
  168. SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
  169. AM_SH_LOG_FLAGS = -x -e
  170. # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
  171. # could end up removing files from the store while they are being used by
  172. # other instances of the daemon.
  173. tests/guix-gc.log: \
  174. $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
  175. $(SCM_TESTS:%.scm=%.log)
  176. # Public key used to sign substitutes from hydra.gnu.org.
  177. dist_pkgdata_DATA = hydra.gnu.org.pub
  178. EXTRA_DIST = \
  179. HACKING \
  180. ROADMAP \
  181. TODO \
  182. .dir-locals.el \
  183. build-aux/hydra/gnu-system.scm \
  184. build-aux/hydra/demo-os.scm \
  185. build-aux/hydra/guix.scm \
  186. build-aux/check-available-binaries.scm \
  187. build-aux/check-final-inputs-self-contained.scm \
  188. build-aux/download.scm \
  189. build-aux/list-packages.scm \
  190. build-aux/sync-descriptions.scm \
  191. srfi/srfi-37.scm.in \
  192. srfi/srfi-64.scm \
  193. srfi/srfi-64.upstream.scm \
  194. tests/test.drv \
  195. tests/signing-key.pub \
  196. tests/signing-key.sec \
  197. build-aux/config.rpath \
  198. bootstrap \
  199. release.nix \
  200. $(TESTS)
  201. if !BUILD_DAEMON_OFFLOAD
  202. EXTRA_DIST += \
  203. guix/scripts/offload.scm
  204. endif !BUILD_DAEMON_OFFLOAD
  205. CLEANFILES = \
  206. $(GOBJECTS) \
  207. $(SCM_TESTS:tests/%.scm=%.log)
  208. AM_V_GUILEC = $(AM_V_GUILEC_$(V))
  209. AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
  210. AM_V_GUILEC_0 = @echo " GUILEC" $@;
  211. # XXX: Use the C locale for when Guile lacks
  212. # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
  213. .scm.go:
  214. $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
  215. LC_ALL=C \
  216. $(top_builddir)/pre-inst-env \
  217. $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
  218. -Wformat -Wunbound-variable -Warity-mismatch \
  219. --target="$(host)" \
  220. -o "$@" "$<"
  221. SUFFIXES = .go
  222. # Make sure source files are installed first, so that the mtime of
  223. # installed compiled files is greater than that of installed source
  224. # files. See
  225. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
  226. # for details.
  227. guix_install_go_files = install-nobase_nodist_guilemoduleDATA
  228. $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
  229. SUBDIRS = po/guix po/packages
  230. BUILT_SOURCES =
  231. include doc.am
  232. if BUILD_DAEMON
  233. include daemon.am
  234. endif BUILD_DAEMON
  235. ACLOCAL_AMFLAGS = -I m4
  236. AM_DISTCHECK_CONFIGURE_FLAGS = \
  237. --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
  238. --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
  239. --with-nix-prefix="$(NIX_PREFIX)" \
  240. --enable-daemon
  241. dist_emacsui_DATA = emacs/guix-main.scm
  242. nodist_emacsui_DATA = emacs/guix-helper.scm
  243. include emacs.am
  244. dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
  245. distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
  246. sync-descriptions:
  247. -$(top_builddir)/pre-inst-env $(GUILE) \
  248. $(top_srcdir)/build-aux/sync-descriptions.scm
  249. gen-ChangeLog:
  250. if test -d .git; then \
  251. $(top_srcdir)/build-aux/gitlog-to-changelog \
  252. > $(distdir)/cl-t; \
  253. rm -f $(distdir)/ChangeLog; \
  254. mv $(distdir)/cl-t $(distdir)/ChangeLog; \
  255. fi
  256. # Make sure we're not shipping a file that embeds a local /gnu/store file name.
  257. assert-no-store-file-names:
  258. if grep -r --exclude=*.texi --exclude=*.info \
  259. "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
  260. then \
  261. echo "error: store file names embedded in the distribution" >&2 ; \
  262. exit 1 ; \
  263. fi
  264. # Make sure hydra.gnu.org has the important binaries.
  265. assert-binaries-available:
  266. $(top_builddir)/pre-inst-env "$(GUILE)" \
  267. "$(top_srcdir)/build-aux/check-available-binaries.scm"
  268. # Make sure the final inputs don't refer to bootstrap tools.
  269. assert-final-inputs-self-contained:
  270. $(top_builddir)/pre-inst-env "$(GUILE)" \
  271. "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
  272. .PHONY: sync-descriptions gen-ChangeLog clean-go
  273. .PHONY: assert-no-store-file-names assert-binaries-available
  274. .PHONY: assert-final-inputs-self-contained