gnu: python-pillow: Disable egg compression.
[guix.git] / Makefile.am
blobada4cbea0bd43efbc0c3d13ee492c59fd3cdedde
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/>.
21 bin_SCRIPTS =                                   \
22   scripts/guix
24 nodist_noinst_SCRIPTS =                         \
25   pre-inst-env                                  \
26   test-env
28 include gnu-system.am
30 MODULES =                                       \
31   guix/base32.scm                               \
32   guix/base64.scm                               \
33   guix/cpio.scm                                 \
34   guix/records.scm                              \
35   guix/gcrypt.scm                               \
36   guix/hash.scm                                 \
37   guix/pk-crypto.scm                            \
38   guix/pki.scm                                  \
39   guix/utils.scm                                \
40   guix/sets.scm                                 \
41   guix/download.scm                             \
42   guix/git-download.scm                         \
43   guix/monads.scm                               \
44   guix/monad-repl.scm                           \
45   guix/gexp.scm                                 \
46   guix/profiles.scm                             \
47   guix/serialization.scm                        \
48   guix/nar.scm                                  \
49   guix/derivations.scm                          \
50   guix/gnu-maintenance.scm                      \
51   guix/licenses.scm                             \
52   guix/build-system.scm                         \
53   guix/build-system/cmake.scm                   \
54   guix/build-system/emacs.scm                   \
55   guix/build-system/glib-or-gtk.scm             \
56   guix/build-system/gnu.scm                     \
57   guix/build-system/haskell.scm                 \
58   guix/build-system/perl.scm                    \
59   guix/build-system/python.scm                  \
60   guix/build-system/waf.scm                     \
61   guix/build-system/ruby.scm                    \
62   guix/build-system/trivial.scm                 \
63   guix/ftp-client.scm                           \
64   guix/http-client.scm                          \
65   guix/gnupg.scm                                \
66   guix/elf.scm                                  \
67   guix/store.scm                                \
68   guix/cvs-download.scm                         \
69   guix/svn-download.scm                         \
70   guix/ui.scm                                   \
71   guix/build/download.scm                       \
72   guix/build/cmake-build-system.scm             \
73   guix/build/emacs-build-system.scm             \
74   guix/build/git.scm                            \
75   guix/build/glib-or-gtk-build-system.scm       \
76   guix/build/gnu-build-system.scm               \
77   guix/build/gnu-dist.scm                       \
78   guix/build/perl-build-system.scm              \
79   guix/build/python-build-system.scm            \
80   guix/build/ruby-build-system.scm              \
81   guix/build/waf-build-system.scm               \
82   guix/build/haskell-build-system.scm           \
83   guix/build/store-copy.scm                     \
84   guix/build/utils.scm                          \
85   guix/build/union.scm                          \
86   guix/build/profiles.scm                       \
87   guix/build/pull.scm                           \
88   guix/build/rpath.scm                          \
89   guix/build/cvs.scm                            \
90   guix/build/svn.scm                            \
91   guix/build/syscalls.scm                       \
92   guix/build/gremlin.scm                        \
93   guix/build/emacs-utils.scm                    \
94   guix/build/graft.scm                          \
95   guix/search-paths.scm                         \
96   guix/packages.scm                             \
97   guix/import/utils.scm                         \
98   guix/import/gnu.scm                           \
99   guix/import/snix.scm                          \
100   guix/import/cabal.scm                         \
101   guix/import/hackage.scm                       \
102   guix/import/elpa.scm                          \
103   guix/scripts/download.scm                     \
104   guix/scripts/build.scm                        \
105   guix/scripts/archive.scm                      \
106   guix/scripts/import.scm                       \
107   guix/scripts/package.scm                      \
108   guix/scripts/gc.scm                           \
109   guix/scripts/hash.scm                         \
110   guix/scripts/pull.scm                         \
111   guix/scripts/substitute.scm                   \
112   guix/scripts/authenticate.scm                 \
113   guix/scripts/refresh.scm                      \
114   guix/scripts/system.scm                       \
115   guix/scripts/lint.scm                         \
116   guix/scripts/import/gnu.scm                   \
117   guix/scripts/import/nix.scm                   \
118   guix/scripts/import/hackage.scm               \
119   guix/scripts/import/elpa.scm                  \
120   guix/scripts/environment.scm                  \
121   guix/scripts/publish.scm                      \
122   guix/scripts/edit.scm                         \
123   guix/scripts/size.scm                         \
124   guix.scm                                      \
125   $(GNU_SYSTEM_MODULES)
127 if BUILD_DAEMON_OFFLOAD
129 MODULES +=                                      \
130   guix/scripts/offload.scm
132 endif BUILD_DAEMON_OFFLOAD
134 # Internal module with test suite support.
135 dist_noinst_DATA = guix/tests.scm
137 # Because of the autoload hack in (guix build download), we must build it
138 # first to avoid errors on systems where (gnutls) is unavailable.
139 guix/scripts/download.go: guix/build/download.go
140 guix/download.go: guix/build/download.go
142 # Linux-Libre configurations.
143 KCONFIGS =                                      \
144   gnu/packages/linux-libre-i686.conf            \
145   gnu/packages/linux-libre-x86_64.conf
147 # Templates, examples.
148 EXAMPLES =                                      \
149   gnu/system/examples/bare-bones.tmpl           \
150   gnu/system/examples/desktop.tmpl
152 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
154 nobase_dist_guilemodule_DATA =                  \
155   $(MODULES) $(KCONFIGS) $(EXAMPLES)            \
156   $(MISC_DISTRO_FILES)
157 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
159 # Do we need to provide our own non-broken (srfi srfi-37) module?
160 if INSTALL_SRFI_37
162 nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
163 GOBJECTS += srfi/srfi-37.go
165 srfi/srfi-37.scm: srfi/srfi-37.scm.in
166         $(MKDIR_P) srfi
167         cp "$<" "$@"
169 endif INSTALL_SRFI_37
171 # Handy way to remove the .go files without removing all the rest.
172 clean-go:
173         -$(RM) -f $(GOBJECTS)
176 SCM_TESTS =                                     \
177   tests/base32.scm                              \
178   tests/base64.scm                              \
179   tests/cpio.scm                                \
180   tests/hash.scm                                \
181   tests/pk-crypto.scm                           \
182   tests/pki.scm                                 \
183   tests/sets.scm                                \
184   tests/substitute.scm                          \
185   tests/builders.scm                            \
186   tests/derivations.scm                         \
187   tests/ui.scm                                  \
188   tests/records.scm                             \
189   tests/utils.scm                               \
190   tests/build-utils.scm                         \
191   tests/packages.scm                            \
192   tests/snix.scm                                \
193   tests/hackage.scm                             \
194   tests/elpa.scm                                \
195   tests/store.scm                               \
196   tests/monads.scm                              \
197   tests/gexp.scm                                \
198   tests/nar.scm                                 \
199   tests/union.scm                               \
200   tests/profiles.scm                            \
201   tests/syscalls.scm                            \
202   tests/gremlin.scm                             \
203   tests/lint.scm                                \
204   tests/publish.scm                             \
205   tests/size.scm                                \
206   tests/file-systems.scm                        \
207   tests/containers.scm
209 if HAVE_GUILE_JSON
211 MODULES +=                                      \
212   guix/import/json.scm                          \
213   guix/import/pypi.scm                          \
214   guix/scripts/import/pypi.scm                  \
215   guix/import/cpan.scm                          \
216   guix/scripts/import/cpan.scm
218 SCM_TESTS +=                                    \
219   tests/pypi.scm                                \
220   tests/cpan.scm
222 endif
224 SH_TESTS =                                      \
225   tests/guix-build.sh                           \
226   tests/guix-download.sh                        \
227   tests/guix-gc.sh                              \
228   tests/guix-hash.sh                            \
229   tests/guix-package.sh                         \
230   tests/guix-package-net.sh                     \
231   tests/guix-system.sh                          \
232   tests/guix-archive.sh                         \
233   tests/guix-authenticate.sh                    \
234   tests/guix-environment.sh                     \
235   tests/guix-lint.sh
237 if BUILD_DAEMON
239 SH_TESTS += tests/guix-register.sh
241 endif BUILD_DAEMON
244 TESTS = $(SCM_TESTS) $(SH_TESTS)
246 TEST_EXTENSIONS = .scm .sh
248 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
250 SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
251 AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
253 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
254 AM_SH_LOG_FLAGS = -x -e
256 # Make sure `tests/guix-gc.sh' runs last, after all the others.  Otherwise it
257 # could end up removing files from the store while they are being used by
258 # other instances of the daemon.
259 tests/guix-gc.log:                                                      \
260   $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS)))     \
261   $(SCM_TESTS:%.scm=%.log)
263 # Public key used to sign substitutes from hydra.gnu.org.
264 dist_pkgdata_DATA = hydra.gnu.org.pub
266 # Bash completion file.
267 dist_bashcompletion_DATA = etc/completion/bash/guix
269 EXTRA_DIST =                                            \
270   HACKING                                               \
271   ROADMAP                                               \
272   TODO                                                  \
273   .dir-locals.el                                        \
274   build-aux/build-self.scm                              \
275   build-aux/hydra/gnu-system.scm                        \
276   build-aux/hydra/demo-os.scm                           \
277   build-aux/hydra/guix.scm                              \
278   build-aux/check-available-binaries.scm                \
279   build-aux/check-final-inputs-self-contained.scm       \
280   build-aux/download.scm                                \
281   build-aux/make-binary-tarball.scm                     \
282   build-aux/generate-authors.scm                        \
283   srfi/srfi-37.scm.in                                   \
284   srfi/srfi-64.scm                                      \
285   srfi/srfi-64.upstream.scm                             \
286   tests/test.drv                                        \
287   tests/signing-key.pub                                 \
288   tests/signing-key.sec                                 \
289   build-aux/config.rpath                                \
290   bootstrap                                             \
291   release.nix                                           \
292   $(TESTS)
294 if !BUILD_DAEMON_OFFLOAD
296 EXTRA_DIST +=                                   \
297   guix/scripts/offload.scm
299 endif !BUILD_DAEMON_OFFLOAD
302 CLEANFILES =                                    \
303   $(GOBJECTS)                                   \
304   $(SCM_TESTS:tests/%.scm=%.log)
306 AM_V_GUILEC = $(AM_V_GUILEC_$(V))
307 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
308 AM_V_GUILEC_0 = @echo "  GUILEC" $@;
310 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling.  Otherwise, if
311 # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
312 # there that are newer than the local .scm files (for instance because the
313 # user ran 'make install' recently).  When that happens, we end up loading
314 # those previously-installed .go files, which may be stale, thereby breaking
315 # the whole thing.
317 # XXX: Use the C locale for when Guile lacks
318 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
319 .scm.go:
320         $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ;                       \
321         unset GUILE_LOAD_COMPILED_PATH ;                                \
322         LC_ALL=C                                                        \
323         $(top_builddir)/pre-inst-env                                    \
324         $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)"        \
325           -Wformat -Wunbound-variable -Warity-mismatch                  \
326           --target="$(host)"                                            \
327           -o "$@" "$<"
329 SUFFIXES = .go
331 # Make sure source files are installed first, so that the mtime of
332 # installed compiled files is greater than that of installed source
333 # files.  See
334 # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
335 # for details.
336 guix_install_go_files = install-nobase_nodist_guilemoduleDATA
337 $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
339 # The above trick doesn't work for 'config.go' because both 'config.scm' and
340 # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA).  Thus, give it
341 # special treatment.
342 install-data-hook: set-bootstrap-executable-permissions
343         touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
346 SUBDIRS = po/guix po/packages
347 BUILT_SOURCES =
349 include doc.am
351 if BUILD_DAEMON
353 include daemon.am
355 endif BUILD_DAEMON
357 ACLOCAL_AMFLAGS = -I m4
358 AM_DISTCHECK_CONFIGURE_FLAGS =                  \
359   --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
360   --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
361   --with-nix-prefix="$(NIX_PREFIX)"             \
362   --enable-daemon
364 dist_emacsui_DATA = emacs/guix-main.scm
365 nodist_emacsui_DATA = emacs/guix-helper.scm
366 include emacs.am
368 # The self-contained tarball.
369 guix-binary.%.tar.xz:
370         -GUIX_PACKAGE_PATH= \
371         $(top_builddir)/pre-inst-env "$(GUILE)"                 \
372           "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
375 dist-hook: sync-descriptions gen-ChangeLog gen-AUTHORS
376 dist-hook: assert-no-store-file-names
378 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
380 sync-descriptions:
381         -GUIX_PACKAGE_PATH= \
382          $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
384 gen-ChangeLog:
385         if test -d .git; then                           \
386           $(top_srcdir)/build-aux/gitlog-to-changelog   \
387             > $(distdir)/cl-t;                          \
388           rm -f $(distdir)/ChangeLog;                   \
389           mv $(distdir)/cl-t $(distdir)/ChangeLog;      \
390         fi
392 gen-AUTHORS:
393         if test -d .git; then                                   \
394           rm -f "$(distdir)/AUTHORS";                           \
395           $(top_builddir)/pre-inst-env "$(GUILE)"               \
396             "$(top_srcdir)/build-aux/generate-authors.scm"      \
397             "$(top_srcdir)" "$(distdir)/AUTHORS";               \
398         fi
400 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
401 assert-no-store-file-names:
402         if grep -r --exclude=*.texi --exclude=*.info                            \
403              "$(storedir)/[a-z0-9]{32}-" $(distdir) ;                           \
404         then                                                                    \
405           echo "error: store file names embedded in the distribution" >&2 ;     \
406           exit 1 ;                                                              \
407         fi
409 # Make sure hydra.gnu.org has the important binaries.
410 assert-binaries-available:
411         $(top_builddir)/pre-inst-env "$(GUILE)"                         \
412           "$(top_srcdir)/build-aux/check-available-binaries.scm"
414 # Make sure the final inputs don't refer to bootstrap tools.
415 assert-final-inputs-self-contained:
416         $(top_builddir)/pre-inst-env "$(GUILE)"                         \
417           "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
419 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go
420 .PHONY: assert-no-store-file-names assert-binaries-available
421 .PHONY: assert-final-inputs-self-contained