[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: silence m4 --warn-syntax warning
From: |
Eric Blake |
Subject: |
Re: silence m4 --warn-syntax warning |
Date: |
Mon, 29 Jan 2007 07:07:04 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 1/29/2007 6:53 AM:
> Using /usr/local/bin/m4 as a wrapper around CVS branch-1_4 of M4 (ie. the
> eventual M4 1.4.9), I got this false positive:
>
> /home/eblake/m4/build/src/m4:ltdl/m4/libtool.m4:916: Warning: semantics of
> `${1...}' in defn of `_LT_PROG_ECHO_BACKSLASH' will change
> autom4te: /usr/local/bin/m4 failed with exit status: 1
>
> OK to apply this patch?
The first cut wasn't big enough. Note that this patch is not strictly
necessary if autoconf disables ${} parsing in M4 altogether; it only
silences false positives from masochistic users that try out the new m4
- --warn-syntax option in spite of the warning in M4's documentation that
the option is not compatible with autoconf 2.61.
How about this instead:
2007-01-29 Eric Blake <address@hidden>
* libltdl/m4/libtool.m4 (_LT_PROG_ECHO_BACKSLASH): Avoid issues
with m4-1.4.9 --warn-syntax.
(_LT_PROG_XSI_SHELLFNS): Likewise.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFvf+H84KuGfSFAYARAvIEAKCBNtwSFmHJXx5K75qQZd5h2rurGQCdEs9V
00cID4TKZM6ghFbZCcYxHq4=
=Ir29
-----END PGP SIGNATURE-----
? libltdl/config/libtoolize
Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.88
diff -u -p -r1.88 libtool.m4
--- libltdl/m4/libtool.m4 28 Jan 2007 13:03:47 -0000 1.88
+++ libltdl/m4/libtool.m4 29 Jan 2007 14:06:01 -0000
@@ -937,7 +937,7 @@ elif test "X`{ $ECHO '\t'; } 2>/dev/null
:
else
# Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ exec $SHELL "[$]0" --no-reexec [$]{1+"[$]@"}
fi
if test "X[$]1" = X--fallback-echo; then
@@ -1004,7 +1004,7 @@ if test -z "$lt_ECHO"; then
export ORIGINAL_CONFIG_SHELL
CONFIG_SHELL=/bin/ksh
export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ exec $CONFIG_SHELL "[$]0" --no-reexec [$]{1+"[$]@"}
else
# Try using printf.
ECHO='printf %s\n'
@@ -1042,7 +1042,7 @@ if test -z "$lt_ECHO"; then
if test "$prev" != 'sed 50q "[$]0"'; then
echo_test_string=`eval $prev`
export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0"
${1+"[$]@"}
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0"
[$]{1+"[$]@"}
else
# Oops. We lost completely, so just stick with echo.
ECHO=echo
@@ -2129,7 +2129,7 @@ darwin* | rhapsody*)
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -2310,7 +2310,7 @@ linux* | k*bsd*-gnu)
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
+ # Some binutils ld are patched to set DT_RUNPATH
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
eval libdir=/foo wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) \
@@ -7012,16 +7012,16 @@ m4_defun([_LT_PROG_XSI_SHELLFNS],
# otherwise set result to NONDIR_REPLACEMENT.
func_dirname ()
{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
+ case [$]{1} in
+ */*) func_dirname_result="[$]{1%/*}[$]{2}" ;;
+ * ) func_dirname_result="[$]{3}" ;;
esac
}
# func_basename file
func_basename ()
{
- func_basename_result="${1##*/}"
+ func_basename_result="[$]{1##*/}"
}
# func_stripname prefix suffix name
@@ -7033,9 +7033,9 @@ func_stripname ()
{
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
# positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
+ func_stripname_result=[$]{3}
+ func_stripname_result=${func_stripname_result#"[$]{1}"}
+ func_stripname_result=${func_stripname_result%"[$]{2}"}
}
_LT_EOF
;;
@@ -7047,18 +7047,18 @@ _LT_EOF
func_dirname ()
{
# Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
+ func_dirname_result=`$ECHO "X[$]{1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X[$]{1}"; then
+ func_dirname_result="[$]{3}"
else
- func_dirname_result="$func_dirname_result${2}"
+ func_dirname_result="$func_dirname_result[$]{2}"
fi
}
# func_basename file
func_basename ()
{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+ func_basename_result=`$ECHO "X[$]{1}" | $Xsed -e "$basename"`
}
# func_stripname prefix suffix name
@@ -7069,11 +7069,11 @@ func_basename ()
# func_strip_suffix prefix name
func_stripname ()
{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ case [$]{2} in
+ .*) func_stripname_result=`$ECHO "X[$]{3}" \
+ | $Xsed -e "s%^[$]{1}%%" -e "s%\\\\[$]{2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X[$]{3}" \
+ | $Xsed -e "s%^[$]{1}%%" -e "s%[$]{2}\$%%"`;;
esac
}
_LT_EOF