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 \
55 guix/build-system.scm \
56 guix/build-system/cmake.scm \
57 guix/build-system/emacs.scm \
58 guix/build-system/glib-or-gtk.scm \
59 guix/build-system/gnu.scm \
60 guix/build-system/haskell.scm \
61 guix/build-system/perl.scm \
62 guix/build-system/python.scm \
63 guix/build-system/waf.scm \
64 guix/build-system/r.scm \
65 guix/build-system/ruby.scm \
66 guix/build-system/trivial.scm \
68 guix/http-client.scm \
72 guix/cvs-download.scm \
73 guix/svn-download.scm \
75 guix/build/download.scm \
76 guix/build/cmake-build-system.scm \
77 guix/build/emacs-build-system.scm \
79 guix/build/glib-or-gtk-build-system.scm \
80 guix/build/gnu-build-system.scm \
81 guix/build/gnu-dist.scm \
82 guix/build/perl-build-system.scm \
83 guix/build/python-build-system.scm \
84 guix/build/r-build-system.scm \
85 guix/build/ruby-build-system.scm \
86 guix/build/waf-build-system.scm \
87 guix/build/haskell-build-system.scm \
88 guix/build/store-copy.scm \
89 guix/build/utils.scm \
90 guix/build/union.scm \
91 guix/build/profiles.scm \
93 guix/build/rpath.scm \
96 guix/build/gremlin.scm \
97 guix/build/emacs-utils.scm \
98 guix/build/graft.scm \
99 guix/search-paths.scm \
101 guix/import/utils.scm \
102 guix/import/gnu.scm \
103 guix/import/snix.scm \
104 guix/import/cabal.scm \
105 guix/import/cran.scm \
106 guix/import/hackage.scm \
107 guix/import/elpa.scm \
109 guix/scripts/download.scm \
110 guix/scripts/build.scm \
111 guix/scripts/archive.scm \
112 guix/scripts/import.scm \
113 guix/scripts/package.scm \
114 guix/scripts/gc.scm \
115 guix/scripts/hash.scm \
116 guix/scripts/pull.scm \
117 guix/scripts/substitute.scm \
118 guix/scripts/authenticate.scm \
119 guix/scripts/refresh.scm \
120 guix/scripts/system.scm \
121 guix/scripts/lint.scm \
122 guix/scripts/challenge.scm \
123 guix/scripts/import/cran.scm \
124 guix/scripts/import/gnu.scm \
125 guix/scripts/import/nix.scm \
126 guix/scripts/import/hackage.scm \
127 guix/scripts/import/elpa.scm \
128 guix/scripts/environment.scm \
129 guix/scripts/publish.scm \
130 guix/scripts/edit.scm \
131 guix/scripts/size.scm \
132 guix/scripts/graph.scm \
133 guix/scripts/container.scm \
134 guix/scripts/container/exec.scm \
136 $(GNU_SYSTEM_MODULES)
138 if BUILD_SYSCALLS_MODULE
141 guix/build/syscalls.scm
145 if BUILD_DAEMON_OFFLOAD
148 guix/scripts/offload.scm
150 endif BUILD_DAEMON_OFFLOAD
152 # Internal module with test suite support.
153 dist_noinst_DATA = guix/tests.scm
155 # Because of the autoload hack in (guix build download), we must build it
156 # first to avoid errors on systems where (gnutls) is unavailable.
157 guix/scripts/download.go: guix/build/download.go
158 guix/download.go: guix/build/download.go
160 # Linux-Libre configurations.
162 gnu/packages/linux-libre-i686.conf \
163 gnu/packages/linux-libre-x86_64.conf
165 # Templates, examples.
167 gnu/system/examples/bare-bones.tmpl \
168 gnu/system/examples/desktop.tmpl
170 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
172 nobase_dist_guilemodule_DATA = \
173 $(MODULES) $(KCONFIGS) $(EXAMPLES) \
175 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
177 # Do we need to provide our own non-broken (srfi srfi-37) module?
180 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
181 GOBJECTS += srfi/srfi-37.go
183 srfi/srfi-37.scm: srfi/srfi-37.scm.in
187 endif INSTALL_SRFI_37
189 # Handy way to remove the .go files without removing all the rest.
191 -$(RM) -f $(GOBJECTS)
199 tests/pk-crypto.scm \
202 tests/substitute.scm \
204 tests/derivations.scm \
208 tests/build-utils.scm \
227 tests/challenge.scm \
229 tests/file-systems.scm \
236 guix/import/json.scm \
237 guix/import/pypi.scm \
238 guix/scripts/import/pypi.scm \
239 guix/import/cpan.scm \
240 guix/scripts/import/gem.scm \
251 tests/guix-build.sh \
252 tests/guix-download.sh \
255 tests/guix-package.sh \
256 tests/guix-package-net.sh \
257 tests/guix-system.sh \
258 tests/guix-archive.sh \
259 tests/guix-authenticate.sh \
260 tests/guix-environment.sh \
261 tests/guix-environment-container.sh \
262 tests/guix-graph.sh \
267 SH_TESTS += tests/guix-register.sh
272 TESTS = $(SCM_TESTS) $(SH_TESTS)
274 TEST_EXTENSIONS = .scm .sh
276 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
278 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
279 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
281 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
282 AM_SH_LOG_FLAGS = -x -e
284 # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
285 # could end up removing files from the store while they are being used by
286 # other instances of the daemon.
288 $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
289 $(SCM_TESTS:%.scm=%.log)
291 # Public key used to sign substitutes from hydra.gnu.org.
292 dist_pkgdata_DATA = hydra.gnu.org.pub
294 # Bash completion file.
295 dist_bashcompletion_DATA = etc/completion/bash/guix
302 build-aux/build-self.scm \
303 build-aux/hydra/gnu-system.scm \
304 build-aux/hydra/demo-os.scm \
305 build-aux/hydra/guix.scm \
306 build-aux/check-available-binaries.scm \
307 build-aux/check-final-inputs-self-contained.scm \
308 build-aux/download.scm \
309 build-aux/make-binary-tarball.scm \
310 build-aux/generate-authors.scm \
311 srfi/srfi-37.scm.in \
313 srfi/srfi-64.upstream.scm \
315 tests/signing-key.pub \
316 tests/signing-key.sec \
317 tests/cve-sample.xml \
318 build-aux/config.rpath \
323 if !BUILD_DAEMON_OFFLOAD
326 guix/scripts/offload.scm
328 endif !BUILD_DAEMON_OFFLOAD
330 if !BUILD_SYSCALLS_MODULE
333 guix/build/syscalls.scm
335 endif !BUILD_SYSCALLS_MODULE
340 $(SCM_TESTS:tests/%.scm=%.log)
342 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
343 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
344 AM_V_GUILEC_0 = @echo " GUILEC" $@;
346 # Flags passed to 'guild compile'.
347 GUILD_COMPILE_FLAGS = \
348 -Wformat -Wunbound-variable -Warity-mismatch
350 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
351 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
352 # there that are newer than the local .scm files (for instance because the
353 # user ran 'make install' recently). When that happens, we end up loading
354 # those previously-installed .go files, which may be stale, thereby breaking
357 # XXX: Use the C locale for when Guile lacks
358 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
360 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
361 unset GUILE_LOAD_COMPILED_PATH ; \
363 $(top_builddir)/pre-inst-env \
364 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
365 $(GUILD_COMPILE_FLAGS) --target="$(host)" \
370 # Make sure source files are installed first, so that the mtime of
371 # installed compiled files is greater than that of installed source
373 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
375 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
376 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
378 # The above trick doesn't work for 'config.go' because both 'config.scm' and
379 # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it
381 install-data-hook: set-bootstrap-executable-permissions
382 touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
385 SUBDIRS = po/guix po/packages
396 ACLOCAL_AMFLAGS = -I m4
397 AM_DISTCHECK_CONFIGURE_FLAGS = \
398 --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
399 --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
400 --with-nix-prefix="$(NIX_PREFIX)" \
403 dist_emacsui_DATA = emacs/guix-main.scm
404 nodist_emacsui_DATA = emacs/guix-helper.scm
407 # The self-contained tarball.
408 guix-binary.%.tar.xz:
409 -GUIX_PACKAGE_PATH= \
410 $(top_builddir)/pre-inst-env "$(GUILE)" \
411 "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
414 dist-hook: sync-descriptions gen-ChangeLog gen-AUTHORS
415 dist-hook: assert-no-store-file-names
417 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
420 -GUIX_PACKAGE_PATH= \
421 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
424 if test -d .git; then \
425 $(top_srcdir)/build-aux/gitlog-to-changelog \
427 rm -f $(distdir)/ChangeLog; \
428 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
432 if test -d .git; then \
433 rm -f "$(distdir)/AUTHORS"; \
434 $(top_builddir)/pre-inst-env "$(GUILE)" \
435 "$(top_srcdir)/build-aux/generate-authors.scm" \
436 "$(top_srcdir)" "$(distdir)/AUTHORS"; \
439 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
440 assert-no-store-file-names:
441 if grep -r --exclude=*.texi --exclude=*.info \
442 "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
444 echo "error: store file names embedded in the distribution" >&2 ; \
448 # Make sure hydra.gnu.org has the important binaries.
449 assert-binaries-available:
450 $(top_builddir)/pre-inst-env "$(GUILE)" \
451 "$(top_srcdir)/build-aux/check-available-binaries.scm"
453 # Make sure the final inputs don't refer to bootstrap tools.
454 assert-final-inputs-self-contained:
455 $(top_builddir)/pre-inst-env "$(GUILE)" \
456 "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
458 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go
459 .PHONY: assert-no-store-file-names assert-binaries-available
460 .PHONY: assert-final-inputs-self-contained