gnu: gdb: Update to 7.8.1.
[guix.git] / Makefile.am
blobb13fcbc05339db1e3608a11b08f81acfd9024bbc
1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013, 2014 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/>.
20 bin_SCRIPTS =                                   \
21   scripts/guix
23 nodist_noinst_SCRIPTS =                         \
24   pre-inst-env                                  \
25   test-env
27 include gnu-system.am
29 MODULES =                                       \
30   guix/base32.scm                               \
31   guix/base64.scm                               \
32   guix/records.scm                              \
33   guix/hash.scm                                 \
34   guix/pk-crypto.scm                            \
35   guix/pki.scm                                  \
36   guix/utils.scm                                \
37   guix/download.scm                             \
38   guix/git-download.scm                         \
39   guix/monads.scm                               \
40   guix/monad-repl.scm                           \
41   guix/gexp.scm                                 \
42   guix/profiles.scm                             \
43   guix/serialization.scm                        \
44   guix/nar.scm                                  \
45   guix/derivations.scm                          \
46   guix/gnu-maintenance.scm                      \
47   guix/licenses.scm                             \
48   guix/build-system.scm                         \
49   guix/build-system/cmake.scm                   \
50   guix/build-system/glib-or-gtk.scm             \
51   guix/build-system/gnu.scm                     \
52   guix/build-system/perl.scm                    \
53   guix/build-system/python.scm                  \
54   guix/build-system/ruby.scm                    \
55   guix/build-system/trivial.scm                 \
56   guix/ftp-client.scm                           \
57   guix/http-client.scm                          \
58   guix/gnupg.scm                                \
59   guix/store.scm                                \
60   guix/svn-download.scm                         \
61   guix/ui.scm                                   \
62   guix/build/download.scm                       \
63   guix/build/cmake-build-system.scm             \
64   guix/build/git.scm                            \
65   guix/build/glib-or-gtk-build-system.scm       \
66   guix/build/gnu-build-system.scm               \
67   guix/build/gnu-dist.scm                       \
68   guix/build/perl-build-system.scm              \
69   guix/build/python-build-system.scm            \
70   guix/build/ruby-build-system.scm              \
71   guix/build/store-copy.scm                     \
72   guix/build/utils.scm                          \
73   guix/build/union.scm                          \
74   guix/build/pull.scm                           \
75   guix/build/rpath.scm                          \
76   guix/build/svn.scm                            \
77   guix/build/syscalls.scm                       \
78   guix/build/emacs-utils.scm                    \
79   guix/build/graft.scm                          \
80   guix/packages.scm                             \
81   guix/import/utils.scm                         \
82   guix/import/snix.scm                          \
83   guix/scripts/download.scm                     \
84   guix/scripts/build.scm                        \
85   guix/scripts/archive.scm                      \
86   guix/scripts/import.scm                       \
87   guix/scripts/package.scm                      \
88   guix/scripts/gc.scm                           \
89   guix/scripts/hash.scm                         \
90   guix/scripts/pull.scm                         \
91   guix/scripts/substitute-binary.scm            \
92   guix/scripts/authenticate.scm                 \
93   guix/scripts/refresh.scm                      \
94   guix/scripts/system.scm                       \
95   guix/scripts/lint.scm                         \
96   guix/scripts/import/nix.scm                   \
97   guix/scripts/environment.scm                  \
98   guix.scm                                      \
99   $(GNU_SYSTEM_MODULES)
101 if BUILD_DAEMON_OFFLOAD
103 MODULES +=                                      \
104   guix/scripts/offload.scm
106 endif BUILD_DAEMON_OFFLOAD
108 # Internal module with test suite support.
109 noinst_DATA = guix/tests.scm
111 # Because of the autoload hack in (guix build download), we must build it
112 # first to avoid errors on systems where (gnutls) is unavailable.
113 guix/scripts/download.go: guix/build/download.go
114 guix/download.go: guix/build/download.go
116 # Linux-Libre configurations.
117 KCONFIGS =                                      \
118   gnu/packages/linux-libre-i686.conf            \
119   gnu/packages/linux-libre-x86_64.conf
121 # Templates, examples.
122 EXAMPLES =                                      \
123   gnu/system/os-config.tmpl
125 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
127 nobase_dist_guilemodule_DATA = $(MODULES) $(KCONFIGS) $(EXAMPLES)
128 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
130 # Do we need to provide our own non-broken (srfi srfi-37) module?
131 if INSTALL_SRFI_37
133 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
134 GOBJECTS += srfi/srfi-37.go
136 srfi/srfi-37.scm: srfi/srfi-37.scm.in
137         $(MKDIR_P) srfi
138         cp "$<" "$@"
140 endif INSTALL_SRFI_37
142 # Handy way to remove the .go files without removing all the rest.
143 clean-go:
144         -$(RM) -f $(GOBJECTS)
147 SCM_TESTS =                                     \
148   tests/base32.scm                              \
149   tests/base64.scm                              \
150   tests/hash.scm                                \
151   tests/pk-crypto.scm                           \
152   tests/pki.scm                                 \
153   tests/substitute-binary.scm                   \
154   tests/builders.scm                            \
155   tests/derivations.scm                         \
156   tests/ui.scm                                  \
157   tests/records.scm                             \
158   tests/utils.scm                               \
159   tests/build-utils.scm                         \
160   tests/packages.scm                            \
161   tests/snix.scm                                \
162   tests/store.scm                               \
163   tests/monads.scm                              \
164   tests/gexp.scm                                \
165   tests/nar.scm                                 \
166   tests/union.scm                               \
167   tests/profiles.scm                            \
168   tests/syscalls.scm                            \
169   tests/lint.scm
171 if HAVE_GUILE_JSON
173 MODULES +=                                      \
174   guix/import/pypi.scm                          \
175   guix/scripts/import/pypi.scm
177 SCM_TESTS += tests/pypi.scm
179 endif
181 SH_TESTS =                                      \
182   tests/guix-build.sh                           \
183   tests/guix-download.sh                        \
184   tests/guix-gc.sh                              \
185   tests/guix-hash.sh                            \
186   tests/guix-package.sh                         \
187   tests/guix-system.sh                          \
188   tests/guix-archive.sh                         \
189   tests/guix-authenticate.sh                    \
190   tests/guix-lint.sh
192 if BUILD_DAEMON
194 SH_TESTS += tests/guix-register.sh
196 endif BUILD_DAEMON
199 TESTS = $(SCM_TESTS) $(SH_TESTS)
201 TEST_EXTENSIONS = .scm .sh
203 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
205 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
206 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
208 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
209 AM_SH_LOG_FLAGS = -x -e
211 # Make sure `tests/guix-gc.sh' runs last, after all the others.  Otherwise it
212 # could end up removing files from the store while they are being used by
213 # other instances of the daemon.
214 tests/guix-gc.log:                                                      \
215   $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS)))     \
216   $(SCM_TESTS:%.scm=%.log)
218 # Public key used to sign substitutes from hydra.gnu.org.
219 dist_pkgdata_DATA = hydra.gnu.org.pub
221 EXTRA_DIST =                                            \
222   HACKING                                               \
223   ROADMAP                                               \
224   TODO                                                  \
225   .dir-locals.el                                        \
226   build-aux/hydra/gnu-system.scm                        \
227   build-aux/hydra/demo-os.scm                           \
228   build-aux/hydra/guix.scm                              \
229   build-aux/check-available-binaries.scm                \
230   build-aux/check-final-inputs-self-contained.scm       \
231   build-aux/download.scm                                \
232   build-aux/list-packages.scm                           \
233   build-aux/sync-descriptions.scm                       \
234   srfi/srfi-37.scm.in                                   \
235   srfi/srfi-64.scm                                      \
236   srfi/srfi-64.upstream.scm                             \
237   tests/test.drv                                        \
238   tests/signing-key.pub                                 \
239   tests/signing-key.sec                                 \
240   build-aux/config.rpath                                \
241   bootstrap                                             \
242   release.nix                                           \
243   $(TESTS)
245 if !BUILD_DAEMON_OFFLOAD
247 EXTRA_DIST +=                                   \
248   guix/scripts/offload.scm
250 endif !BUILD_DAEMON_OFFLOAD
253 CLEANFILES =                                    \
254   $(GOBJECTS)                                   \
255   $(SCM_TESTS:tests/%.scm=%.log)
257 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
258 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
259 AM_V_GUILEC_0 = @echo "  GUILEC" $@;
261 # XXX: Use the C locale for when Guile lacks
262 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
263 .scm.go:
264         $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ;                       \
265         LC_ALL=C                                                        \
266         $(top_builddir)/pre-inst-env                                    \
267         $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)"        \
268           -Wformat -Wunbound-variable -Warity-mismatch                  \
269           --target="$(host)"                                            \
270           -o "$@" "$<"
272 SUFFIXES = .go
274 # Make sure source files are installed first, so that the mtime of
275 # installed compiled files is greater than that of installed source
276 # files.  See
277 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
278 # for details.
279 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
280 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
282 SUBDIRS = po/guix po/packages
283 BUILT_SOURCES =
285 include doc.am
287 if BUILD_DAEMON
289 include daemon.am
291 endif BUILD_DAEMON
293 ACLOCAL_AMFLAGS = -I m4
294 AM_DISTCHECK_CONFIGURE_FLAGS =                  \
295   --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
296   --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
297   --with-nix-prefix="$(NIX_PREFIX)"             \
298   --enable-daemon
300 dist_emacsui_DATA = emacs/guix-main.scm
301 nodist_emacsui_DATA = emacs/guix-helper.scm
302 include emacs.am
304 dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names
305 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
307 sync-descriptions:
308         -$(top_builddir)/pre-inst-env $(GUILE)          \
309            $(top_srcdir)/build-aux/sync-descriptions.scm
311 gen-ChangeLog:
312         if test -d .git; then                           \
313           $(top_srcdir)/build-aux/gitlog-to-changelog   \
314             > $(distdir)/cl-t;                          \
315           rm -f $(distdir)/ChangeLog;                   \
316           mv $(distdir)/cl-t $(distdir)/ChangeLog;      \
317         fi
319 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
320 assert-no-store-file-names:
321         if grep -r --exclude=*.texi --exclude=*.info                            \
322              "$(storedir)/[a-z0-9]{32}-" $(distdir) ;                           \
323         then                                                                    \
324           echo "error: store file names embedded in the distribution" >&2 ;     \
325           exit 1 ;                                                              \
326         fi
328 # Make sure hydra.gnu.org has the important binaries.
329 assert-binaries-available:
330         $(top_builddir)/pre-inst-env "$(GUILE)"                         \
331           "$(top_srcdir)/build-aux/check-available-binaries.scm"
333 # Make sure the final inputs don't refer to bootstrap tools.
334 assert-final-inputs-self-contained:
335         $(top_builddir)/pre-inst-env "$(GUILE)"                         \
336           "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
338 .PHONY: sync-descriptions gen-ChangeLog clean-go
339 .PHONY: assert-no-store-file-names assert-binaries-available
340 .PHONY: assert-final-inputs-self-contained