OSDN Git Service

Don't "make LIB absolute" if already absolute,
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jan 1993 00:31:40 +0000 (00:31 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jan 1993 00:31:40 +0000 (00:31 +0000)
to avoid problems with the automounter.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3137 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fixinc.sco
gcc/fixinc.svr4

index c28039d..ad84989 100755 (executable)
@@ -58,8 +58,15 @@ fi
 
 ORIG_DIR=`pwd`
 
-# Make LIB absolute.
-cd $LIB; LIB=`pwd`
+# Make LIB absolute if it is relative.
+# Don't do this if not necessary, since may screw up automounters.
+case $LIB in
+/*)
+       ;;
+*)
+       cd $LIB; LIB=`${PWDCMD}`
+       ;;
+esac
 
 echo 'Building fixincludes in ' ${LIB}
 
index d597bc6..b2572cb 100755 (executable)
@@ -53,8 +53,15 @@ fi
 
 ORIG_DIR=`pwd`
 
-# Make LIB absolute.
-cd $LIB; LIB=`pwd`
+# Make LIB absolute if it is relative.
+# Don't do this if not necessary, since may screw up automounters.
+case $LIB in
+/*)
+       ;;
+*)
+       cd $LIB; LIB=`${PWDCMD}`
+       ;;
+esac
 
 # This prevents /bin/ex from failing if the current terminal type is
 # unrecognizable.