Commit | Line | Data |
---|---|---|
af51c820 LC |
1 | # Guix --- Nix package management from Guile. -*- coding: utf-8 -*- |
2 | # Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | |
3 | # | |
4 | # This file is part of Guix. | |
5 | # | |
6 | # Guix is free software; you can redistribute it and/or modify it | |
7 | # under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 3 of the License, or (at | |
9 | # your option) any later version. | |
10 | # | |
11 | # Guix is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
14a1c319 LC |
19 | bin_SCRIPTS = guix-build |
20 | ||
af51c820 | 21 | MODULES = \ |
73fbb904 | 22 | guix/utils.scm \ |
af51c820 | 23 | guix/derivations.scm \ |
208f7cd1 LC |
24 | guix/build-system.scm \ |
25 | guix/build-system/gnu.scm \ | |
be13fbfa | 26 | guix/build-system/trivial.scm \ |
af51c820 LC |
27 | guix/http.scm \ |
28 | guix/store.scm \ | |
af51c820 LC |
29 | guix/build/gnu-build-system.scm \ |
30 | guix/build/http.scm \ | |
1273d44a | 31 | guix/build/utils.scm \ |
e3ce5d70 LC |
32 | guix/packages.scm \ |
33 | guix.scm \ | |
6b1891b0 | 34 | distro.scm \ |
e3ce5d70 | 35 | distro/base.scm |
af51c820 LC |
36 | |
37 | GOBJECTS = $(MODULES:%.scm=%.go) | |
38 | ||
800cdeef LC |
39 | nobase_dist_guilemodule_DATA = $(MODULES) |
40 | ||
41 | patchdir = $(pkgdatadir)/patches | |
a5071b99 LC |
42 | dist_patch_DATA = \ |
43 | distro/patches/binutils-ld-new-dtags.patch \ | |
44 | distro/patches/diffutils-gets-undeclared.patch \ | |
45 | distro/patches/guile-1.8-cpp-4.5.patch \ | |
46 | distro/patches/m4-gets-undeclared.patch \ | |
47 | distro/patches/m4-readlink-EINVAL.patch \ | |
48 | distro/patches/m4-s_isdir.patch \ | |
49 | distro/patches/make-impure-dirs.patch \ | |
50 | distro/patches/findutils-absolute-paths.patch \ | |
b289e9f9 | 51 | distro/patches/perl-no-sys-dirs.patch \ |
a5071b99 | 52 | distro/patches/readline-link-ncurses.patch \ |
472894aa | 53 | distro/patches/tar-gets-undeclared.patch |
d7672884 | 54 | |
af51c820 LC |
55 | nobase_nodist_guilemodule_DATA = $(GOBJECTS) |
56 | ||
57 | TESTS = \ | |
58 | tests/builders.scm \ | |
59 | tests/derivations.scm \ | |
e3ce5d70 | 60 | tests/utils.scm \ |
b0e0d0e9 | 61 | tests/build-utils.scm \ |
e3ce5d70 | 62 | tests/packages.scm |
af51c820 | 63 | |
e1e7b29a | 64 | TESTS_ENVIRONMENT = \ |
b86b0056 LC |
65 | NIX_HASH="$(NIX_HASH)"; \ |
66 | NIX_INSTANTIATE="$(NIX_INSTANTIATE)"; \ | |
e1e7b29a | 67 | NIXPKGS="$(NIXPKGS)"; \ |
800cdeef | 68 | DISTRO_PATCH_DIRECTORY="$(top_srcdir)/distro/patches" \ |
e1e7b29a | 69 | GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH"; \ |
b86b0056 | 70 | export NIX_HASH NIX_INSTANTIATE NIXPKGS GUILE_LOAD_COMPILED_PATH; |
e1e7b29a LC |
71 | |
72 | LOG_COMPILER = \ | |
5f904ffb | 73 | $(GUILE) --no-auto-compile -L "$(top_srcdir)" |
af51c820 | 74 | |
ed795c06 LC |
75 | EXTRA_DIST = \ |
76 | srfi/srfi-64.scm \ | |
77 | srfi/srfi-64.upstream.scm \ | |
d95c0113 | 78 | tests/test.drv \ |
ed795c06 LC |
79 | build-aux/config.rpath \ |
80 | release.nix \ | |
81 | $(TESTS) | |
d7672884 | 82 | |
af51c820 LC |
83 | CLEANFILES = $(GOBJECTS) *.log |
84 | ||
85 | .scm.go: | |
86 | $(MKDIR_P) `dirname "$@"` | |
b86b0056 | 87 | NIX_INSTANTIATE="$(NIX_INSTANTIATE)" \ |
04a0b857 | 88 | NIXPKGS="$(NIXPKGS)" \ |
3a310cc0 | 89 | LIBGCRYPT="$(LIBGCRYPT)" \ |
800cdeef LC |
90 | DISTRO_PATCH_DIRECTORY="$(top_srcdir)/distro/patches" \ |
91 | DISTRO_INSTALLED_PATCH_DIRECTORY="$(patchdir)" \ | |
af51c820 LC |
92 | GUILE_AUTO_COMPILE=0 \ |
93 | GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \ | |
48e8333d LC |
94 | $(GUILD) compile -L "$(top_srcdir)" \ |
95 | -Wformat -Wunbound-variable -Warity-mismatch \ | |
73d96596 | 96 | --target="$(host)" \ |
af51c820 LC |
97 | -o "$@" "$<" |
98 | ||
99 | SUFFIXES = .go | |
100 | ||
101 | # Make sure source files are installed first, so that the mtime of | |
102 | # installed compiled files is greater than that of installed source | |
103 | # files. See | |
104 | # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> | |
105 | # for details. | |
106 | guix_install_go_files = install-nobase_nodist_guilemoduleDATA | |
107 | $(guix_install_go_files): install-nobase_dist_guilemoduleDATA | |
f68b0893 LC |
108 | |
109 | SUBDIRS = po | |
110 | ||
111 | ACLOCAL_AMFLAGS = -I m4 | |
437e0729 LC |
112 | AM_DISTCHECK_CONFIGURE_FLAGS = \ |
113 | --with-nixpkgs=$(NIXPKGS) --with-nix-prefix="$(NIX_PREFIX)" |