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.
 
 
 
 
 
 

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