release.nix: Change `distro.hello' to produce something.
[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
c52a5bf0
LC
19bin_SCRIPTS = \
20 guix-build \
21 guix-download
14a1c319 22
af51c820 23MODULES = \
73fbb904 24 guix/utils.scm \
af51c820 25 guix/derivations.scm \
208f7cd1
LC
26 guix/build-system.scm \
27 guix/build-system/gnu.scm \
be13fbfa 28 guix/build-system/trivial.scm \
457dd86d
LC
29 guix/ftp.scm \
30 guix/ftp-client.scm \
af51c820
LC
31 guix/http.scm \
32 guix/store.scm \
af51c820 33 guix/build/gnu-build-system.scm \
457dd86d 34 guix/build/ftp.scm \
af51c820 35 guix/build/http.scm \
1273d44a 36 guix/build/utils.scm \
e3ce5d70
LC
37 guix/packages.scm \
38 guix.scm \
6b1891b0 39 distro.scm \
1f455fdc 40 distro/packages/base.scm \
1722d680
LC
41 distro/packages/databases.scm \
42 distro/packages/guile.scm \
43 distro/packages/ld-wrapper.scm \
44 distro/packages/typesetting.scm
af51c820
LC
45
46GOBJECTS = $(MODULES:%.scm=%.go)
47
800cdeef
LC
48nobase_dist_guilemodule_DATA = $(MODULES)
49
50patchdir = $(pkgdatadir)/patches
bfb3c3d0
LC
51dist_patch_DATA = \
52 distro/packages/patches/binutils-ld-new-dtags.patch \
53 distro/packages/patches/diffutils-gets-undeclared.patch \
54 distro/packages/patches/guile-1.8-cpp-4.5.patch \
55 distro/packages/patches/guile-default-utf8.patch \
56 distro/packages/patches/guile-relocatable.patch \
57 distro/packages/patches/libtool-skip-tests.patch \
58 distro/packages/patches/m4-gets-undeclared.patch \
59 distro/packages/patches/m4-readlink-EINVAL.patch \
60 distro/packages/patches/m4-s_isdir.patch \
61 distro/packages/patches/make-impure-dirs.patch \
62 distro/packages/patches/findutils-absolute-paths.patch \
63 distro/packages/patches/perl-no-sys-dirs.patch \
64 distro/packages/patches/readline-link-ncurses.patch \
65 distro/packages/patches/tar-gets-undeclared.patch
d7672884 66
ac5aa288
LC
67bootstrapdir = $(pkgdatadir)/bootstrap
68bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
d25468bc 69bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
ac5aa288
LC
70
71dist_bootstrap_x86_64_linux_DATA = \
72 distro/packages/bootstrap/x86_64-linux/bash \
73 distro/packages/bootstrap/x86_64-linux/mkdir \
74 distro/packages/bootstrap/x86_64-linux/tar \
75 distro/packages/bootstrap/x86_64-linux/xz
76
d25468bc
LC
77dist_bootstrap_i686_linux_DATA = \
78 distro/packages/bootstrap/i686-linux/bash \
79 distro/packages/bootstrap/i686-linux/mkdir \
80 distro/packages/bootstrap/i686-linux/tar \
81 distro/packages/bootstrap/i686-linux/xz
82
ac5aa288
LC
83# Big bootstrap binaries are not included in the tarball. Instead, they
84# are downloaded.
85nodist_bootstrap_x86_64_linux_DATA = \
86 distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz
d25468bc
LC
87nodist_bootstrap_i686_linux_DATA = \
88 distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz
ac5aa288 89
5992f213
LC
90# Those files must remain executable, so they remain executable once
91# imported into the store.
92install-data-hook:
93 chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
94
d25468bc
LC
95DISTCLEANFILES = \
96 $(nodist_bootstrap_x86_64_linux_DATA) \
97 $(nodist_bootstrap_i686_linux_DATA)
ac5aa288
LC
98
99# Method to download a file from an external source.
100DOWNLOAD_FILE = \
101 GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
102 $(GUILE) --no-auto-compile -L "$(top_srcdir)" \
103 "$(top_srcdir)/build-aux/download.scm"
104
105distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz: guix/utils.go
735bb2af 106 $(MKDIR_P) `dirname "$@"`
ac5aa288 107 $(DOWNLOAD_FILE) "$@" "0467a82cbe4136f60a79eb4176011bf88cf28ea19c9ad9defa365811ff8e11cf"
d25468bc 108distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz: guix/utils.go
735bb2af 109 $(MKDIR_P) `dirname "$@"`
d25468bc 110 $(DOWNLOAD_FILE) "$@" "93b537766dfab3ad287143523751e3ec02dd32d3ccaf88ad2d31c63158f342ee"
ac5aa288 111
af51c820
LC
112nobase_nodist_guilemodule_DATA = $(GOBJECTS)
113
114TESTS = \
115 tests/builders.scm \
116 tests/derivations.scm \
e3ce5d70 117 tests/utils.scm \
b0e0d0e9 118 tests/build-utils.scm \
e3ce5d70 119 tests/packages.scm
af51c820 120
e1e7b29a 121LOG_COMPILER = \
9b9b6f3d 122 $(top_builddir)/pre-inst-env \
5f904ffb 123 $(GUILE) --no-auto-compile -L "$(top_srcdir)"
af51c820 124
ed795c06 125EXTRA_DIST = \
450ccdc3 126 HACKING \
1722d680 127 .dir-locals.el \
ac5aa288 128 build-aux/download.scm \
ed795c06
LC
129 srfi/srfi-64.scm \
130 srfi/srfi-64.upstream.scm \
d95c0113 131 tests/test.drv \
ed795c06
LC
132 build-aux/config.rpath \
133 release.nix \
134 $(TESTS)
d7672884 135
af51c820
LC
136CLEANFILES = $(GOBJECTS) *.log
137
138.scm.go:
139 $(MKDIR_P) `dirname "$@"`
fc2f3802
LC
140 DISTRO_INSTALLED_PATCH_DIRECTORY="$(patchdir)" \
141 DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY="$(bootstrapdir)" \
142 $(top_builddir)/pre-inst-env \
143 $(GUILD) compile -L "$(top_srcdir)" \
144 -Wformat -Wunbound-variable -Warity-mismatch \
145 --target="$(host)" \
af51c820
LC
146 -o "$@" "$<"
147
148SUFFIXES = .go
149
150# Make sure source files are installed first, so that the mtime of
151# installed compiled files is greater than that of installed source
152# files. See
153# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
154# for details.
155guix_install_go_files = install-nobase_nodist_guilemoduleDATA
156$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
f68b0893
LC
157
158SUBDIRS = po
159
568717fd
LC
160info_TEXINFOS = doc/guix.texi
161EXTRA_DIST += doc/fdl-1.3.texi
162
f68b0893 163ACLOCAL_AMFLAGS = -I m4
437e0729
LC
164AM_DISTCHECK_CONFIGURE_FLAGS = \
165 --with-nixpkgs=$(NIXPKGS) --with-nix-prefix="$(NIX_PREFIX)"