[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-378-g
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-378-g66249f4 |
Date: |
Mon, 13 Jun 2011 18:33:39 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=66249f441c572f7f950ae0ab88305fba73eb5a25
The branch, maint has been updated
via 66249f441c572f7f950ae0ab88305fba73eb5a25 (commit)
via f84f54f530c8aa0fd3dcd7a31506eef169958a0a (commit)
via 976003923e43d17985a776f82cf8168e8741f7de (commit)
from 73f8daa0b9d0734153d19f9bb44d9c679df5d9c1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 66249f441c572f7f950ae0ab88305fba73eb5a25
Merge: 73f8daa f84f54f
Author: Stefano Lattarini <address@hidden>
Date: Mon Jun 13 20:16:16 2011 +0200
Merge branch 'am-distcheck-configure-flags' into maint
* am-distcheck-configure-flags:
maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
commit f84f54f530c8aa0fd3dcd7a31506eef169958a0a
Author: Stefano Lattarini <address@hidden>
Date: Fri Jun 10 17:13:17 2011 +0200
maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
* Makefile.am (sc_tests_overriding_macros_on_cmdline): It's now
acceptable that the test scripts override DISTCHECK_CONFIGURE_FLAGS
on the make command line. Update comments accordingly. Since we
are at it, make the relevant grepping rules slightly tighter.
commit 976003923e43d17985a776f82cf8168e8741f7de
Author: Stefano Lattarini <address@hidden>
Date: Fri Jun 10 12:26:42 2011 +0200
distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
* doc/automake.texi (Checking the Distribution): Suggest to use
AM_DISTCHECK_CONFIGURE_FLAGS, not DISTCHECK_CONFIGURE_FLAGS, to
define (in the top-level Makefile.am) extra flags to be passed
to configure at "make distcheck" time; DISTCHECK_CONFIGURE_FLAGS
should be reserved for the user. Add proper address@hidden' directive.
Document that AM_DISTCHECK_CONFIGURE_FLAGS is not honoured in a
subpackage Makefile.am, but the flags in it are passed down to
the configure script of the subpackage.
* lib/am/distdir.am (distcheck): Also pass the flags in
$(AM_DISTCHECK_CONFIGURE_FLAGS) to the configure invocation.
Update comments.
* tests/defs.in.test (AM_DISTCHECK_CONFIGURE_FLAGS,
DISTCHECK_CONFIGURE_FLAGS): Unset in case they are exported in
the environment, they might improperly influence our testsuite.
* tests/distcheck-configure-flags.test: New test.
* tests/distcheck-configure-flags-am.test: Likewise.
* tests/distcheck-configure-flags-subpkg.test: Likewise.
* distcheck-hook.test: Likewise.
* distcheck-hook2.test: Likewise.
* tests/Makefile.am (TESTS): Update.
Closes automake bug#8487.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 33 ++++++++
Makefile.am | 17 +++-
Makefile.in | 9 ++-
doc/automake.texi | 14 ++-
lib/am/distdir.am | 4 +-
tests/Makefile.am | 5 +
tests/Makefile.in | 5 +
tests/defs.in | 2 +
tests/distcheck-configure-flags-am.test | 68 ++++++++++++++++
tests/distcheck-configure-flags-subpkg.test | 83 ++++++++++++++++++++
tests/distcheck-configure-flags.test | 56 +++++++++++++
...{autodist-acconfig.test => distcheck-hook.test} | 31 +++++---
tests/{subpkg3.test => distcheck-hook2.test} | 52 +++++++++----
13 files changed, 340 insertions(+), 39 deletions(-)
create mode 100755 tests/distcheck-configure-flags-am.test
create mode 100755 tests/distcheck-configure-flags-subpkg.test
create mode 100755 tests/distcheck-configure-flags.test
copy tests/{autodist-acconfig.test => distcheck-hook.test} (64%)
copy tests/{subpkg3.test => distcheck-hook2.test} (51%)
diff --git a/ChangeLog b/ChangeLog
index c3f6de0..39e4c8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2011-06-10 Stefano Lattarini <address@hidden>
+
+ maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
+ * Makefile.am (sc_tests_overriding_macros_on_cmdline): It's now
+ acceptable that the test scripts override DISTCHECK_CONFIGURE_FLAGS
+ on the make command line. Update comments accordingly. Since we
+ are at it, make the relevant grepping rules slightly tighter.
+
+2011-06-10 Stefano Lattarini <address@hidden>
+
+ distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
+ * doc/automake.texi (Checking the Distribution): Suggest to use
+ AM_DISTCHECK_CONFIGURE_FLAGS, not DISTCHECK_CONFIGURE_FLAGS, to
+ define (in the top-level Makefile.am) extra flags to be passed
+ to configure at "make distcheck" time; DISTCHECK_CONFIGURE_FLAGS
+ should be reserved for the user. Add proper address@hidden' directive.
+ Document that AM_DISTCHECK_CONFIGURE_FLAGS is not honoured in a
+ subpackage Makefile.am, but the flags in it are passed down to
+ the configure script of the subpackage.
+ * lib/am/distdir.am (distcheck): Also pass the flags in
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) to the configure invocation.
+ Update comments.
+ * tests/defs.in.test (AM_DISTCHECK_CONFIGURE_FLAGS,
+ DISTCHECK_CONFIGURE_FLAGS): Unset in case they are exported in
+ the environment, they might improperly influence our testsuite.
+ * tests/distcheck-configure-flags.test: New test.
+ * tests/distcheck-configure-flags-am.test: Likewise.
+ * tests/distcheck-configure-flags-subpkg.test: Likewise.
+ * distcheck-hook.test: Likewise.
+ * distcheck-hook2.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+ Closes automake bug#8784.
+
2010-06-09 Stefano Lattarini <address@hidden>
docs: better documentation for silent make rules
diff --git a/Makefile.am b/Makefile.am
index f0cc95e..b25a30a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -442,17 +442,24 @@ sc_tests_required_after_defs:
done
## Overriding a Makefile macro on the command line is not portable when
-## recursive targets are used. Better use an envvar. SHELL is an exception,
-## POSIX says it can't come from the environment. V and DESTDIRS are
exceptions,
-## too, as package authors are urged not to initialize them anywhere.
+## recursive targets are used. Better use an envvar. SHELL is an
+## exception, POSIX says it can't come from the environment. DESTDIR and
+## DISTCHECK_CONFIGURE_FLAGS and V are exceptions, too, as package authors
+## are urged not to initialize them anywhere.
sc_tests_overriding_macros_on_cmdline:
@if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test;
then \
echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e
SHELL=$$SHELL"' 1>&2; \
echo ' in the above lines, it is more portable.' 1>&2; \
exit 1; \
fi
- @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//'
$(srcdir)/tests/*.test | \
- grep '\$$MAKE .*=' ; then \
+ @if sed -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+ -e 's/ V=[^ ]*/ /' -e 's///' \
+## DISTCHECK_CONFIGURE_FLAGS is allowed to contain whitespace in its
+## definition, so the more complex substitutions below.
+ -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
+ -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
+ -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
+ $(srcdir)/tests/*.test | grep '\$$MAKE .*='; then \
echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above
lines,' 1>&2; \
echo 'it is more portable.' 1>&2; \
exit 1; \
diff --git a/Makefile.in b/Makefile.in
index d0951e0..6539f3c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -721,6 +721,7 @@ distcheck: dist
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -1140,8 +1141,12 @@ sc_tests_overriding_macros_on_cmdline:
echo ' in the above lines, it is more portable.' 1>&2; \
exit 1; \
fi
- @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//'
$(srcdir)/tests/*.test | \
- grep '\$$MAKE .*=' ; then \
+ @if sed -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+ -e 's/ V=[^ ]*/ /' -e 's///' \
+ -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
+ -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
+ -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
+ $(srcdir)/tests/*.test | grep '\$$MAKE .*='; then \
echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above
lines,' 1>&2; \
echo 'it is more portable.' 1>&2; \
exit 1; \
diff --git a/doc/automake.texi b/doc/automake.texi
index 61128c4..e30266c 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8424,11 +8424,14 @@ makes a distribution, then tries to do a @code{VPATH}
build
(@pxref{VPATH Builds}), run the test suite, and finally make another
tarball to ensure the distribution is self-contained.
address@hidden AM_DISTCHECK_CONFIGURE_FLAGS
@vindex DISTCHECK_CONFIGURE_FLAGS
Building the package involves running @samp{./configure}. If you need
to supply additional flags to @command{configure}, define them in the
address@hidden variable, either in your top-level
address@hidden, or on the command line when invoking @command{make}.
address@hidden variable in your top-level
address@hidden The user can still extend or override the flags
+provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
+on the command line when invoking @command{make}.
@trindex distcheck-hook
If the @code{distcheck-hook} rule is defined in your top-level
@@ -8438,9 +8441,10 @@ is configured and built. Your @code{distcheck-hook} can
do almost
anything, though as always caution is advised. Generally this hook is
used to check for potential distribution errors not caught by the
standard mechanism. Note that @code{distcheck-hook} as well as
address@hidden are not honored in a subpackage
address@hidden, but the @code{DISTCHECK_CONFIGURE_FLAGS} are
-passed down to the @command{configure} script of the subpackage.
address@hidden and @code{DISTCHECK_CONFIGURE_FLAGS}
+are not honored in a subpackage @file{Makefile.am}, but the flags from
address@hidden and @code{DISTCHECK_CONFIGURE_FLAGS}
+are passed down to the @command{configure} script of the subpackage.
@trindex distcleancheck
@vindex DISTCLEANFILES
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index e0f3bce..c2dd7c5 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -468,7 +468,9 @@ distcheck: dist
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
?GETTEXT? --with-included-gettext \
## Additional flags for configure. Keep this last in the configure
-## invocation so the user can override previous options.
+## invocation so the developer and user can override previous options,
+## and let the user's flags take precedence over the developer's ones.
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 52e26bc..bd3f99c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -312,6 +312,11 @@ distdir.test \
distlinks.test \
distlinksbrk.test \
distname.test \
+distcheck-configure-flags.test \
+distcheck-configure-flags-am.test \
+distcheck-configure-flags-subpkg.test \
+distcheck-hook.test \
+distcheck-hook2.test \
dmalloc.test \
dollar.test \
dollarvar.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 8873da4..b810963 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -583,6 +583,11 @@ distdir.test \
distlinks.test \
distlinksbrk.test \
distname.test \
+distcheck-configure-flags.test \
+distcheck-configure-flags-am.test \
+distcheck-configure-flags-subpkg.test \
+distcheck-hook.test \
+distcheck-hook2.test \
dmalloc.test \
dollar.test \
dollarvar.test \
diff --git a/tests/defs.in b/tests/defs.in
index 5849fbd..f5e9e29 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -426,6 +426,8 @@ unset DESTDIR
unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
unset htmldir includedir infodir libdir libexecdir localedir mandir
unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# Unset variables that might change the "make distcheck" behaviour.
+unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS
# Also unset variables that control our test driver. While not
# conceptually independent, they cause some changed semantics we
# need to control (and test for) in some of the tests to ensure
diff --git a/tests/distcheck-configure-flags-am.test
b/tests/distcheck-configure-flags-am.test
new file mode 100755
index 0000000..a5cab6a
--- /dev/null
+++ b/tests/distcheck-configure-flags-am.test
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check support for AM_DISTCHECK_CONFIGURE_FLAGS at "make distcheck"
+# time, and its interactions with DISTCHECK_CONFIGURE_FLAGS.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
+AS_IF([test $success = yes && test "$sentence" = 'it works :-)'],
+ [:],
+ [AC_MSG_ERROR([success='$success', sentence='$sentence'])])
+AC_OUTPUT
+END
+
+unset sentence || :
+
+cat > Makefile.am << 'END'
+AM_DISTCHECK_CONFIGURE_FLAGS = --enable-success sentence='it works :-)'
+END
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
+$FGREP '$(AM_DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
+grep 'DISTCHECK_CONFIGURE_FLAGS.*AM_DISTCHECK_CONFIGURE_FLAGS' Makefile.in \
+ && Exit 1
+
+$AUTOCONF
+./configure --enable-success sentence='it works :-)'
+
+# The configure call in "make distcheck" should honour
+# $(AM_DISTCHECK_CONFIGURE_FLAGS).
+
+$MAKE distcheck
+
+# $(DISTCHECK_CONFIGURE_FLAGS) takes precedence over
+# $(AM_DISTCHECK_CONFIGURE_FLAGS)
+
+cat >> Makefile.am << 'END'
+AM_DISTCHECK_CONFIGURE_FLAGS += --disable-success
+END
+$AUTOMAKE Makefile
+./config.status Makefile
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep "^configure:.* success='no', sentence='it works :-)'" output
+
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes"
+
+:
diff --git a/tests/distcheck-configure-flags-subpkg.test
b/tests/distcheck-configure-flags-subpkg.test
new file mode 100755
index 0000000..695b47c
--- /dev/null
+++ b/tests/distcheck-configure-flags-subpkg.test
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check AM_DISTCHECK_CONFIGURE_FLAGS and DISTCHECK_CONFIGURE_FLAGS
+# are not honored in a subpackage Makefile.am, but the flags from
+# AM_DISTCHECK_CONFIGURE_FLAGS and DISTCHECK_CONFIGURE_FLAGS are
+# passed down to the configure script of the subpackage. This is
+# explicitly documented in the manual.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_SUBDIRS([subpkg])
+if test $dc != ok || test $am_dc != ok; then
+ AC_MSG_ERROR([dc=$dc am_dc=$dc])
+fi
+AC_OUTPUT
+END
+
+mkdir subpkg
+
+sed <configure.in >subpkg/configure.in \
+ -e 's/^AC_INIT.*/AC_INIT([subpkg], [2.0])/' \
+ -e '/^AC_CONFIG_SUBDIRS/d' \
+
+cat configure.in
+cat subpkg/configure.in
+
+dc=KO am_dc=KO; export dc am_dc
+
+cat > Makefile.am << 'END'
+AM_DISTCHECK_CONFIGURE_FLAGS = am_dc=ok
+DISTCHECK_CONFIGURE_FLAGS = dc=ok
+END
+
+: > subpkg/Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+cd subpkg
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+cd ..
+
+# For debugging.
+$FGREP 'DISTCHECK_CONFIGURE_FLAGS' Makefile.in subpkg/Makefile.in
+
+grep '^AM_DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
+grep '^DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
+$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && Exit 1
+
+./configure dc=ok am_dc=ok
+
+# Flags in $(DISTCHECK_CONFIGURE_FLAGS) and $(AM_DISTCHECK_CONFIGURE_FLAGS)
+# should be passed down to the subpackage configure when "make distcheck"
+# is run from the top-level package ...
+$MAKE distcheck
+
+# ... but not when "make distcheck" is run from the subpackage.
+cd subpkg
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep '^configure:.* dc=KO am_dc=KO' output
+
+:
diff --git a/tests/distcheck-configure-flags.test
b/tests/distcheck-configure-flags.test
new file mode 100755
index 0000000..117d83c
--- /dev/null
+++ b/tests/distcheck-configure-flags.test
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check support for DISTCHECK_CONFIGURE_FLAGS at "make distcheck" time.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
+AS_IF([test $success = yes && test "$sentence" = 'it works :-)'],
+ [:],
+ [AC_MSG_ERROR([success='$success', sentence='$sentence'])])
+AC_OUTPUT
+END
+
+unset sentence || :
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
+
+$AUTOCONF
+./configure --enable-success sentence='it works :-)'
+
+# It should be ok to define DISTCHECK_CONFIGURE_FLAGS either on the
+# make command line or in the environment.
+
+env DISTCHECK_CONFIGURE_FLAGS='--enable-success sentence=it\ works\ :-\)' \
+ $MAKE distcheck # Not `make -e' here, deliberately.
+
+$MAKE distcheck \
+ DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes sentence='it works :-)'"
+
+# Sanity check.
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep "^configure:.* success='no', sentence=''" output
+
+:
diff --git a/tests/autodist-acconfig.test b/tests/distcheck-hook.test
similarity index 64%
copy from tests/autodist-acconfig.test
copy to tests/distcheck-hook.test
index 49ab2f0..9a2c384 100755
--- a/tests/autodist-acconfig.test
+++ b/tests/distcheck-hook.test
@@ -14,33 +14,40 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that `acconfig.h' is automatically distributed if it exists
-# (at automake runtime).
-# Related to automake bug#7819.
+# Check basic support for distcheck-hook.
. ./defs || Exit 1
set -e
-cat >> configure.in <<END
+cat >> configure.in << 'END'
AC_OUTPUT
END
cat > Makefile.am <<'END'
-.PHONY: test
-test: distdir
+distcheck-hook:
ls -l $(distdir)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
- test -f $(distdir)/acconfig.h
+ chmod u+w $(distdir)
+ : > $(distdir)/dc-hook-has-run
+ chmod a-w $(distdir)
+check-local:
+ ls -l $(srcdir)
+ test -f $(srcdir)/dc-hook-has-run
END
-: > acconfig.h
-
$ACLOCAL
$AUTOMAKE
-$AUTOCONF
+$FGREP 'distcheck-hook' Makefile.in
+$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
+grep '^distcheck-hook:' Makefile.in
+$AUTOCONF
./configure
-$MAKE test
+
+$MAKE
+$MAKE check && Exit 1
+$MAKE distdir
+test -f $distdir/dc-hook-has-run && Exit 1
+$MAKE distcheck
:
diff --git a/tests/subpkg3.test b/tests/distcheck-hook2.test
similarity index 51%
copy from tests/subpkg3.test
copy to tests/distcheck-hook2.test
index d57ee37..befc1d6 100755
--- a/tests/subpkg3.test
+++ b/tests/distcheck-hook2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,44 +14,68 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# make sure different subpackages may share files and directories.
+# Check that no 'distcheck-hook' target is created automatically by
+# Automake, and that a used-defined 'distcheck-hook' is *not* honored
+# in a subpackage Makefile.am.
. ./defs || Exit 1
set -e
-cat >Makefile.am <<'END'
-SUBDIRS = subpkg
-EXTRA_DIST = subpkg/foobar
-END
-
-cat >>configure.in <<'END'
+cat >> configure.in << 'END'
AC_CONFIG_SUBDIRS([subpkg])
AC_OUTPUT
END
mkdir subpkg
-echo foobar >subpkg/foobar
-
-echo SUBDIRS = >subpkg/Makefile.am
-
-cat >subpkg/configure.in <<'END'
+cat > subpkg/configure.in << 'END'
AC_INIT([subpkg], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
+cat > Makefile.am <<'END'
+distcheck-hook:
+ ls -l $(distdir)
+ chmod u+w $(distdir)
+ : > $(distdir)/dc-hook-has-run
+ chmod a-w $(distdir)
+check-local:
+ ls -l $(srcdir)
+ test -f $(srcdir)/dc-hook-has-run
+END
+
+cat > subpkg/Makefile.am <<'END'
+check-local:
+ ls -l $(srcdir)
+ test ! -r $(srcdir)/dc-hook-has-run
+END
+
$ACLOCAL
$AUTOMAKE
$AUTOCONF
-
cd subpkg
$ACLOCAL
$AUTOMAKE
$AUTOCONF
cd ..
+# For debugging.
+$FGREP 'distcheck-hook' Makefile.in subpkg/Makefile.in
+
+$FGREP 'distcheck-hook' subpkg/Makefile.in && Exit 1
+$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
+grep '^distcheck-hook:' Makefile.in
+
./configure
+
+$MAKE
+$MAKE check && Exit 1
+cd subpkg
+$MAKE check
+cd ..
$MAKE distcheck
+
+:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-378-g66249f4,
Stefano Lattarini <=