(drak)
2016-04-20: autotools: workaround for install-langDATA and install-siteDATA not autotools: workaround for install-langDATA and install-siteDATA not honoring DESTDIR from distcheck
diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -35,3 +35,18 @@ syntaxtestsreader.sh : ${WISP} wisp.scm chmod +x @abs_top_builddir@/$@ TESTS=syntaxtests.sh syntaxtestsreader.sh + +# The installchecks won't work in a "make distcheck", because +# they won't be installed in the final location used by the tools. +# FIXME: automake should honor DESTDIR set by make distcheck +if IS_MAKE_DISTCHECK +install-siteDATA: + echo "Running 'make distcheck'; local installchecks disabled." +install-langDATA: + echo "Running 'make distcheck'; local installchecks disabled." +uninstall-siteDATA: + echo "Running 'make distcheck'; local installchecks disabled." +uninstall-langDATA: + echo "Running 'make distcheck'; local installchecks disabled." +else !IS_MAKE_DISTCHECK +endif !IS_MAKE_DISTCHECK diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,19 @@ AC_ARG_VAR([python3], [How to call Pytho AC_CHECK_TARGET_TOOL([python3], [python3], [no]) AS_IF([test "x$python3" = "xno"], [AC_MSG_WARN([cannot find Python 3 which is required for development bootstrapping.])]) + +# Is this a normal install, or a "make distcheck"? We need to disable +# the tests in a "make distcheck" that won't work. +# FIXME: automake should honor DESTDIR set by make distcheck +is_make_distcheck=no +AS_CASE([$prefix], + [*/_inst], + [AC_MSG_NOTICE([[Prefix ends in /_inst; this is a 'make distcheck'.]]) + is_make_distcheck=yes]) +AM_CONDITIONAL([IS_MAKE_DISTCHECK], [test "x$is_make_distcheck" = x"yes"]) +AC_MSG_CHECKING([final decision IS_MAKE_DISTCHECK (running "make distcheck"?)]) +AM_COND_IF([IS_MAKE_DISTCHECK], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) + # Run automake # Use GNU style. Note that ChangeLog is created on every commit # by a commit hook in .hg/hgrc