build-system/gnu: Have `configure-flags' and `make-flags' evaluated.
[jackhill/guix/guix.git] / Makefile.am
CommitLineData
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
19MODULES = \
af51c820 20 guix/derivations.scm \
208f7cd1
LC
21 guix/build-system.scm \
22 guix/build-system/gnu.scm \
af51c820
LC
23 guix/http.scm \
24 guix/store.scm \
25 guix/utils.scm \
26 guix/build/gnu-build-system.scm \
27 guix/build/http.scm \
1273d44a
LC
28 guix/build/utils.scm \
29 guix.scm
af51c820
LC
30
31GOBJECTS = $(MODULES:%.scm=%.go)
32
33nobase_dist_guilemodule_DATA = $(MODULES)
34nobase_nodist_guilemodule_DATA = $(GOBJECTS)
35
36TESTS = \
37 tests/builders.scm \
38 tests/derivations.scm \
39 tests/utils.scm
40
41TESTS_ENVIRONMENT = \
42 NIXPKGS="$(NIXPKGS)" \
43 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
44 $(GUILE) -L "$(top_srcdir)"
45
46CLEANFILES = $(GOBJECTS) *.log
47
48.scm.go:
49 $(MKDIR_P) `dirname "$@"`
04a0b857 50 NIXPKGS="$(NIXPKGS)" \
af51c820
LC
51 GUILE_AUTO_COMPILE=0 \
52 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
48e8333d
LC
53 $(GUILD) compile -L "$(top_srcdir)" \
54 -Wformat -Wunbound-variable -Warity-mismatch \
73d96596 55 --target="$(host)" \
af51c820
LC
56 -o "$@" "$<"
57
58SUFFIXES = .go
59
60# Make sure source files are installed first, so that the mtime of
61# installed compiled files is greater than that of installed source
62# files. See
63# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
64# for details.
65guix_install_go_files = install-nobase_nodist_guilemoduleDATA
66$(guix_install_go_files): install-nobase_dist_guilemoduleDATA