gnu: ghostscript: Do not build the statically-linked 'gs' binary.
[jackhill/guix/guix.git] / Makefile.am
index 74bc8b5..d0c1826 100644 (file)
@@ -2,6 +2,8 @@
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
 # Copyright © 2015 Alex Kost <alezost@gmail.com>
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
+# Copyright © 2016 Mark H Weaver <mhw@netris.org>
 #
 # This file is part of GNU Guix.
 #
@@ -25,7 +27,7 @@ nodist_noinst_SCRIPTS =                               \
   pre-inst-env                                 \
   test-env
 
-include gnu-system.am
+include gnu/local.mk
 
 MODULES =                                      \
   guix/base32.scm                              \
@@ -47,12 +49,14 @@ MODULES =                                   \
   guix/serialization.scm                       \
   guix/nar.scm                                 \
   guix/derivations.scm                         \
+  guix/grafts.scm                              \
   guix/gnu-maintenance.scm                     \
   guix/upstream.scm                            \
   guix/licenses.scm                            \
   guix/graph.scm                               \
   guix/cve.scm                                 \
   guix/build-system.scm                                \
+  guix/build-system/ant.scm                    \
   guix/build-system/cmake.scm                  \
   guix/build-system/emacs.scm                  \
   guix/build-system/glib-or-gtk.scm            \
@@ -72,6 +76,7 @@ MODULES =                                     \
   guix/cvs-download.scm                                \
   guix/svn-download.scm                                \
   guix/ui.scm                                  \
+  guix/build/ant-build-system.scm              \
   guix/build/download.scm                      \
   guix/build/cmake-build-system.scm            \
   guix/build/emacs-build-system.scm            \
@@ -96,6 +101,7 @@ MODULES =                                    \
   guix/build/gremlin.scm                       \
   guix/build/emacs-utils.scm                   \
   guix/build/graft.scm                         \
+  guix/build/bournish.scm                      \
   guix/search-paths.scm                                \
   guix/packages.scm                            \
   guix/import/utils.scm                                \
@@ -138,6 +144,7 @@ MODULES =                                   \
 if HAVE_GUILE_JSON
 
 MODULES +=                                     \
+  guix/import/github.scm                       \
   guix/import/json.scm                         \
   guix/import/pypi.scm                         \
   guix/scripts/import/pypi.scm                 \
@@ -166,13 +173,18 @@ dist_noinst_DATA = guix/tests.scm
 
 # Linux-Libre configurations.
 KCONFIGS =                                     \
-  gnu/packages/linux-libre-i686.conf           \
-  gnu/packages/linux-libre-x86_64.conf
+  gnu/packages/linux-libre-4.5-i686.conf       \
+  gnu/packages/linux-libre-4.5-x86_64.conf     \
+  gnu/packages/linux-libre-4.4-i686.conf       \
+  gnu/packages/linux-libre-4.4-x86_64.conf     \
+  gnu/packages/linux-libre-4.1-i686.conf       \
+  gnu/packages/linux-libre-4.1-x86_64.conf
 
 # Templates, examples.
 EXAMPLES =                                     \
   gnu/system/examples/bare-bones.tmpl          \
-  gnu/system/examples/desktop.tmpl
+  gnu/system/examples/desktop.tmpl             \
+  gnu/system/examples/lightweight-desktop.tmpl
 
 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
 
@@ -215,8 +227,10 @@ SCM_TESTS =                                        \
   tests/substitute.scm                         \
   tests/builders.scm                           \
   tests/derivations.scm                                \
+  tests/grafts.scm                             \
   tests/ui.scm                                 \
   tests/records.scm                            \
+  tests/upstream.scm                           \
   tests/utils.scm                              \
   tests/build-utils.scm                                \
   tests/packages.scm                           \
@@ -240,8 +254,11 @@ SCM_TESTS =                                        \
   tests/challenge.scm                          \
   tests/cve.scm                                        \
   tests/file-systems.scm                       \
+  tests/system.scm                             \
   tests/services.scm                           \
-  tests/containers.scm
+  tests/scripts-build.scm                      \
+  tests/containers.scm                         \
+  tests/import-utils.scm
 
 if HAVE_GUILE_JSON
 
@@ -276,10 +293,11 @@ endif BUILD_DAEMON
 
 TESTS = $(SCM_TESTS) $(SH_TESTS)
 
-AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
+AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
 
-SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
-AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
+SCM_LOG_DRIVER = $(top_builddir)/test-env $(GUILE) --no-auto-compile \
+                   -e main $(top_srcdir)/build-aux/test-driver.scm
+AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
 
 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
 AM_SH_LOG_FLAGS = -x -e
@@ -321,6 +339,7 @@ EXTRA_DIST =                                                \
   .dir-locals.el                                       \
   build-aux/build-self.scm                             \
   build-aux/compile-all.scm                            \
+  build-aux/hydra/evaluate.scm                         \
   build-aux/hydra/gnu-system.scm                       \
   build-aux/hydra/demo-os.scm                          \
   build-aux/hydra/guix.scm                             \
