From 721369954128fc910b5478f1f1ef70a07df6e9dd Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sat, 21 Jan 2006 16:46:08 +0000 Subject: [PATCH] * libtool.m4 (_LT_AC_SYS_LIBPATH_AIX): Don't use semicolons inside { } in sed scripts, as Posix says it's not portable. * ltmain.in (func_win32_libid): Likewise. * mailnotify, commit: Likewise. Noted by Paul Eggert . --- ChangeLog | 6 ++++++ commit | 21 ++++++++++++--------- libtool.m4 | 15 +++++++++++---- ltmain.in | 8 +++++++- mailnotify | 26 ++++++++++++++++---------- 5 files changed, 52 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26dbde2f8..26702d8d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-01-21 Ralf Wildenhues + * libtool.m4 (_LT_AC_SYS_LIBPATH_AIX): Don't use semicolons + inside { } in sed scripts, as Posix says it's not portable. + * ltmain.in (func_win32_libid): Likewise. + * mailnotify, commit: Likewise. + Noted by Paul Eggert . + * ltmain.in (compile mode): Also transform `.obj' correctly. Reported by George Bosilca . diff --git a/commit b/commit index a4670d0fa..39839f833 100755 --- a/commit +++ b/commit @@ -166,9 +166,10 @@ func_missing_arg () func_usage () { $SED '/^# Usage:/,/# -h/ { - s/^# //; s/^# *$//; - s/\$progname/'$progname'/; - p; + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p }; d' < "$progpath" echo echo "run \`$progname --help | more' for full usage" @@ -180,9 +181,10 @@ func_usage () func_help () { $SED '/^# Usage:/,/# Report bugs to/ { - s/^# //; s/^# *$//; - s/\$progname/'$progname'/; - p; + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p }; d' < "$progpath" exit $EXIT_SUCCESS } @@ -192,9 +194,10 @@ func_help () func_version () { $SED '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# //; s/^# *$//; - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/; - p; + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p }; d' < "$progpath" exit $EXIT_SUCCESS } diff --git a/libtool.m4 b/libtool.m4 index e9ada3a1e..5d80b6b58 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -288,11 +288,18 @@ $rm conftest* # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX diff --git a/ltmain.in b/ltmain.in index 0eec38de4..bb96ac7e6 100644 --- a/ltmain.in +++ b/ltmain.in @@ -196,7 +196,13 @@ func_win32_libid () if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; diff --git a/mailnotify b/mailnotify index 3716942d5..d193f580e 100755 --- a/mailnotify +++ b/mailnotify @@ -137,9 +137,10 @@ func_missing_arg () func_usage () { $SED '/^# Usage:/,/# -h/ { - s/^# //; s/^# *$//; - s/\$progname/'$progname'/; - p; + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p }; d' < "$progpath" echo echo "run \`$progname --help | more' for full usage" @@ -151,9 +152,10 @@ func_usage () func_help () { $SED '/^# Usage:/,/# Report bugs to/ { - s/^# //; s/^# *$//; - s/\$progname/'$progname'/; - p; + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p }; d' < "$progpath" exit $EXIT_SUCCESS } @@ -163,9 +165,10 @@ func_help () func_version () { $SED '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# //; s/^# *$//; - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/; - p; + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p }; d' < "$progpath" exit $EXIT_SUCCESS } @@ -292,7 +295,10 @@ func_headers () { my_outfile="$1" my_destination="$2" - my_sed_version_no='/^# '$PROGRAM' (GNU / { s/^# .*version //; p; }; d' + my_sed_version_no='/^# '$PROGRAM' (GNU / { + s/^# .*version // + p + }; d' { echo "User-Agent: $PROGRAM/`$SED \"$my_sed_version_no\" < $progpath`" -- 2.47.3