[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {maint} coverage: test CONFIG_STATUS_DEPENDENCIES
From: |
Stefano Lattarini |
Subject: |
[FYI] {maint} coverage: test CONFIG_STATUS_DEPENDENCIES |
Date: |
Tue, 1 Jan 2013 00:36:08 +0100 |
* t/remake-config-status-dependencies.sh: New test.
* t/list-of-tests.mk: Add it.
* doc/automake.texi: Reference it in comments.
Signed-off-by: Stefano Lattarini <address@hidden>
---
doc/automake.texi | 1 +
t/list-of-tests.mk | 1 +
t/remake-config-status-dependencies.sh | 70 ++++++++++++++++++++++++++++++++++
3 files changed, 72 insertions(+)
create mode 100755 t/remake-config-status-dependencies.sh
diff --git a/doc/automake.texi b/doc/automake.texi
index b23805a..ee2df4d 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -9892,6 +9892,7 @@ from @file{configure.ac}. For instance, the following
statement will
cause @file{configure} to be rerun each time @file{version.sh} is
changed.
address@hidden Keep in sync with remake-config-status-dependencies.sh
@example
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
@end example
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index a73e551..d612573 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -919,6 +919,7 @@ t/remake-after-aclocal-m4.sh \
t/remake-include-configure.sh \
t/remake-include-makefile.sh \
t/remake-include-aclocal.sh \
+t/remake-config-status-dependencies.sh \
t/remake-deeply-nested.sh \
t/remake-mild-stress.sh \
t/remake-all-1.sh \
diff --git a/t/remake-config-status-dependencies.sh
b/t/remake-config-status-dependencies.sh
new file mode 100755
index 0000000..c625661
--- /dev/null
+++ b/t/remake-config-status-dependencies.sh
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2013 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/>.
+
+# Test CONFIG_STATUS_DEPENDENCIES.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+. ${srcdir}/version.sh
+AC_SUBST([EXTRA_VERSION])
+AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
+AC_OUTPUT
+END
+
+echo EXTRA_VERSION=1.0 > version.sh
+
+cat > Makefile.am <<'END'
+.PHONY: test-1 test-2 test-3
+check-local: test-3
+test-1:
+ test $(EXTRA_VERSION) = 1.0
+test-2:
+ test $(EXTRA_VERSION) = 2.1
+test-3:
+ test $(EXTRA_VERSION) = 3.14
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test-1
+
+$sleep
+echo EXTRA_VERSION=2.1 > version.sh
+using_gmake || $MAKE Makefile
+$MAKE test-2
+
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE test-2
+$sleep
+echo EXTRA_VERSION=3.14 > ../version.sh
+using_gmake || $MAKE Makefile
+$MAKE test-3
+
+# Contents of $(CONFIG_STATUS_DEPENDENCIES) are *not* to be
+# automatically distributed; there is no generic good reason
+# for that.
+$MAKE distdir
+test ! -e $distdir/version.sh
+test -f $distdir/configure || exit 99 # Sanity check.
+
+:
--
1.8.1.rc3.27.g3b73c7d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {maint} coverage: test CONFIG_STATUS_DEPENDENCIES,
Stefano Lattarini <=