summaryrefslogtreecommitdiff
path: root/gcc/fixinc.svr4
diff options
context:
space:
mode:
authoreggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>1993-07-01 19:06:50 +0000
committereggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>1993-07-01 19:06:50 +0000
commita8901f52228b1acc2747fe612b52f0290f51d713 (patch)
tree1093b6fdaf243dc672d41152855731790e17c701 /gcc/fixinc.svr4
parent57d0044e9e31231f809a1dfa92830a4fb01cf08f (diff)
downloadgcc-a8901f52228b1acc2747fe612b52f0290f51d713.tar.gz
Don't create absolute symbolic links;
make them relative instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4815 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc.svr4')
-rwxr-xr-xgcc/fixinc.svr47
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4
index 185d97412bd..a17247ce8ee 100755
--- a/gcc/fixinc.svr4
+++ b/gcc/fixinc.svr4
@@ -113,9 +113,12 @@ if $LINKS; then
if expr $x : "${INPUT}/.*" > /dev/null; then
# Y gets the actual target dir name, relative to ${INPUT}.
y=`echo $x | sed -n "s&${INPUT}/&&p"`
- echo $file '->' $y ': Making link'
+ # DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
+ dots=`echo "$file" |
+ sed -e 's@^./@@' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
+ echo $file '->' $dots$y ': Making link'
rm -fr ${LIB}/$file > /dev/null 2>&1
- ln -s ${LIB}/$y ${LIB}/$file > /dev/null 2>&1
+ ln -s $dots$y ${LIB}/$file > /dev/null 2>&1
else
# If the link is to outside ${INPUT},
# treat this directory as if it actually contained the files.