diff options
author | Richard Stallman <rms@gnu.org> | 1992-11-26 17:27:01 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-11-26 17:27:01 +0000 |
commit | 4ed15f9ddc919597c1ae0071bc6d61ac34b4849e (patch) | |
tree | 09f717f1211cea7574ddadc6aa91c58d256390be | |
parent | d038420ea8bfbe2c4b7253d718ef00791cb5e78b (diff) | |
download | gcc-4ed15f9ddc919597c1ae0071bc6d61ac34b4849e.zip gcc-4ed15f9ddc919597c1ae0071bc6d61ac34b4849e.tar.gz gcc-4ed15f9ddc919597c1ae0071bc6d61ac34b4849e.tar.bz2 |
(PWDCMD): New variable, set specially for Apollos.
Use it to get the working dir.
From-SVN: r2808
-rwxr-xr-x | gcc/fixincludes | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index 433250e..7924ff1 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -26,6 +26,16 @@ export TERM EXINIT=set export EXINIT +# Define PWDCMD as a command to use to get the working dir +# in the form that we want. +PWDCMD=pwd +case "`pwd`" in +//*) + # On an Apollo, discard everything before `/usr'. + PWDCMD="(pwd) | sed -e 's,.*/usr/,/usr/,'" + ;; +esac + # Directory in which to store the results. LIB=${1?"fixincludes: output directory not specified"} @@ -35,7 +45,7 @@ if [ ! -d $LIB ]; then fi # Make LIB absolute. -cd $LIB; LIB=`pwd` +cd $LIB; LIB=`${PWDCMD}` # Fail if no arg to specify a directory for the output. if [ x$1 = x ] @@ -123,7 +133,7 @@ if $LINKS; then for file in $files; do dest=`ls -ld $file | sed -n 's/.*-> //p'` if [ "$dest" ]; then - cwd=`pwd` + cwd=`${PWDCMD}` # In case $dest is relative, get to $file's dir first. cd ${INPUT} cd `echo ./$file | sed -n 's&[^/]*$&&p'` @@ -133,7 +143,7 @@ if $LINKS; then if [ $? = 0 ]; then cd $dest # X gets the dir that the link actually leads to. - x=`pwd` + x=`${PWDCMD}` # If a link points to ., make a similar link to . if [ $x = $INPUT ]; then echo $file '->' . ': Making link' |