@@ -329,6 +348,7 @@ EXTRA_DIST =                                                \
   build-aux/download.scm                               \
   build-aux/make-binary-tarball.scm                    \
   build-aux/generate-authors.scm                       \
+  build-aux/test-driver.scm                            \
   srfi/srfi-37.scm.in                                  \
   srfi/srfi-64.scm                                     \
   srfi/srfi-64.upstream.scm                            \
@@ -396,16 +416,20 @@ install-data-hook: set-bootstrap-executable-permissions
 SUBDIRS = po/guix po/packages
 BUILT_SOURCES =
 
-include doc.am
+include doc/local.mk
 
 if BUILD_DAEMON
 
-include daemon.am
+include nix/local.mk
 
 endif BUILD_DAEMON
 
 ACLOCAL_AMFLAGS = -I m4
+
+# Pass an explicit '--localstatedir' so that configure does not error out if
+# it finds an existing installation with a different localstatedir.
 AM_DISTCHECK_CONFIGURE_FLAGS =                 \
+  --localstatedir="$$dc_install_base/var"      \
   --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)"        \
   --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)"        \
   --with-nix-prefix="$(NIX_PREFIX)"            \
@@ -413,11 +437,11 @@ AM_DISTCHECK_CONFIGURE_FLAGS =                    \
 
 dist_emacsui_DATA = emacs/guix-main.scm
 nodist_emacsui_DATA = emacs/guix-helper.scm
-include emacs.am
+include emacs/local.mk
 
 # The self-contained tarball.
 guix-binary.%.tar.xz:
-       -GUIX_PACKAGE_PATH= \
+       $(AM_V_GEN)GUIX_PACKAGE_PATH= \
        $(top_builddir)/pre-inst-env "$(GUILE)"                 \
          "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
 
@@ -428,11 +452,11 @@ dist-hook: assert-no-store-file-names
 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
 
 sync-descriptions:
-       -GUIX_PACKAGE_PATH= \
+       $(AM_V_at)GUIX_PACKAGE_PATH= \
         $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
 
 gen-ChangeLog:
-       if test -d .git; then                           \
+       $(AM_V_GEN)if test -d .git; then                \
          $(top_srcdir)/build-aux/gitlog-to-changelog   \
            > $(distdir)/cl-t;                          \
          rm -f $(distdir)/ChangeLog;                   \
@@ -440,7 +464,7 @@ gen-ChangeLog:
        fi
 
 gen-AUTHORS:
-       if test -d .git; then                                   \
+       $(AM_V_GEN)if test -d .git; then                        \
          rm -f "$(distdir)/AUTHORS";                           \
          $(top_builddir)/pre-inst-env "$(GUILE)"               \
            "$(top_srcdir)/build-aux/generate-authors.scm"      \
@@ -449,7 +473,7 @@ gen-AUTHORS:
 
 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
 assert-no-store-file-names:
-       if grep -r --exclude=*.texi --exclude=*.info                            \
+       $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info                  \
             "$(storedir)/[a-z0-9]{32}-" $(distdir) ;                           \
        then                                                                    \
          echo "error: store file names embedded in the distribution" >&2 ;     \
@@ -457,15 +481,43 @@ assert-no-store-file-names:
        fi
 
 # Make sure hydra.gnu.org has the important binaries.
-assert-binaries-available:
-       $(top_builddir)/pre-inst-env "$(GUILE)"                         \
+assert-binaries-available: $(GOBJECTS)
+       $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)"                       \
          "$(top_srcdir)/build-aux/check-available-binaries.scm"
 
 # Make sure the final inputs don't refer to bootstrap tools.
-assert-final-inputs-self-contained:
-       $(top_builddir)/pre-inst-env "$(GUILE)"                         \
+assert-final-inputs-self-contained: $(GOBJECTS)
+       $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)"                       \
          "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
 
+# Compute the Hydra jobs and write them in the target file.
+hydra-jobs.scm: $(GOBJECTS)
+       $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
+       $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)"              \
+         "$(top_srcdir)/build-aux/hydra/evaluate.scm"                  \
+         "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
+       $(AT_V_at)mv "$@.tmp" "$@"
+
 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
 .PHONY: assert-no-store-file-names assert-binaries-available
 .PHONY: assert-final-inputs-self-contained
+
+## -------------- ##
+## Silent rules.  ##
+## -------------- ##
+
+AM_V_DL = $(AM_V_DL_$(V))
+AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
+AM_V_DL_0 = @echo "  DL      " $@;
+
+AM_V_DOT = $(AM_V_DOT_$(V))
+AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
+AM_V_DOT_0 = @echo "  DOT     " $@;
+
+AM_V_EMACS = $(AM_V_EMACS_$(V))
+AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
+AM_V_EMACS_0 = @echo "  EMACS   " $@;
+
+AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
+AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
+AM_V_HELP2MAN_0 = @echo "  HELP2MAN" $@;