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/haskell.scm \
55 guix/build-system/perl.scm \
56 guix/build-system/python.scm \
57 guix/build-system/waf.scm \
58 guix/build-system/ruby.scm \
59 guix/build-system/trivial.scm \
61 guix/http-client.scm \
65 guix/cvs-download.scm \
66 guix/svn-download.scm \
68 guix/build/download.scm \
69 guix/build/cmake-build-system.scm \
71 guix/build/glib-or-gtk-build-system.scm \
72 guix/build/gnu-build-system.scm \
73 guix/build/gnu-dist.scm \
74 guix/build/perl-build-system.scm \
75 guix/build/python-build-system.scm \
76 guix/build/ruby-build-system.scm \
77 guix/build/waf-build-system.scm \
78 guix/build/haskell-build-system.scm \
79 guix/build/store-copy.scm \
80 guix/build/utils.scm \
81 guix/build/union.scm \
82 guix/build/profiles.scm \
84 guix/build/rpath.scm \
87 guix/build/syscalls.scm \
88 guix/build/gremlin.scm \
89 guix/build/emacs-utils.scm \
90 guix/build/graft.scm \
91 guix/search-paths.scm \
93 guix/import/utils.scm \
95 guix/import/snix.scm \
96 guix/import/cabal.scm \
97 guix/import/hackage.scm \
98 guix/scripts/download.scm \
99 guix/scripts/build.scm \
100 guix/scripts/archive.scm \
101 guix/scripts/import.scm \
102 guix/scripts/package.scm \
103 guix/scripts/gc.scm \
104 guix/scripts/hash.scm \
105 guix/scripts/pull.scm \
106 guix/scripts/substitute.scm \
107 guix/scripts/authenticate.scm \
108 guix/scripts/refresh.scm \
109 guix/scripts/system.scm \
110 guix/scripts/lint.scm \
111 guix/scripts/import/gnu.scm \
112 guix/scripts/import/nix.scm \
113 guix/scripts/import/hackage.scm \
114 guix/scripts/environment.scm \
115 guix/scripts/publish.scm \
117 $(GNU_SYSTEM_MODULES)
119 if BUILD_DAEMON_OFFLOAD
122 guix/scripts/offload.scm
124 endif BUILD_DAEMON_OFFLOAD
126 # Internal module with test suite support.
127 dist_noinst_DATA = guix/tests.scm
129 # Because of the autoload hack in (guix build download), we must build it
130 # first to avoid errors on systems where (gnutls) is unavailable.
131 guix/scripts/download.go: guix/build/download.go
132 guix/download.go: guix/build/download.go
134 # Linux-Libre configurations.
136 gnu/packages/linux-libre-i686.conf \
137 gnu/packages/linux-libre-x86_64.conf
139 # Templates, examples.
141 gnu/system/examples/bare-bones.tmpl \
142 gnu/system/examples/desktop.tmpl
144 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
146 nobase_dist_guilemodule_DATA = \
147 $(MODULES) $(KCONFIGS) $(EXAMPLES) \
149 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
151 # Do we need to provide our own non-broken (srfi srfi-37) module?
154 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
155 GOBJECTS += srfi/srfi-37.go
157 srfi/srfi-37.scm: srfi/srfi-37.scm.in
161 endif INSTALL_SRFI_37
163 # Handy way to remove the .go files without removing all the rest.
165 -$(RM) -f $(GOBJECTS)
172 tests/pk-crypto.scm \
175 tests/substitute.scm \
177 tests/derivations.scm \
181 tests/build-utils.scm \
199 guix/import/json.scm \
200 guix/import/pypi.scm \
201 guix/scripts/import/pypi.scm \
202 guix/import/cpan.scm \
203 guix/scripts/import/cpan.scm
212 tests/guix-build.sh \
213 tests/guix-download.sh \
216 tests/guix-package.sh \
217 tests/guix-package-net.sh \
218 tests/guix-system.sh \
219 tests/guix-archive.sh \
220 tests/guix-authenticate.sh \
225 SH_TESTS += tests/guix-register.sh
230 TESTS = $(SCM_TESTS) $(SH_TESTS)
232 TEST_EXTENSIONS = .scm .sh
234 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
236 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
237 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
239 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
240 AM_SH_LOG_FLAGS = -x -e
242 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
243 # could end up removing files from the store while they are being used by
244 # other instances of the daemon.
246 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
247 $(SCM_TESTS:%.scm=%.log)
249 # Public key used to sign substitutes from hydra.gnu.org.
250 dist_pkgdata_DATA = hydra.gnu.org.pub
252 # Bash completion file.
253 dist_bashcompletion_DATA = etc/completion/bash/guix
260 build-aux/build-self.scm \
261 build-aux/hydra/gnu-system.scm \
262 build-aux/hydra/demo-os.scm \
263 build-aux/hydra/guix.scm \
264 build-aux/check-available-binaries.scm \
265 build-aux/check-final-inputs-self-contained.scm \
266 build-aux/download.scm \
267 build-aux/make-binary-tarball.scm \
268 srfi/srfi-37.scm.in \
270 srfi/srfi-64.upstream.scm \
272 tests/signing-key.pub \
273 tests/signing-key.sec \
274 build-aux/config.rpath \
279 if !BUILD_DAEMON_OFFLOAD
282 guix/scripts/offload.scm
284 endif !BUILD_DAEMON_OFFLOAD
289 $(SCM_TESTS:tests/%.scm=%.log)
291 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
292 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
293 AM_V_GUILEC_0 = @echo " GUILEC" $@;
295 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
296 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
297 # there that are newer than the local .scm files (for instance because the
298 # user ran 'make install' recently). When that happens, we end up loading
299 # those previously-installed .go files, which may be stale, thereby breaking
302 # XXX: Use the C locale for when Guile lacks
303 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
305 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
306 unset GUILE_LOAD_COMPILED_PATH ; \
308 $(top_builddir)/pre-inst-env \
309 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
310 -Wformat -Wunbound-variable -Warity-mismatch \
316 # Make sure source files are installed first, so that the mtime of
317 # installed compiled files is greater than that of installed source
319 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
321 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
322 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
324 # The above trick doesn't work for 'config.go' because both 'config.scm' and
325 # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it
327 install-data-hook: set-bootstrap-executable-permissions
328 touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
331 SUBDIRS = po/guix po/packages
342 ACLOCAL_AMFLAGS = -I m4
343 AM_DISTCHECK_CONFIGURE_FLAGS = \
344 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
345 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
346 --with-nix-prefix="$(NIX_PREFIX)" \
349 dist_emacsui_DATA = emacs/guix-main.scm
350 nodist_emacsui_DATA = emacs/guix-helper.scm
353 # The self-contained tarball.
354 guix-binary.%.tar.xz:
355 -GUIX_PACKAGE_PATH= \
356 $(top_builddir)/pre-inst-env "$(GUILE)" \
357 "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
360 dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
361 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
364 -GUIX_PACKAGE_PATH= \
365 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
368 if test -d .git; then \
369 $(top_srcdir)/build-aux/gitlog-to-changelog \
371 rm -f $(distdir)/ChangeLog; \
372 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
375 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
376 assert-no-store-file-names:
377 if grep -r --exclude=*.texi --exclude=*.info \
378 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
380 echo "error: store file names embedded in the distribution" >&2 ; \
384 # Make sure hydra.gnu.org has the important binaries.
385 assert-binaries-available:
386 $(top_builddir)/pre-inst-env "$(GUILE)" \
387 "$(top_srcdir)/build-aux/check-available-binaries.scm"
389 # Make sure the final inputs don't refer to bootstrap tools.
390 assert-final-inputs-self-contained:
391 $(top_builddir)/pre-inst-env "$(GUILE)" \
392 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
394 .PHONY: sync-descriptions gen-ChangeLog clean-go
395 .PHONY: assert-no-store-file-names assert-binaries-available
396 .PHONY: assert-final-inputs-self-contained