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.
 
 
 
 
 
 

264 lines
7.2 KiB

  1. # GNU Guix --- Functional package management for GNU
  2. # Copyright © 2012, 2013 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/records.scm \
  28. guix/hash.scm \
  29. guix/pk-crypto.scm \
  30. guix/pki.scm \
  31. guix/utils.scm \
  32. guix/download.scm \
  33. guix/monads.scm \
  34. guix/profiles.scm \
  35. guix/serialization.scm \
  36. guix/nar.scm \
  37. guix/derivations.scm \
  38. guix/gnu-maintenance.scm \
  39. guix/licenses.scm \
  40. guix/build-system.scm \
  41. guix/build-system/cmake.scm \
  42. guix/build-system/gnu.scm \
  43. guix/build-system/perl.scm \
  44. guix/build-system/python.scm \
  45. guix/build-system/trivial.scm \
  46. guix/ftp-client.scm \
  47. guix/http-client.scm \
  48. guix/gnupg.scm \
  49. guix/store.scm \
  50. guix/ui.scm \
  51. guix/build/download.scm \
  52. guix/build/cmake-build-system.scm \
  53. guix/build/gnome.scm \
  54. guix/build/gnu-build-system.scm \
  55. guix/build/gnu-dist.scm \
  56. guix/build/linux-initrd.scm \
  57. guix/build/perl-build-system.scm \
  58. guix/build/python-build-system.scm \
  59. guix/build/utils.scm \
  60. guix/build/union.scm \
  61. guix/build/pull.scm \
  62. guix/build/rpath.scm \
  63. guix/packages.scm \
  64. guix/snix.scm \
  65. guix/scripts/download.scm \
  66. guix/scripts/build.scm \
  67. guix/scripts/archive.scm \
  68. guix/scripts/import.scm \
  69. guix/scripts/package.scm \
  70. guix/scripts/gc.scm \
  71. guix/scripts/hash.scm \
  72. guix/scripts/pull.scm \
  73. guix/scripts/substitute-binary.scm \
  74. guix/scripts/authenticate.scm \
  75. guix/scripts/refresh.scm \
  76. guix.scm \
  77. $(GNU_SYSTEM_MODULES)
  78. # Because of the autoload hack in (guix build download), we must build it
  79. # first to avoid errors on systems where (gnutls) is unavailable.
  80. guix/scripts/download.go: guix/build/download.go
  81. guix/download.go: guix/build/download.go
  82. GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
  83. nobase_dist_guilemodule_DATA = $(MODULES)
  84. nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
  85. # Do we need to provide our own non-broken (srfi srfi-37) module?
  86. if INSTALL_SRFI_37
  87. nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
  88. GOBJECTS += srfi/srfi-37.go
  89. srfi/srfi-37.scm: srfi/srfi-37.scm.in
  90. $(MKDIR_P) srfi
  91. cp "$<" "$@"
  92. endif INSTALL_SRFI_37
  93. # Handy way to remove the .go files without removing all the rest.
  94. clean-go:
  95. -$(RM) -f $(GOBJECTS)
  96. SCM_TESTS = \
  97. tests/base32.scm \
  98. tests/hash.scm \
  99. tests/pk-crypto.scm \
  100. tests/pki.scm \
  101. tests/builders.scm \
  102. tests/derivations.scm \
  103. tests/ui.scm \
  104. tests/records.scm \
  105. tests/utils.scm \
  106. tests/build-utils.scm \
  107. tests/packages.scm \
  108. tests/snix.scm \
  109. tests/store.scm \
  110. tests/monads.scm \
  111. tests/nar.scm \
  112. tests/union.scm \
  113. tests/profiles.scm
  114. SH_TESTS = \
  115. tests/guix-build.sh \
  116. tests/guix-download.sh \
  117. tests/guix-gc.sh \
  118. tests/guix-hash.sh \
  119. tests/guix-package.sh \
  120. tests/guix-archive.sh \
  121. tests/guix-authenticate.sh
  122. if BUILD_DAEMON
  123. SH_TESTS += tests/guix-register.sh
  124. endif BUILD_DAEMON
  125. TESTS = $(SCM_TESTS) $(SH_TESTS)
  126. TEST_EXTENSIONS = .scm .sh
  127. AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
  128. SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
  129. AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
  130. SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
  131. AM_SH_LOG_FLAGS = -x -e
  132. # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
  133. # could end up removing files from the store while they are being used by
  134. # other instances of the daemon.
  135. tests/guix-gc.log: \
  136. $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
  137. $(SCM_TESTS:%.scm=%.log)
  138. EXTRA_DIST = \
  139. HACKING \
  140. ROADMAP \
  141. TODO \
  142. .dir-locals.el \
  143. build-aux/hydra/gnu-system.scm \
  144. build-aux/hydra/guix.scm \
  145. build-aux/check-available-binaries.scm \
  146. build-aux/download.scm \
  147. build-aux/list-packages.scm \
  148. build-aux/sync-descriptions.scm \
  149. srfi/srfi-37.scm.in \
  150. srfi/srfi-64.scm \
  151. srfi/srfi-64.upstream.scm \
  152. tests/test.drv \
  153. tests/signing-key.pub \
  154. tests/signing-key.sec \
  155. build-aux/config.rpath \
  156. bootstrap \
  157. release.nix \
  158. $(TESTS)
  159. CLEANFILES = \
  160. $(GOBJECTS) \
  161. $(SCM_TESTS:tests/%.scm=%.log)
  162. AM_V_GUILEC = $(AM_V_GUILEC_$(V))
  163. AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
  164. AM_V_GUILEC_0 = @echo " GUILEC" $@;
  165. # XXX: Use the C locale for when Guile lacks
  166. # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
  167. .scm.go:
  168. $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
  169. LC_ALL=C \
  170. $(top_builddir)/pre-inst-env \
  171. $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
  172. -Wformat -Wunbound-variable -Warity-mismatch \
  173. --target="$(host)" \
  174. -o "$@" "$<"
  175. SUFFIXES = .go
  176. # Make sure source files are installed first, so that the mtime of
  177. # installed compiled files is greater than that of installed source
  178. # files. See
  179. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
  180. # for details.
  181. guix_install_go_files = install-nobase_nodist_guilemoduleDATA
  182. $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
  183. SUBDIRS = po
  184. include doc.am
  185. if BUILD_DAEMON
  186. include daemon.am
  187. endif BUILD_DAEMON
  188. ACLOCAL_AMFLAGS = -I m4
  189. AM_DISTCHECK_CONFIGURE_FLAGS = \
  190. --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
  191. --with-nix-prefix="$(NIX_PREFIX)" \
  192. --enable-daemon
  193. dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
  194. distcheck-hook: assert-binaries-available
  195. sync-descriptions:
  196. -$(top_builddir)/pre-inst-env $(GUILE) \
  197. $(top_srcdir)/build-aux/sync-descriptions.scm
  198. gen-ChangeLog:
  199. if test -d .git; then \
  200. $(top_srcdir)/build-aux/gitlog-to-changelog \
  201. > $(distdir)/cl-t; \
  202. rm -f $(distdir)/ChangeLog; \
  203. mv $(distdir)/cl-t $(distdir)/ChangeLog; \
  204. fi
  205. # Make sure we're not shipping a file that embeds a local /nix/store file name.
  206. assert-no-store-file-names:
  207. if grep -r --exclude=*.texi --exclude=*.info \
  208. "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
  209. then \
  210. echo "error: store file names embedded in the distribution" >&2 ; \
  211. exit 1 ; \
  212. fi
  213. # Make sure hydra.gnu.org has the important binaries.
  214. assert-binaries-available:
  215. $(top_builddir)/pre-inst-env "$(GUILE)" \
  216. "$(top_srcdir)/build-aux/check-available-binaries.scm"
  217. .PHONY: sync-descriptions gen-ChangeLog clean-go
  218. .PHONY: assert-no-store-file-names assert-binaries-available