summaryrefslogtreecommitdiff
path: root/tests/obsolete.test
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2002-07-19 20:17:59 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2002-07-19 20:17:59 +0000
commiteafb319cc89e8ce4c96cdeccb5925d0aea7d2804 (patch)
tree84152e40291efdd4e6ff47114974fb58fc76ebff /tests/obsolete.test
parent260f478c15789b355ce63cb3f41fde3b06a3ff29 (diff)
downloadautomake-eafb319cc89e8ce4c96cdeccb5925d0aea7d2804.tar.gz
* m4/init.m4: Require Autoconf 2.53b.
* m4/header.m4 (AM_CONFIG_HEADER): Redefine using AU_DEFUN. * m4/ccstdc.m4 (fp_PROG_CC_STDC): New AU_DEFUN. * m4/dmalloc.m4 (fp_WITH_DMALLOC): Likewise. * m4/lispdir.m4 (ud_PATH_LISPDIR): Likewise. * m4/maintainer.m4 (jm_MAINTAINER_MODE): Likewise. * m4/protos.m4 (fp_C_PROTOTYPES): Likewise. * m4/regex.m4 (fp_WITH_REGEX): Likewise. * m4/termios.m4: Delete. AM_SYS_POSIX_TERMIOS is now AU_DEFUNed in m4/obsolete.m4. * m4/winsz.m4: Delete. AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL is now AU_DEFUNed in m4/obsolete.m4. * m4/obsol-gt.m4, m4/obsol-lt.m4, m4/obsolete.m4 : New files. * m4/Makefile.am (dist_m4data_DATA): Add obsol-gt.m4, obsol-lt.m4, and obsolete.m4. Remove termios.m4 and winsz.m4. * aclocal.in (obsolete, obsolete_rx): Remove. (scan_configure): Don't grep for obsolete macros. * tests/defs (AUTOUPDATE): Define. * Makefile.am (maintainer-check): Check for misuses of autoupdate. * tests/obsolete.test: Rewrite. Exercize the AU_DEFUN macros from m4/obsolete.m4.
Diffstat (limited to 'tests/obsolete.test')
-rwxr-xr-xtests/obsolete.test28
1 files changed, 22 insertions, 6 deletions
diff --git a/tests/obsolete.test b/tests/obsolete.test
index 59b38e34a..1036659af 100755
--- a/tests/obsolete.test
+++ b/tests/obsolete.test
@@ -1,16 +1,32 @@
#! /bin/sh
-# Test to make sure obsolete macros really are.
+# Test to make sure obsolete macros can be autoupdated.
. $srcdir/defs || exit 1
-cat >> configure.in << 'END'
-fp_PROG_INSTALL
+cat > configure.in << 'END'
+AC_INIT
END
-: > Makefile.am
+$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
+ $testsrcdir/../m4/obsolete.m4 >> obs
+cat obs >> configure.in
+$PERL -ne 'chomp; print "grep $_ stderr || exit 1\n"; ' obs > obs.1
+$PERL -ne 'chomp; print "grep $_ configure.in && exit 1\n"; ' obs > obs.2
-$ACLOCAL 2>stderr && exit 1
-grep AC_PROG_INSTALL stderr || exit 1
+# Sanity check. Make sure we have added something to configure.in.
+test `cat configure.in | wc -l` -gt 1 || exit 1
+
+$ACLOCAL || exit 1
+
+# Expect Autoconf to complain about each of the macros in obs.
+$AUTOCONF -Wobsolete >stderr 2>&1
+. obs.1
+# Make sure Autoupdate remove each of these macros.
+$AUTOUPDATE || exit 1
+. obs.2
+
+# Autoconf should be able to grok the updated configure.in.
+$AUTOCONF || exit 1
exit 0