summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-03-10 07:14:05 -0600
committerEric Blake <ebb9@byu.net>2008-03-10 07:16:46 -0600
commitc702fdb4cb9ed26f3d75dc46240bfecdb9d6c1bd (patch)
tree69cc43ac8ef94d4b356c6c539c6c06ffbf2e54d8
parentfa7ece650ed440b3c36bd25d971bfdc6e9fc7153 (diff)
downloadm4-c702fdb4cb9ed26f3d75dc46240bfecdb9d6c1bd.tar.gz
Allow 'make installcheck' with './configure --program-prefix'.
* checks/Makefile.in (program_transform_name): New macro. (installcheck): Use it to transform name of m4 before testing. * checks/check-them (m4): Add -m option, to allow testing m4 by a different name. Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r--ChangeLog6
-rw-r--r--checks/Makefile.in4
-rwxr-xr-xchecks/check-them39
3 files changed, 31 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 164d1475..08882561 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-03-10 Eric Blake <ebb9@byu.net>
+ Allow 'make installcheck' with './configure --program-prefix'.
+ * checks/Makefile.in (program_transform_name): New macro.
+ (installcheck): Use it to transform name of m4 before testing.
+ * checks/check-them (m4): Add -m option, to allow testing m4 by a
+ different name.
+
More maintainer fixes.
* GNUmakefile (_created_version_file): Delete, now that VPATH
builds include GNUmakefile.
diff --git a/checks/Makefile.in b/checks/Makefile.in
index d06da72e..0e1091e5 100644
--- a/checks/Makefile.in
+++ b/checks/Makefile.in
@@ -30,6 +30,7 @@ prefix = @prefix@
srcdir = @srcdir@
VPATH = @srcdir@
PATH_SEPARATOR = @PATH_SEPARATOR@
+program_transform_name = @program_transform_name@
# Should be GNU awk, for the get-them script.
AWK = @AWK@
@@ -59,7 +60,8 @@ check: $(srcdir)/stamp-checks
installcheck: $(srcdir)/stamp-checks
PATH='$(bindir)'"$(PATH_SEPARATOR)"$$PATH; export PATH; \
- $(srcdir)/check-them -I $(srcdir)/../examples $(CHECKS)
+ $(srcdir)/check-them -I $(srcdir)/../examples \
+ -m "`echo m4 | sed '$(program_transform_name)'`" $(CHECKS)
tags:
diff --git a/checks/check-them b/checks/check-them
index 9fca39b5..0a697f55 100755
--- a/checks/check-them
+++ b/checks/check-them
@@ -2,9 +2,6 @@
# Check GNU m4 against examples from the manual source.
# Copyright (C) 1992, 2006, 2007, 2008 Free Software Foundation, Inc.
-# Sanity check what we are testing
-m4 --version
-
# Clean up temp files on exit
pwd=`pwd`
tmp=m4-tmp.$$
@@ -29,13 +26,27 @@ skipped=
strip_needed=false
diffopts=-c
+# Find out where the examples live.
+examples=.
+if test "x$1" = x-I ; then
+ examples="$2"
+ shift; shift
+fi
+
+# Find out how to run m4.
+m4=m4
+if test "x$1" = x-m ; then
+ m4="$2"
+ shift; shift
+fi
+
# Find out how the executable prints argv[0]
-m4=`m4 --help | sed -e 's/Usage: \(.*\) \[OPTION.*/\1/' \
- -e 's/\\\\/\\\\\\\\/g' -e 1q`
+m4name=`"$m4" --help | sed -e 's/Usage: \(.*\) \[OPTION.*/\1/' \
+ -e 's/\\\\/\\\\\\\\/g' -e 1q`
# Find out if we should strip \r in the output
-m4 --version > $out
-m4 --version | tr -d '\015' > $xout
+"$m4" --version | tee $out
+"$m4" --version | tr -d '\015' > $xout
if cmp -s $out $xout; then
:
else
@@ -43,13 +54,6 @@ else
strip_needed=:
fi
-# Find out where the examples live.
-examples=.
-if test "x$1" = x-I ; then
- examples="$2"
- shift; shift
-fi
-
# Find out if diff supports useful options.
if diff -u /dev/null /dev/null 2>/dev/null ; then
diffopts="-u"
@@ -68,7 +72,7 @@ do
echo "Checking $file"
options=`sed -ne '3s/^dnl @ extra options: //p;3q' "$file"`
sed -e '/^dnl @/d' -e '/^\^D$/q' "$file" \
- | LC_MESSAGES=C M4PATH=$examples m4 -d $options - >$out 2>$err
+ | LC_MESSAGES=C M4PATH=$examples "$m4" -d $options - >$out 2>$err
stat=$?
xstat=`sed -ne '2s/^dnl @ expected status: //p;2q' "$file"`
@@ -96,10 +100,11 @@ do
xerrfile=`sed -n 's/^dnl @ expected error: //p' "$file"`
if test -z "$xerrfile" ; then
- sed '/^dnl @error{}/!d; s///; '"s|^m4:|$m4:|; s|\.\./examples|$examples|" \
+ sed '/^dnl @error{}/!d
+ s///; '"s|^m4:|$m4name:|; s|\.\./examples|$examples|" \
"$file" > $xerr
else
- sed "s|^m4:|$m4:|; s|\.\./examples|$examples|" \
+ sed "s|^m4:|$m4name:|; s|\.\./examples|$examples|" \
"$examples/$xerrfile" > $xerr
fi