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>
5 # This file is part of GNU Guix.
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.
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.
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/>.
23 nodist_noinst_SCRIPTS = \
30 guix/scripts/build.scm \
31 guix/scripts/download.scm \
32 guix/scripts/import.scm \
33 guix/scripts/package.scm \
35 guix/scripts/hash.scm \
36 guix/scripts/pull.scm \
37 guix/scripts/substitute-binary.scm \
38 guix/scripts/refresh.scm \
43 guix/serialization.scm \
45 guix/derivations.scm \
47 guix/gnu-maintenance.scm \
49 guix/build-system.scm \
50 guix/build-system/cmake.scm \
51 guix/build-system/gnu.scm \
52 guix/build-system/perl.scm \
53 guix/build-system/python.scm \
54 guix/build-system/trivial.scm \
60 guix/build/download.scm \
61 guix/build/cmake-build-system.scm \
62 guix/build/gnu-build-system.scm \
63 guix/build/perl-build-system.scm \
64 guix/build/python-build-system.scm \
65 guix/build/utils.scm \
66 guix/build/union.scm \
67 guix/build/rpath.scm \
73 # Because of the autoload hack in (guix build download), we must build it
74 # first to avoid errors on systems where (gnutls) is unavailable.
75 guix/scripts/download.go: guix/build/download.go
77 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
79 nobase_dist_guilemodule_DATA = $(MODULES)
82 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
88 tests/derivations.scm \
92 tests/build-utils.scm \
100 tests/guix-build.sh \
101 tests/guix-download.sh \
104 tests/guix-package.sh
106 TESTS = $(SCM_TESTS) $(SH_TESTS)
108 TEST_EXTENSIONS = .scm .sh
110 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
112 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
113 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
115 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
116 AM_SH_LOG_FLAGS = -x -e
118 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
119 # could end up removing files from the store while they are being used by
120 # other instances of the daemon.
122 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
123 $(SCM_TESTS:%.scm=%.log)
131 build-aux/hydra/gnu-system.scm \
132 build-aux/download.scm \
133 build-aux/list-packages.scm \
134 build-aux/sync-synopses.scm \
136 srfi/srfi-64.upstream.scm \
138 build-aux/config.rpath \
145 $(SCM_TESTS:tests/%.scm=%.log)
147 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
148 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
149 AM_V_GUILEC_0 = @echo " GUILEC" $@;
151 # XXX: Use the C locale for when Guile lacks
152 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
154 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
156 $(top_builddir)/pre-inst-env \
157 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
158 -Wformat -Wunbound-variable -Warity-mismatch \
164 # Make sure source files are installed first, so that the mtime of
165 # installed compiled files is greater than that of installed source
167 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
169 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
170 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
174 info_TEXINFOS = doc/guix.texi
177 doc/images/bootstrap-graph.dot \
178 doc/images/bootstrap-graph.eps
180 infoimagedir = $(infodir)/images
181 dist_infoimage_DATA = doc/images/bootstrap-graph.png
183 # Try hard to obtain an image size and aspect that's reasonable for inclusion
184 # in an Info or PDF document.
186 -Tpng -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
187 -Nfontsize=9 -Nheight=.1 -Nwidth=.1
190 dot -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
194 dot -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
197 doc/guix.pdf: doc/images/bootstrap-graph.png
198 doc/guix.info: doc/images/bootstrap-graph.png
199 doc/guix.ps: doc/images/bootstrap-graph.eps
207 ACLOCAL_AMFLAGS = -I m4
208 AM_DISTCHECK_CONFIGURE_FLAGS = \
209 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
210 --with-nix-prefix="$(NIX_PREFIX)" \
213 dist-hook: sync-synopses gen-ChangeLog assert-no-store-file-names
216 -$(top_builddir)/pre-inst-env $(GUILE) \
217 $(top_srcdir)/build-aux/sync-synopses.scm
220 if test -d .git; then \
221 $(top_srcdir)/build-aux/gitlog-to-changelog \
223 rm -f $(distdir)/ChangeLog; \
224 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
227 # Make sure we're not shipping a file that embeds a local /nix/store file name.
228 assert-no-store-file-names:
229 if grep -r --exclude=*.texi --exclude=*.info \
230 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
232 echo "error: store file names embedded in the distribution" >&2 ; \
236 .PHONY: sync-synopses gen-ChangeLog assert-no-store-file-names