aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-11-19 20:19:29 +0000
committerRichard Stallman <rms@gnu.org>1993-11-19 20:19:29 +0000
commite5c1a9d28f9681d28ff08e0c1683a8c5a36458fa (patch)
tree58ed695508d972476ce5e3c8ace0999ec17ecff8 /gcc/fixincludes
parentc3c12186455a7ae2dbad414e97d6c0fb9c2fb494 (diff)
downloadgcc-e5c1a9d28f9681d28ff08e0c1683a8c5a36458fa.zip
gcc-e5c1a9d28f9681d28ff08e0c1683a8c5a36458fa.tar.gz
gcc-e5c1a9d28f9681d28ff08e0c1683a8c5a36458fa.tar.bz2
When compute DOTS, convert /./ to / to avoid
accidentally converting it to /../. From-SVN: r6113
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index c1b84cc..30f3388 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -169,7 +169,7 @@ if $LINKS; then
y=`echo $x | sed -n "s&${INPUT}/&&p"`
# DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
dots=`echo "$file" |
- sed -e 's@^./@@' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
+ sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
echo $file '->' $dots$y ': Making link'
rm -fr ${LIB}/$file > /dev/null 2>&1
ln -s $dots$y ${LIB}/$file > /dev/null 2>&1
@@ -212,7 +212,7 @@ if $LINKS; then
done
# DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
dots=`echo "$file" |
- sed -e 's@^./@@' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
+ sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
rm -fr ${LIB}/$file > /dev/null 2>&1
ln -s ${dots}root$x ${LIB}/$file > /dev/null 2>&1
treetops="$treetops $x ${LIB}/root$x"