[mm-common] Switch back from Autoconf tracing to sed



commit 3835911f50780f2a11120a5db6519ff482027064
Author: Daniel Elstner <danielk openismus com>
Date:   Mon Aug 10 16:58:19 2009 +0200

    Switch back from Autoconf tracing to sed
    
    * util/mm-common-prepare.in: Go back to the old method of using the
    sed stream editor to extract the macro arguments from configure.ac.
    Unfortunately, it turns out that Autoconf tracing fails to extract
    the arguments of custom macros when building from a clean tree.

 util/mm-common-prepare.in |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/util/mm-common-prepare.in b/util/mm-common-prepare.in
index 51882a9..1346873 100644
--- a/util/mm-common-prepare.in
+++ b/util/mm-common-prepare.in
@@ -76,16 +76,10 @@ test -f "$acfile" || {
   echo "$progname: error: $acfile not found" >&2
   exit 1
 }
-# Extract the macro arguments from configure.ac
-auxdir=
-doctooldir=
-trace=`${AUTOCONF:-autoconf} --trace='MM_CONFIG_DOCTOOL_DIR:doctooldir="$1"' \
-                             --trace='AC_CONFIG_AUX_DIR:auxdir="$1"' "$acfile"`
-case $trace in
-  auxdir=*|doctooldir=*)
-    eval "$trace"
-    ;;
-esac
+# Extract the directory macro arguments from configure.ac
+s='	 ' # tab+space
+auxdir=`sed -n "s/^[$s]*AC_CONFIG_AUX_DIR([[$s]*\\([^])\$,$s]*\\).*/\\1/p" "$acfile"`
+doctooldir=`sed -n "s/^[$s]*MM_CONFIG_DOCTOOL_DIR([[$s]*\\([^])\$,$s]*\\).*/\1/p" "$acfile"`
 
 auxdir="$srcdir${auxdir:+/}$auxdir"
 echo "$progname: putting auxiliary files in '$auxdir'."



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