[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] improve code for sysroot --mode=finish
From: |
Paolo Bonzini |
Subject: |
[PATCH] improve code for sysroot --mode=finish |
Date: |
Sun, 15 Aug 2010 18:57:18 +0200 |
Here are the improvements you suggested. I'll send a patch for
sed_make_literal_regex soon.
Ok?
Paolo
* libltdl/config/ltmain.m4sh (func_mode_finish): Change sysroot_regex
and sysroot_cmd delimiter from pipe to slash. Wrap the entire for
loop with "if $opt_dry_run...fi" and print an explanatory message
for the --dry-run case.
---
libltdl/config/ltmain.m4sh | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index d29fd5d..4e922ac 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1419,24 +1419,27 @@ func_mode_finish ()
done
if test -n "$libs"; then
- tmpdir=`func_mktempdir`
if test -n "$lt_sysroot"; then
- sysroot_regex=`$ECHO "$lt_sysroot" | $SED 's/[].[^$\\*|]/\\\\&/g'`
- sysroot_cmd="s|\([ ']\)$sysroot_regex|\1|g;"
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED 's/[].[^$\\*/]/\\\\&/g'`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
else
sysroot_cmd=
fi
# Remove sysroot references
- for lib in $libs; do
- $opt_dry_run || {
+ if $opt_dry_run; then
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
> $tmpdir/tmp-la
mv -f $tmpdir/tmp-la $lib
- }
- file="$outputname"
- done
- $opt_dry_run || ${RM}r "$tmpdir"
+ done
+ ${RM}r "$tmpdir"
+ else
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ done
+ fi
fi
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
--
1.7.1
- [PATCH v2 2/4] fix sysroot handling for deplibs of preopened libtool libs, (continued)
Re: [PATCH v2 0/3] sysroot followup patches, Charles Wilson, 2010/08/16
- Re: [PATCH v2 0/3] sysroot followup patches, Ralf Wildenhues, 2010/08/16
- Re: [PATCH v2 0/3] sysroot followup patches, Charles Wilson, 2010/08/16
- Re: [PATCH v2 0/3] sysroot followup patches, Ralf Wildenhues, 2010/08/16
- Re: [PATCH v2 0/3] sysroot followup patches, Charles Wilson, 2010/08/16
- Re: [PATCH v2 0/3] sysroot followup patches, Ralf Wildenhues, 2010/08/16
- Re: [PATCH v2 0/3] sysroot followup patches, Charles Wilson, 2010/08/16
Re: [PATCH v2 0/3] sysroot followup patches, Charles Wilson, 2010/08/21
Re: [PATCH v2 0/3] sysroot followup patches, Paolo Bonzini, 2010/08/22