libtool-patches
[Top][All Lists]
Advanced

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

[PATCH 1/6] Avoid that autom4te complains about unexpanded macros


From: Paolo Bonzini
Subject: [PATCH 1/6] Avoid that autom4te complains about unexpanded macros
Date: Fri, 7 Nov 2008 08:58:24 +0100

This patch series has the purpose of removing the "fallback echo"
code from Libtool, replacing it with usage of printf.  More detailed
information on the tradeoffs and the rationale are in the description
of patch 6/6.

In the meanwhile, the series cleans up some problematic usages of
M4sh, so the preliminary patches can be applied independently.

This is an example of such preparatory patches.  At some point during
my work, Autom4te started complaining about unexpanded m4sh macross in
libtoolize.  Instead of understanding why, :-) I decided it was easier
to use quadrigraphs.

* libtoolize.m4sh: Allow occurrences of "dnl" and use quadrigraphs
to protect other m4 macros.

---
 libtoolize.m4sh |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index b6d35f2..5e7487e 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -1,5 +1,7 @@
+m4_pattern_allow([dnl])
 m4_define([_m4_divert(SCRIPT)], 100)
-m4_divert_push([SCRIPT])#! /bin/sh
+m4_divert_push([SCRIPT])dnl
+#! /bin/sh
 # @configure_input@
 
 # libtoolize (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
@@ -478,8 +480,9 @@ func_scan_files ()
     # ---------------------------------------------------- #
 
     my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,
-        s,^.*AC_REQUIRE(.*$,,; s,^.*m4_require(.*$,,; s,^.*m4_define(.*$,,
-       s,^.*A[CU]_DEFUN(.*$,,; s,^.*m4_defun(.*$,,
+        s,^.*AC_REQUIRE(.*$,,; s,^.*m4@&address@hidden(.*$,,;
+       s,^.*m4@&address@hidden(.*$,,
+       s,^.*A[CU]_DEFUN(.*$,,; s,^.*m4@&address@hidden(.*$,,
        /AC_CONFIG_AUX_DIR(/ {
            s,^.*AC_CONFIG_AUX_DIR([[   ]*\([^])]*\).*$,ac_auxdir=\1,
            p
@@ -670,8 +673,8 @@ func_included_files ()
 
     my_include_regex=
     my_sed_include='
-        /^m4_include(\[.*\])$/ {
-           s,^m4_include(\[\(.*\)\])$,\1,
+        /^m4@&address@hidden(\[.*\])$/ {
+           s,^m4@&address@hidden(\[\(.*\)\])$,\1,
            p
        }
         d'
-- 
1.5.5





reply via email to

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