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>
4 # Copyright © 2015 Alex Kost <alezost@gmail.com>
6 # This file is part of GNU Guix.
8 # GNU Guix is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or (at
11 # your option) any later version.
13 # GNU Guix is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 nodist_noinst_SCRIPTS = \
42 guix/git-download.scm \
47 guix/serialization.scm \
49 guix/derivations.scm \
50 guix/gnu-maintenance.scm \
52 guix/build-system.scm \
53 guix/build-system/cmake.scm \
54 guix/build-system/emacs.scm \
55 guix/build-system/glib-or-gtk.scm \
56 guix/build-system/gnu.scm \
57 guix/build-system/haskell.scm \
58 guix/build-system/perl.scm \
59 guix/build-system/python.scm \
60 guix/build-system/waf.scm \
61 guix/build-system/r.scm \
62 guix/build-system/ruby.scm \
63 guix/build-system/trivial.scm \
65 guix/http-client.scm \
69 guix/cvs-download.scm \
70 guix/svn-download.scm \
72 guix/build/download.scm \
73 guix/build/cmake-build-system.scm \
74 guix/build/emacs-build-system.scm \
76 guix/build/glib-or-gtk-build-system.scm \
77 guix/build/gnu-build-system.scm \
78 guix/build/gnu-dist.scm \
79 guix/build/perl-build-system.scm \
80 guix/build/python-build-system.scm \
81 guix/build/r-build-system.scm \
82 guix/build/ruby-build-system.scm \
83 guix/build/waf-build-system.scm \
84 guix/build/haskell-build-system.scm \
85 guix/build/store-copy.scm \
86 guix/build/utils.scm \
87 guix/build/union.scm \
88 guix/build/profiles.scm \
90 guix/build/rpath.scm \
93 guix/build/gremlin.scm \
94 guix/build/emacs-utils.scm \
95 guix/build/graft.scm \
96 guix/search-paths.scm \
98 guix/import/utils.scm \
100 guix/import/snix.scm \
101 guix/import/cabal.scm \
102 guix/import/cran.scm \
103 guix/import/hackage.scm \
104 guix/import/elpa.scm \
105 guix/scripts/download.scm \
106 guix/scripts/build.scm \
107 guix/scripts/archive.scm \
108 guix/scripts/import.scm \
109 guix/scripts/package.scm \
110 guix/scripts/gc.scm \
111 guix/scripts/hash.scm \
112 guix/scripts/pull.scm \
113 guix/scripts/substitute.scm \
114 guix/scripts/authenticate.scm \
115 guix/scripts/refresh.scm \
116 guix/scripts/system.scm \
117 guix/scripts/lint.scm \
118 guix/scripts/import/cran.scm \
119 guix/scripts/import/gnu.scm \
120 guix/scripts/import/nix.scm \
121 guix/scripts/import/hackage.scm \
122 guix/scripts/import/elpa.scm \
123 guix/scripts/environment.scm \
124 guix/scripts/publish.scm \
125 guix/scripts/edit.scm \
126 guix/scripts/size.scm \
127 guix/scripts/graph.scm \
129 $(GNU_SYSTEM_MODULES)
131 if BUILD_SYSCALLS_MODULE
134 guix/build/syscalls.scm
138 if BUILD_DAEMON_OFFLOAD
141 guix/scripts/offload.scm
143 endif BUILD_DAEMON_OFFLOAD
145 # Internal module with test suite support.
146 dist_noinst_DATA = guix/tests.scm
148 # Because of the autoload hack in (guix build download), we must build it
149 # first to avoid errors on systems where (gnutls) is unavailable.
150 guix/scripts/download.go: guix/build/download.go
151 guix/download.go: guix/build/download.go
153 # Linux-Libre configurations.
155 gnu/packages/linux-libre-i686.conf \
156 gnu/packages/linux-libre-x86_64.conf
158 # Templates, examples.
160 gnu/system/examples/bare-bones.tmpl \
161 gnu/system/examples/desktop.tmpl
163 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
165 nobase_dist_guilemodule_DATA = \
166 $(MODULES) $(KCONFIGS) $(EXAMPLES) \
168 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
170 # Do we need to provide our own non-broken (srfi srfi-37) module?
173 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
174 GOBJECTS += srfi/srfi-37.go
176 srfi/srfi-37.scm: srfi/srfi-37.scm.in
180 endif INSTALL_SRFI_37
182 # Handy way to remove the .go files without removing all the rest.
184 -$(RM) -f $(GOBJECTS)
192 tests/pk-crypto.scm \
195 tests/substitute.scm \
197 tests/derivations.scm \
201 tests/build-utils.scm \
219 tests/file-systems.scm \
225 guix/import/json.scm \
226 guix/import/pypi.scm \
227 guix/scripts/import/pypi.scm \
228 guix/import/cpan.scm \
229 guix/scripts/import/gem.scm \
240 tests/guix-build.sh \
241 tests/guix-download.sh \
244 tests/guix-package.sh \
245 tests/guix-package-net.sh \
246 tests/guix-system.sh \
247 tests/guix-archive.sh \
248 tests/guix-authenticate.sh \
249 tests/guix-environment.sh \
250 tests/guix-graph.sh \
255 SH_TESTS += tests/guix-register.sh
260 TESTS = $(SCM_TESTS) $(SH_TESTS)
262 TEST_EXTENSIONS = .scm .sh
264 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
266 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
267 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
269 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
270 AM_SH_LOG_FLAGS = -x -e
272 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
273 # could end up removing files from the store while they are being used by
274 # other instances of the daemon.
276 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
277 $(SCM_TESTS:%.scm=%.log)
279 # Public key used to sign substitutes from hydra.gnu.org.
280 dist_pkgdata_DATA = hydra.gnu.org.pub
282 # Bash completion file.
283 dist_bashcompletion_DATA = etc/completion/bash/guix
290 build-aux/build-self.scm \
291 build-aux/hydra/gnu-system.scm \
292 build-aux/hydra/demo-os.scm \
293 build-aux/hydra/guix.scm \
294 build-aux/check-available-binaries.scm \
295 build-aux/check-final-inputs-self-contained.scm \
296 build-aux/download.scm \
297 build-aux/make-binary-tarball.scm \
298 build-aux/generate-authors.scm \
299 srfi/srfi-37.scm.in \
301 srfi/srfi-64.upstream.scm \
303 tests/signing-key.pub \
304 tests/signing-key.sec \
305 build-aux/config.rpath \
310 if !BUILD_DAEMON_OFFLOAD
313 guix/scripts/offload.scm
315 endif !BUILD_DAEMON_OFFLOAD
317 if !BUILD_SYSCALLS_MODULE
320 guix/build/syscalls.scm
322 endif !BUILD_SYSCALLS_MODULE
327 $(SCM_TESTS:tests/%.scm=%.log)
329 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
330 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
331 AM_V_GUILEC_0 = @echo " GUILEC" $@;
333 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
334 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
335 # there that are newer than the local .scm files (for instance because the
336 # user ran 'make install' recently). When that happens, we end up loading
337 # those previously-installed .go files, which may be stale, thereby breaking
340 # XXX: Use the C locale for when Guile lacks
341 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
343 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
344 unset GUILE_LOAD_COMPILED_PATH ; \
346 $(top_builddir)/pre-inst-env \
347 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
348 -Wformat -Wunbound-variable -Warity-mismatch \
354 # Make sure source files are installed first, so that the mtime of
355 # installed compiled files is greater than that of installed source
357 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
359 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
360 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
362 # The above trick doesn't work for 'config.go' because both 'config.scm' and
363 # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it
365 install-data-hook: set-bootstrap-executable-permissions
366 touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
369 SUBDIRS = po/guix po/packages
380 ACLOCAL_AMFLAGS = -I m4
381 AM_DISTCHECK_CONFIGURE_FLAGS = \
382 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
383 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
384 --with-nix-prefix="$(NIX_PREFIX)" \
387 dist_emacsui_DATA = emacs/guix-main.scm
388 nodist_emacsui_DATA = emacs/guix-helper.scm
391 # The self-contained tarball.
392 guix-binary.%.tar.xz:
393 -GUIX_PACKAGE_PATH= \
394 $(top_builddir)/pre-inst-env "$(GUILE)" \
395 "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
398 dist-hook: sync-descriptions gen-ChangeLog gen-AUTHORS
399 dist-hook: assert-no-store-file-names
401 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
404 -GUIX_PACKAGE_PATH= \
405 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
408 if test -d .git; then \
409 $(top_srcdir)/build-aux/gitlog-to-changelog \
411 rm -f $(distdir)/ChangeLog; \
412 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
416 if test -d .git; then \
417 rm -f "$(distdir)/AUTHORS"; \
418 $(top_builddir)/pre-inst-env "$(GUILE)" \
419 "$(top_srcdir)/build-aux/generate-authors.scm" \
420 "$(top_srcdir)" "$(distdir)/AUTHORS"; \
423 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
424 assert-no-store-file-names:
425 if grep -r --exclude=*.texi --exclude=*.info \
426 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
428 echo "error: store file names embedded in the distribution" >&2 ; \
432 # Make sure hydra.gnu.org has the important binaries.
433 assert-binaries-available:
434 $(top_builddir)/pre-inst-env "$(GUILE)" \
435 "$(top_srcdir)/build-aux/check-available-binaries.scm"
437 # Make sure the final inputs don't refer to bootstrap tools.
438 assert-final-inputs-self-contained:
439 $(top_builddir)/pre-inst-env "$(GUILE)" \
440 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
442 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go
443 .PHONY: assert-no-store-file-names assert-binaries-available
444 .PHONY: assert-final-inputs-self-contained