summaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1994-08-19 16:01:48 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1994-08-19 16:01:48 +0000
commit819ec6a90d62088672b0d0a2449a3d41394531ab (patch)
tree69b42990f9ccf9740687c6424087f927fa91f56c /gcc/fixincludes
parenteb2053750f14b85b448069cc4cc2a6521839f0b8 (diff)
downloadgcc-819ec6a90d62088672b0d0a2449a3d41394531ab.tar.gz
Canonicalize ${INPUT} to avoid automounter problems.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index daf5daa203d..2e33da5181d 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -142,16 +142,19 @@ if $LINKS; then
cd $dest
# X gets the dir that the link actually leads to.
x=`${PWDCMD}`
+ # Canonicalize ${INPUT} now to minimize the time an
+ # automounter has to change the result of ${PWDCMD}.
+ cinput=`cd ${INPUT}; ${PWDCMD}`
# If a link points to ., make a similar link to .
- if [ $x = $INPUT ]; then
+ if [ $x = ${cinput} ]; then
echo $file '->' . ': Making link'
rm -fr ${LIB}/$file > /dev/null 2>&1
ln -s . ${LIB}/$file > /dev/null 2>&1
# If link leads back into ${INPUT},
# make a similar link here.
- elif expr $x : "${INPUT}/.*" > /dev/null; then
+ elif expr $x : "${cinput}/.*" > /dev/null; then
# Y gets the actual target dir name, relative to ${INPUT}.
- y=`echo $x | sed -n "s&${INPUT}/&&p"`
+ y=`echo $x | sed -n "s&${cinput}/&&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@[^/][^/]*@..@g' -e 's@..$@@'`