1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014, 2015 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 = \
40 guix/git-download.scm \
45 guix/serialization.scm \
47 guix/derivations.scm \
48 guix/gnu-maintenance.scm \
50 guix/build-system.scm \
51 guix/build-system/cmake.scm \
52 guix/build-system/glib-or-gtk.scm \
53 guix/build-system/gnu.scm \
54 guix/build-system/perl.scm \
55 guix/build-system/python.scm \
56 guix/build-system/waf.scm \
57 guix/build-system/ruby.scm \
58 guix/build-system/trivial.scm \
60 guix/http-client.scm \
64 guix/cvs-download.scm \
65 guix/svn-download.scm \
67 guix/build/download.scm \
68 guix/build/cmake-build-system.scm \
70 guix/build/glib-or-gtk-build-system.scm \
71 guix/build/gnu-build-system.scm \
72 guix/build/gnu-dist.scm \
73 guix/build/perl-build-system.scm \
74 guix/build/python-build-system.scm \
75 guix/build/ruby-build-system.scm \
76 guix/build/waf-build-system.scm \
77 guix/build/store-copy.scm \
78 guix/build/utils.scm \
79 guix/build/union.scm \
81 guix/build/rpath.scm \
84 guix/build/syscalls.scm \
85 guix/build/gremlin.scm \
86 guix/build/emacs-utils.scm \
87 guix/build/graft.scm \
89 guix/import/utils.scm \
91 guix/import/snix.scm \
92 guix/scripts/download.scm \
93 guix/scripts/build.scm \
94 guix/scripts/archive.scm \
95 guix/scripts/import.scm \
96 guix/scripts/package.scm \
98 guix/scripts/hash.scm \
99 guix/scripts/pull.scm \
100 guix/scripts/substitute.scm \
101 guix/scripts/authenticate.scm \
102 guix/scripts/refresh.scm \
103 guix/scripts/system.scm \
104 guix/scripts/lint.scm \
105 guix/scripts/import/gnu.scm \
106 guix/scripts/import/nix.scm \
107 guix/scripts/environment.scm \
108 guix/scripts/publish.scm \
110 $(GNU_SYSTEM_MODULES)
112 if BUILD_DAEMON_OFFLOAD
115 guix/scripts/offload.scm
117 endif BUILD_DAEMON_OFFLOAD
119 # Internal module with test suite support.
120 dist_noinst_DATA = guix/tests.scm
122 # Because of the autoload hack in (guix build download), we must build it
123 # first to avoid errors on systems where (gnutls) is unavailable.
124 guix/scripts/download.go: guix/build/download.go
125 guix/download.go: guix/build/download.go
127 # Linux-Libre configurations.
129 gnu/packages/linux-libre-i686.conf \
130 gnu/packages/linux-libre-x86_64.conf
132 # Templates, examples.
134 gnu/system/os-config.tmpl
136 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
138 nobase_dist_guilemodule_DATA = \
139 $(MODULES) $(KCONFIGS) $(EXAMPLES) \
141 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
143 # Do we need to provide our own non-broken (srfi srfi-37) module?
146 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
147 GOBJECTS += srfi/srfi-37.go
149 srfi/srfi-37.scm: srfi/srfi-37.scm.in
153 endif INSTALL_SRFI_37
155 # Handy way to remove the .go files without removing all the rest.
157 -$(RM) -f $(GOBJECTS)
164 tests/pk-crypto.scm \
167 tests/substitute.scm \
169 tests/derivations.scm \
173 tests/build-utils.scm \
190 guix/import/json.scm \
191 guix/import/pypi.scm \
192 guix/scripts/import/pypi.scm \
193 guix/import/cpan.scm \
194 guix/scripts/import/cpan.scm
203 tests/guix-build.sh \
204 tests/guix-download.sh \
207 tests/guix-package.sh \
208 tests/guix-package-net.sh \
209 tests/guix-system.sh \
210 tests/guix-archive.sh \
211 tests/guix-authenticate.sh \
216 SH_TESTS += tests/guix-register.sh
221 TESTS = $(SCM_TESTS) $(SH_TESTS)
223 TEST_EXTENSIONS = .scm .sh
225 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
227 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
228 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
230 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
231 AM_SH_LOG_FLAGS = -x -e
233 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
234 # could end up removing files from the store while they are being used by
235 # other instances of the daemon.
237 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
238 $(SCM_TESTS:%.scm=%.log)
240 # Public key used to sign substitutes from hydra.gnu.org.
241 dist_pkgdata_DATA = hydra.gnu.org.pub
248 build-aux/build-self.scm \
249 build-aux/hydra/gnu-system.scm \
250 build-aux/hydra/demo-os.scm \
251 build-aux/hydra/guix.scm \
252 build-aux/check-available-binaries.scm \
253 build-aux/check-final-inputs-self-contained.scm \
254 build-aux/download.scm \
255 build-aux/list-packages.scm \
256 srfi/srfi-37.scm.in \
258 srfi/srfi-64.upstream.scm \
260 tests/signing-key.pub \
261 tests/signing-key.sec \
262 build-aux/config.rpath \
267 if !BUILD_DAEMON_OFFLOAD
270 guix/scripts/offload.scm
272 endif !BUILD_DAEMON_OFFLOAD
277 $(SCM_TESTS:tests/%.scm=%.log)
279 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
280 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
281 AM_V_GUILEC_0 = @echo " GUILEC" $@;
283 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
284 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
285 # there that are newer than the local .scm files (for instance because the
286 # user ran 'make install' recently). When that happens, we end up loading
287 # those previously-installed .go files, which may be stale, thereby breaking
290 # XXX: Use the C locale for when Guile lacks
291 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
293 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
294 unset GUILE_LOAD_COMPILED_PATH ; \
296 $(top_builddir)/pre-inst-env \
297 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
298 -Wformat -Wunbound-variable -Warity-mismatch \
304 # Make sure source files are installed first, so that the mtime of
305 # installed compiled files is greater than that of installed source
307 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
309 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
310 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
312 # The above trick doesn't work for 'config.go' because both 'config.scm' and
313 # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it
315 install-data-hook: set-bootstrap-executable-permissions
316 touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
319 SUBDIRS = po/guix po/packages
330 ACLOCAL_AMFLAGS = -I m4
331 AM_DISTCHECK_CONFIGURE_FLAGS = \
332 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
333 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
334 --with-nix-prefix="$(NIX_PREFIX)" \
337 dist_emacsui_DATA = emacs/guix-main.scm
338 nodist_emacsui_DATA = emacs/guix-helper.scm
341 dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
342 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
345 -GUIX_PACKAGE_PATH= \
346 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
349 if test -d .git; then \
350 $(top_srcdir)/build-aux/gitlog-to-changelog \
352 rm -f $(distdir)/ChangeLog; \
353 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
356 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
357 assert-no-store-file-names:
358 if grep -r --exclude=*.texi --exclude=*.info \
359 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
361 echo "error: store file names embedded in the distribution" >&2 ; \
365 # Make sure hydra.gnu.org has the important binaries.
366 assert-binaries-available:
367 $(top_builddir)/pre-inst-env "$(GUILE)" \
368 "$(top_srcdir)/build-aux/check-available-binaries.scm"
370 # Make sure the final inputs don't refer to bootstrap tools.
371 assert-final-inputs-self-contained:
372 $(top_builddir)/pre-inst-env "$(GUILE)" \
373 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
375 .PHONY: sync-descriptions gen-ChangeLog clean-go
376 .PHONY: assert-no-store-file-names assert-binaries-available
377 .PHONY: assert-final-inputs-self-contained