libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, master, updated. v2.2.10-43-gd8bdf93


From: Gary V. Vaughan
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.10-43-gd8bdf93
Date: Tue, 29 Jun 2010 22:12:48 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  d8bdf9339ba7de82f40c49705650506e0cc3f979 (commit)
      from  e4edceb028dde5ac764a7158b05bb74eda7d00a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d8bdf9339ba7de82f40c49705650506e0cc3f979
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Jun 30 05:12:42 2010 +0700

    Add func_append test cases for smart and retarded implementations.
    
    * tests/getopt-m4sh.at (_LT_AT_FALLBACK_FUNC_EXTRACT): New
    macro to extract a fallback function implementation from
    ltmain.m4sh.
    [option appending]: Use it for a test of the fallback
    implementation of func_append.
    [enhanced shell option appending]: And also test the enhanced
    implementation.
    * libltdl/config/ltmain.m4sh (func_append_quoted): Fix missing \
    to escape a quoted space for eval.
    * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Fix missing $ in
    dereference of func_append inline replacement for retarded
    shells.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                  |   16 ++++++++++++
 libltdl/config/ltmain.m4sh |    2 +-
 libltdl/m4/libtool.m4      |    2 +-
 tests/getopt-m4sh.at       |   57 ++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 73 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8e075ad..e9ca7a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2010-06-30  Gary V. Vaughan  <address@hidden>
+
+       Add func_append test cases for smart and retarded implementations.
+       * tests/getopt-m4sh.at (_LT_AT_FALLBACK_FUNC_EXTRACT): New
+       macro to extract a fallback function implementation from
+       ltmain.m4sh.
+       [option appending]: Use it for a test of the fallback
+       implementation of func_append.
+       [enhanced shell option appending]: And also test the enhanced
+       implementation.
+       * libltdl/config/ltmain.m4sh (func_append_quoted): Fix missing \\
+       to escape a quoted space for eval.
+       * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Fix missing $ in
+       dereference of func_append inline replacement for retarded
+       shells.
+
 2010-06-29  Gary V. Vaughan  <address@hidden>
 
        Correct func_split_short_opt comment cut-n-pasto.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 46a8aa3..fc2358e 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -161,7 +161,7 @@ func_append ()
 func_append_quoted ()
 {
     func_quote_for_eval "${2}"
-    eval "${1}=\$${1} \$func_quote_for_eval_result"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
 } # func_append_quoted may be replaced by XSI optimised implementation
 
 
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 7140627..f3ebc87 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -7333,7 +7333,7 @@ dnl m4 expansion turns \\\\ into \\, and then the shell 
eval turns that into \
   test 0 -eq $? || _lt_xsi_replace_fail=:
 else
   # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="\1%g' $cfgfile > 
$cfgfile.tmp \
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > 
$cfgfile.tmp \
     && mv -f "$cfgfile.tmp" "$cfgfile" \
       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f 
"$cfgfile.tmp")
   test 0 -eq $? || _lt_xsi_replace_fail=:
diff --git a/tests/getopt-m4sh.at b/tests/getopt-m4sh.at
index c55acfc..572522a 100644
--- a/tests/getopt-m4sh.at
+++ b/tests/getopt-m4sh.at
@@ -34,13 +34,17 @@ m4_define([_LT_AT_GETOPT_M4SH_SETUP],
 m4_pattern_allow([m4_include])
 AT_DATA([options.m4sh],
 [[AS_INIT[]m4_include([getopt.m4sh])
+nl='
+'
+list=
 options=
 M4SH_GETOPTS(
+  [a!],        [--append],     [],     [func_append list "$optarg$nl"],
   [f], [--force],      [],     [options="$options force"],
   [i], [--install],    [],     [options="$options install"],
   [v], [--verbose],    [],     [options="$options verbose"],
   [!], [--ltdl],       [false],[options="$options ltdl=$optarg"],
-[echo $options])
+[echo "$list"$options])
 ]])
 m4_pattern_forbid([m4_include])
 m4_pattern_forbid([AS_INIT])
@@ -53,13 +57,25 @@ $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh \
 ])# _LT_AT_GETOPT_M4SH_SETUP
 
 
+# _LT_AT_FALLBACK_FUNC_EXTRACT(FUNC-NAME)
+# ---------------------------------------
+# Extract the fallback function FUNC-NAME from ltmain.m4sh
+m4_define([_LT_AT_FALLBACK_FUNC_EXTRACT],
+[dnl {{
+$SED '/^# func_dirname /q' options > options.tmp
+echo '# func_append var value' >> options.tmp
+$SED -n '/^$1 ()/,/^} # $1 /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> 
options.tmp
+$SED '1,/^# func_dirname/d' options >> options.tmp
+rm -f options && mv options.tmp options])
+
+
 # _LT_AT_XSI_FUNC_EXTRACT(FUNC-NAME)
 # ----------------------------------
 # Extract the XSI decorated function FUNC-NAME from libtool
 m4_define([_LT_AT_XSI_FUNC_EXTRACT],
 [dnl {{
 $SED '/^# $1/q' options > options.tmp
-$SED -n '/^$1/,/^} # XSI $1 /p' $abs_top_builddir/libtool >> options.tmp
+$SED -n '/^$1 ()/,/^} # XSI $1 /p' $abs_top_builddir/libtool >> options.tmp
 $SED '1,/^} # $1 /d' options >> options.tmp
 rm -f options && mv options.tmp options])
 
@@ -130,3 +146,40 @@ _LT_AT_XSI_FUNC_EXTRACT(func_split_long_opt)
 AT_CHECK([$SHELL ./options --ltdl=long], 0, [expout])
 
 AT_CLEANUP
+
+
+## ----------------- ##
+## Option appending. ##
+## ----------------- ##
+
+AT_SETUP([option appending])
+
+AT_DATA(expout,
+[[first   --append second
+third
+
+]])
+
+_LT_AT_GETOPT_M4SH_SETUP
+_LT_AT_FALLBACK_FUNC_EXTRACT(func_append)
+
+AT_CHECK([$SHELL ./options -a "first   --append second" -athird], 0, [expout])
+
+AT_CLEANUP
+
+
+AT_SETUP([enhanced shell option appending])
+
+AT_DATA(expout,
+[[first   --append second
+third
+
+]])
+
+_LT_AT_GETOPT_M4SH_SETUP
+_LT_AT_FALLBACK_FUNC_EXTRACT(func_append)
+_LT_AT_XSI_FUNC_EXTRACT(func_append)
+
+AT_CHECK([$SHELL ./options -a "first   --append second" -athird], 0, [expout])
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



reply via email to

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