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/glib-or-gtk.scm \
55 guix/build-system/gnu.scm \
56 guix/build-system/haskell.scm \
57 guix/build-system/perl.scm \
58 guix/build-system/python.scm \
59 guix/build-system/waf.scm \
60 guix/build-system/ruby.scm \
61 guix/build-system/trivial.scm \
63 guix/http-client.scm \
67 guix/cvs-download.scm \
68 guix/svn-download.scm \
70 guix/build/download.scm \
71 guix/build/cmake-build-system.scm \
73 guix/build/glib-or-gtk-build-system.scm \
74 guix/build/gnu-build-system.scm \
75 guix/build/gnu-dist.scm \
76 guix/build/perl-build-system.scm \
77 guix/build/python-build-system.scm \
78 guix/build/ruby-build-system.scm \
79 guix/build/waf-build-system.scm \
80 guix/build/haskell-build-system.scm \
81 guix/build/store-copy.scm \
82 guix/build/utils.scm \
83 guix/build/union.scm \
84 guix/build/profiles.scm \
86 guix/build/rpath.scm \
89 guix/build/syscalls.scm \
90 guix/build/gremlin.scm \
91 guix/build/emacs-utils.scm \
92 guix/build/graft.scm \
93 guix/search-paths.scm \
95 guix/import/utils.scm \
97 guix/import/snix.scm \
98 guix/import/cabal.scm \
99 guix/import/hackage.scm \
100 guix/scripts/download.scm \
101 guix/scripts/build.scm \
102 guix/scripts/archive.scm \
103 guix/scripts/import.scm \
104 guix/scripts/package.scm \
105 guix/scripts/gc.scm \
106 guix/scripts/hash.scm \
107 guix/scripts/pull.scm \
108 guix/scripts/substitute.scm \
109 guix/scripts/authenticate.scm \
110 guix/scripts/refresh.scm \
111 guix/scripts/system.scm \
112 guix/scripts/lint.scm \
113 guix/scripts/import/gnu.scm \
114 guix/scripts/import/nix.scm \
115 guix/scripts/import/hackage.scm \
116 guix/scripts/environment.scm \
117 guix/scripts/publish.scm \
118 guix/scripts/edit.scm \
119 guix/scripts/size.scm \
121 $(GNU_SYSTEM_MODULES)
123 if BUILD_DAEMON_OFFLOAD
126 guix/scripts/offload.scm
128 endif BUILD_DAEMON_OFFLOAD
130 # Internal module with test suite support.
131 dist_noinst_DATA = guix/tests.scm
133 # Because of the autoload hack in (guix build download), we must build it
134 # first to avoid errors on systems where (gnutls) is unavailable.
135 guix/scripts/download.go: guix/build/download.go
136 guix/download.go: guix/build/download.go
138 # Linux-Libre configurations.
140 gnu/packages/linux-libre-i686.conf \
141 gnu/packages/linux-libre-x86_64.conf
143 # Templates, examples.
145 gnu/system/examples/bare-bones.tmpl \
146 gnu/system/examples/desktop.tmpl
148 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
150 nobase_dist_guilemodule_DATA = \
151 $(MODULES) $(KCONFIGS) $(EXAMPLES) \
153 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
155 # Do we need to provide our own non-broken (srfi srfi-37) module?
158 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
159 GOBJECTS += srfi/srfi-37.go
161 srfi/srfi-37.scm: srfi/srfi-37.scm.in
165 endif INSTALL_SRFI_37
167 # Handy way to remove the .go files without removing all the rest.
169 -$(RM) -f $(GOBJECTS)
177 tests/pk-crypto.scm \
180 tests/substitute.scm \
182 tests/derivations.scm \
186 tests/build-utils.scm \
205 guix/import/json.scm \
206 guix/import/pypi.scm \
207 guix/scripts/import/pypi.scm \
208 guix/import/cpan.scm \
209 guix/scripts/import/cpan.scm
218 tests/guix-build.sh \
219 tests/guix-download.sh \
222 tests/guix-package.sh \
223 tests/guix-package-net.sh \
224 tests/guix-system.sh \
225 tests/guix-archive.sh \
226 tests/guix-authenticate.sh \
227 tests/guix-environment.sh \
232 SH_TESTS += tests/guix-register.sh
237 TESTS = $(SCM_TESTS) $(SH_TESTS)
239 TEST_EXTENSIONS = .scm .sh
241 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
243 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
244 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
246 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
247 AM_SH_LOG_FLAGS = -x -e
249 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
250 # could end up removing files from the store while they are being used by
251 # other instances of the daemon.
253 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
254 $(SCM_TESTS:%.scm=%.log)
256 # Public key used to sign substitutes from hydra.gnu.org.
257 dist_pkgdata_DATA = hydra.gnu.org.pub
259 # Bash completion file.
260 dist_bashcompletion_DATA = etc/completion/bash/guix
267 build-aux/build-self.scm \
268 build-aux/hydra/gnu-system.scm \
269 build-aux/hydra/demo-os.scm \
270 build-aux/hydra/guix.scm \
271 build-aux/check-available-binaries.scm \
272 build-aux/check-final-inputs-self-contained.scm \
273 build-aux/download.scm \
274 build-aux/make-binary-tarball.scm \
275 srfi/srfi-37.scm.in \
277 srfi/srfi-64.upstream.scm \
279 tests/signing-key.pub \
280 tests/signing-key.sec \
281 build-aux/config.rpath \
286 if !BUILD_DAEMON_OFFLOAD
289 guix/scripts/offload.scm
291 endif !BUILD_DAEMON_OFFLOAD
296 $(SCM_TESTS:tests/%.scm=%.log)
298 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
299 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
300 AM_V_GUILEC_0 = @echo " GUILEC" $@;
302 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
303 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
304 # there that are newer than the local .scm files (for instance because the
305 # user ran 'make install' recently). When that happens, we end up loading
306 # those previously-installed .go files, which may be stale, thereby breaking
309 # XXX: Use the C locale for when Guile lacks
310 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
312 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
313 unset GUILE_LOAD_COMPILED_PATH ; \
315 $(top_builddir)/pre-inst-env \
316 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
317 -Wformat -Wunbound-variable -Warity-mismatch \
323 # Make sure source files are installed first, so that the mtime of
324 # installed compiled files is greater than that of installed source
326 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
328 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
329 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
331 # The above trick doesn't work for 'config.go' because both 'config.scm' and
332 # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it
334 install-data-hook: set-bootstrap-executable-permissions
335 touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
338 SUBDIRS = po/guix po/packages
349 ACLOCAL_AMFLAGS = -I m4
350 AM_DISTCHECK_CONFIGURE_FLAGS = \
351 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
352 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
353 --with-nix-prefix="$(NIX_PREFIX)" \
356 dist_emacsui_DATA = emacs/guix-main.scm
357 nodist_emacsui_DATA = emacs/guix-helper.scm
360 # The self-contained tarball.
361 guix-binary.%.tar.xz:
362 -GUIX_PACKAGE_PATH= \
363 $(top_builddir)/pre-inst-env "$(GUILE)" \
364 "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
367 dist-hook: sync-descriptions gen-ChangeLog gen-AUTHORS
368 dist-hook: assert-no-store-file-names
370 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
373 -GUIX_PACKAGE_PATH= \
374 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
377 if test -d .git; then \
378 $(top_srcdir)/build-aux/gitlog-to-changelog \
380 rm -f $(distdir)/ChangeLog; \
381 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
385 $(top_builddir)/pre-inst-env "$(GUILE)" \
386 "$(top_srcdir)/build-aux/generate-authors.scm" \
387 "$(top_srcdir)" "$(distdir)/AUTHORS"
389 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
390 assert-no-store-file-names:
391 if grep -r --exclude=*.texi --exclude=*.info \
392 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
394 echo "error: store file names embedded in the distribution" >&2 ; \
398 # Make sure hydra.gnu.org has the important binaries.
399 assert-binaries-available:
400 $(top_builddir)/pre-inst-env "$(GUILE)" \
401 "$(top_srcdir)/build-aux/check-available-binaries.scm"
403 # Make sure the final inputs don't refer to bootstrap tools.
404 assert-final-inputs-self-contained:
405 $(top_builddir)/pre-inst-env "$(GUILE)" \
406 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
408 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go
409 .PHONY: assert-no-store-file-names assert-binaries-available
410 .PHONY: assert-final-inputs-self-contained