[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20-fyi-fix-tests.patch
From: |
Akim Demaille |
Subject: |
20-fyi-fix-tests.patch |
Date: |
Sun, 21 Oct 2001 14:01:17 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* tests/defs (ACLOCAL): Point to the installed aclocaldir is
libtool is required.
* tests/lex.test: Run AC_INIT once.
* tests/ldflags.test, tests/listval.test, tests/suffix2.test:
Libtool is required.
* tests/header.test: Built a correct configure.in.
* tests/defun2.test (configure.in): Be a bit respectful with
Autoconf, close the macro invocations.
* tests/confdeps.test: Even when not using aclocal, aclocal.m4
must be correct.
Index: tests/confdeps.test
--- tests/confdeps.test Tue, 10 Apr 2001 21:36:53 +0200 akim
+++ tests/confdeps.test Sun, 21 Oct 2001 10:58:40 +0200 akim
@@ -7,15 +7,17 @@
echo "FOO = foo" > Makefile.am
set -e
-echo "$me: Not generated by aclocal..."
-echo "Hello, universe!" > aclocal.m4
-$AUTOMAKE
-grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
-
-
echo "$me: Generated by aclocal..."
$ACLOCAL
$AUTOMAKE
grep '^\$(ACLOCAL_M4):' Makefile.in
+
+echo "$me: Not generated by aclocal..."
+# Pretend it is not from aclocal (remove the signature),
+# but keep it correct, i.e., with AM_INIT_AUTOMAKE etc.
+sed -n '3,$p' aclocal.m4 >aclocal.m4t
+mv aclocal.m4t aclocal.m4
+$AUTOMAKE
+grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
exit 0
Index: tests/defs
--- tests/defs Sat, 20 Oct 2001 12:17:32 +0200 akim
+++ tests/defs Sun, 21 Oct 2001 11:01:44 +0200 akim
@@ -1,4 +1,4 @@
-# -*- ksh -*-
+# -*- shell-script -*-
# Defines for Automake testing environment.
# Tom Tromey <address@hidden>
@@ -10,6 +10,21 @@
me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+# See how redirections should work. User can set VERBOSE to see all
+# output.
+test -z "$VERBOSE" && {
+ exec > /dev/null 2>&1
+}
+
+if test -n "$required"
+then
+ for tool in $required
+ do
+ echo "$me: running $tool --version"
+ ( $tool --version ) || exit 77
+ done
+fi
+
# Always use an absolute srcdir. Otherwise symlinks made in subdirs
# of the test dir just won't work.
case "$srcdir" in
@@ -34,20 +49,17 @@
# Build appropriate environment in test directory. Eg create
# configure.in, touch all necessary files, etc.
+# Don't use AC_OUTPUT, but AC_CONFIG_FILES so that appending
+# still produces a valid configure.ac. But then, tests running
+# config.status really need to append AC_OUTPUT.
cat > configure.in << END
AC_INIT
AM_INIT_AUTOMAKE($me, 1.0)
AC_PROG_INSTALL
AC_PROG_MAKE_SET
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES(Makefile)
END
-# See how redirections should work. User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
- exec > /dev/null 2>&1
-}
-
# User can set PERL to change the perl interpreter used.
test -z "$PERL" && PERL=perl
@@ -91,5 +103,17 @@
fi
# See how aclocal should be run.
-test -z "$ACLOCAL" \
- && ACLOCAL="$PERL ../../aclocal --acdir=$srcdir/../m4"
+if test -z "$ACLOCAL"; then
+ perllibdir=$srcdir/../lib
+ export perllibdir
+ ACLOCAL="$PERL ../../aclocal --acdir=$srcdir/../m4"
+fi
+
+# We might need extra macros, e.g., from Libtool or Gettext.
+# Find them on the system.
+aclocaldir=`(aclocal --print-ac-dir) 2>/dev/null`
+case $required in
+ *libtool*)
+ ACLOCAL="$ACLOCAL -I $aclocaldir"
+ ;;
+esac
Index: tests/defun2.test
--- tests/defun2.test Wed, 14 Mar 2001 23:12:52 +0100 akim
+++ tests/defun2.test Sun, 21 Oct 2001 10:58:40 +0200 akim
@@ -8,7 +8,7 @@
cat >> configure.in << 'END'
dnl if buggy this will require getloadavg.c
AC_PROG_CC
-AC_DEFUN([AC_FUNC_GETLOADAVG],
+AC_DEFUN([AC_FUNC_GETLOADAVG])
dnl need this to avoid LIBOBJS used but not defined.
AC_FUNC_MEMCMP
END
Index: tests/header.test
--- tests/header.test Sat, 20 Oct 2001 12:23:13 +0200 akim
+++ tests/header.test Sun, 21 Oct 2001 10:58:40 +0200 akim
@@ -5,13 +5,8 @@
. $srcdir/defs || exit 1
cat >> configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-PACKAGE=nonesuch
-VERSION=nonesuch
AC_SUBST(MY_HEADERS)
AC_PROG_CC
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
Index: tests/ldflags.test
--- tests/ldflags.test Sat, 20 Oct 2001 12:23:13 +0200 akim
+++ tests/ldflags.test Sun, 21 Oct 2001 10:58:40 +0200 akim
@@ -2,7 +2,7 @@
# Check for LDFLAGS in conditional.
# PR 77.
-
+required=libtool
. $srcdir/defs || exit 1
cat > configure.in << 'END'
Index: tests/lex.test
--- tests/lex.test Sun, 13 May 2001 10:42:05 +0200 akim
+++ tests/lex.test Sun, 21 Oct 2001 10:58:40 +0200 akim
@@ -3,7 +3,6 @@
. $srcdir/defs || exit 1
cat >> configure.in << 'END'
-AC_INIT
AC_PROG_CC
AM_PROG_LEX
END
Index: tests/listval.test
--- tests/listval.test Wed, 14 Mar 2001 23:12:52 +0100 akim
+++ tests/listval.test Sun, 21 Oct 2001 10:58:40 +0200 akim
@@ -2,7 +2,7 @@
# Test to make sure variable is expanded properly.
# From Adam J. Richter.
-
+required=libtool
. $srcdir/defs || exit 1
cat >> configure.in << 'END'
@@ -23,5 +23,5 @@
: > config.guess
: > config.sub
-$ACLOCAL || exit 1
+$ACLOCAL -I $aclocaldir || exit 1
$AUTOMAKE
Index: tests/suffix2.test
--- tests/suffix2.test Wed, 14 Mar 2001 23:12:52 +0100 akim
+++ tests/suffix2.test Sun, 21 Oct 2001 10:58:40 +0200 akim
@@ -1,6 +1,7 @@
#! /bin/sh
# Test to make sure .c.o rule is only included once.
+required=libtoolize
. $srcdir/defs || exit 1
@@ -27,7 +28,7 @@
set -e
-$ACLOCAL || exit 1
+$ACLOCAL -I $aclocaldir || exit 1
$AUTOMAKE -a
grep -c '^\.c\.o:' Makefile.in | grep '^1$'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 20-fyi-fix-tests.patch,
Akim Demaille <=