Replace uses of $SED $basename.

* libltdl/config/ltmain.m4sh (func_mode_link): Replace instances
of `$ECHO ... | $SED' with calls to func_basename.
* libtoolize.m4sh (func_copy, func_serial)
(func_massage_aclocal_DATA): Likewise, replace with
func_dirname_and_basename.
* tests/defs.m4sh (func_configure_nofail, func_make, func_exec):
Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
Ralf Wildenhues 2008-11-23 14:52:32 +01:00
parent f8c657da16
commit 1c6333b7bf
4 changed files with 29 additions and 9 deletions

View File

@ -1,5 +1,14 @@
2008-11-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Replace uses of $SED $basename.
* libltdl/config/ltmain.m4sh (func_mode_link): Replace instances
of `$ECHO ... | $SED' with calls to func_basename.
* libtoolize.m4sh (func_copy, func_serial)
(func_massage_aclocal_DATA): Likewise, replace with
func_dirname_and_basename.
* tests/defs.m4sh (func_configure_nofail, func_make, func_exec):
Likewise.
No need to prepend $progname with './'.
* libltdl/config/general.m4sh (func_dirname_and_basename): $ECHO
copes with leading hyphens now, so do not mangle $progname any

View File

@ -4764,7 +4764,8 @@ func_mode_link ()
# Collect preopened libtool deplibs, except any this library
# has declared as weak libs
for deplib in $dependency_libs; do
deplib_base=`$ECHO "$deplib" | $SED "$basename"`
func_basename "$deplib"
deplib_base=$func_basename_result
case " $weak_libs " in
*" $deplib_base "*) ;;
*) deplibs="$deplibs $deplib" ;;
@ -6846,7 +6847,8 @@ EOF
save_libobjs=$libobjs
fi
save_output=$output
output_la=`$ECHO "$output" | $SED "$basename"`
func_basename "$output"
output_la=$func_basename_result
# Clear the reloadable object creation command queue and
# initialize k to one.

View File

@ -269,7 +269,8 @@ func_copy ()
test -f "$1" || \
{ func_error "\`$1' not copied: not a regular file"; return 1; }
my_f1=`$ECHO "$1" | $SED "$basename"`
func_dirname_and_basename "$1"
my_f1=$func_basename_result
if test -d "$2"; then
@ -279,7 +280,9 @@ func_copy ()
else
# Supporting this would mean changing the timestamp:
test "X$my_f1" = X`$ECHO "$2" | $SED "$basename"` \
func_dirname_and_basename "$2"
my_tname=$func_basename_result
test "X$my_f1" = "X$my_tname" \
|| func_fatal_error "func_copy() cannot change filename on copy"
func_copy_cb "$my_f1" \
@ -705,10 +708,12 @@ func_serial ()
# Search FILENAME and all the files it m4_includes for a serial number
# in the file that AC_DEFUNs MACRO_REGEX.
my_serial=
func_dirname_and_basename "$my_filename"
my_filebase=$func_basename_result
for my_file in `func_included_files "$my_filename"`; do
if test -z "$my_macro_regex" ||
test "$my_filename" = aclocal.m4 ||
test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` ||
test "X$my_macro_regex" = "X$my_filebase" ||
func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_file"
then
my_serial=`$SED -e "$my_sed_serial" "$my_file"`
@ -1040,7 +1045,8 @@ func_massage_aclocal_DATA ()
# Massage a value for pkgmacro_files from the value used in Makefile.am.
for my_filename in @aclocal_DATA@; do
my_filename=`$ECHO "$my_filename" | $SED "$basename"`
func_dirname_and_basename "$my_filename"
my_filename=$func_basename_result
# ignore excluded filenames
if test -n "$my_glob_exclude"; then

View File

@ -187,7 +187,8 @@ func_configure_nofail ()
{
$opt_debug
my_args=${1+"$@"}
my_dir=`pwd | $SED "$basename"`
func_dirname_and_basename "`pwd`"
my_dir=$func_basename_result
my_testdir="$srcdir/tests/$my_dir"
conf_status=$EXIT_FAILURE
@ -245,7 +246,8 @@ func_make ()
{
$opt_debug
my_args=${1+"$@"}
my_dir=`pwd | $SED "$basename"`
func_dirname_and_basename "`pwd`"
my_dir=$func_basename_result
func_msg "Running \`$MAKE $my_args' in $my_dir"
@ -317,7 +319,8 @@ func_exec ()
$opt_debug
my_program="$1"
my_exp_output="$2"
my_dir=`pwd | $SED "$basename"`
func_dirname_and_basename "`pwd`"
my_dir=$func_basename_result
test -n "$my_exp_output" \
&& my_exp_output="| $EGREP -e "\""$my_exp_output"\"