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
# 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" ;;
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.
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
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" \
# 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"`
# 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
{
$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
{
$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"
$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"\"