m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'make installcheck' vs. './configure --program-prefix'


From: Eric Blake
Subject: 'make installcheck' vs. './configure --program-prefix'
Date: Mon, 10 Mar 2008 07:17:05 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf noticed on the libtool list that --program-prefix can interfere with
'make installcheck'.  I discovered that m4 had the same problem, fixed as
follows for the branch (I still need to test whether head has the same
problem, although that might be considered an autotest issue).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfVNNEACgkQ84KuGfSFAYCXKQCdHNgRvWmJBe+RRRjsGeaA9GB+
IC8AoIke1i0kgXUFwa7/hMrNJwBNNWuV
=VH39
-----END PGP SIGNATURE-----
>From 7518b4139b8813505920ee5003c652351b0540ee Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 10 Mar 2008 07:14:05 -0600
Subject: [PATCH] Allow 'make installcheck' with './configure --program-prefix'.

* checks/Makefile.in (program_transform_name): New macro.
* checks/check-them (m4): Add -m option, to allow testing m4 by a
different name.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog          |    5 +++++
 checks/Makefile.in |    4 +++-
 checks/check-them  |   39 ++++++++++++++++++++++-----------------
 3 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 164d147..a94d3a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-03-10  Eric Blake  <address@hidden>
 
+       Allow 'make installcheck' with './configure --program-prefix'.
+       * checks/Makefile.in (program_transform_name): New macro.
+       * 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 d06da72..0e1091e 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 9fca39b..0a697f5 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
 
-- 
1.5.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]