diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f3559350f3a..a19dd4d2854 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-01-21 Jim Wilson + + * fixinc/inclhack.tpl: Test for directory before trying to cd into it. + * fixinc/fixincl.sh, fixinc/inclhack.sh: Regenerate. + 2000-01-21 Zack Weinberg * cpphash.c (change_newlines): Delete function. diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc/fixincl.sh index 9a9bf9fa10e..acdf488550c 100755 --- a/gcc/fixinc/fixincl.sh +++ b/gcc/fixinc/fixincl.sh @@ -138,7 +138,14 @@ for INPUT in ${INPUTLIST} ; do cd ${ORIGDIR} -cd ${INPUT} || continue +# Make sure a directory exists before changing into it, +# otherwise Solaris2 will fail-exit the script. +# +if [ ! -d ${INPUT} ]; then + continue +fi +cd ${INPUT} + INPUT=`${PWDCMD}` # diff --git a/gcc/fixinc/inclhack.sh b/gcc/fixinc/inclhack.sh index 7de99b6660f..8761c8bf335 100755 --- a/gcc/fixinc/inclhack.sh +++ b/gcc/fixinc/inclhack.sh @@ -139,7 +139,14 @@ for INPUT in ${INPUTLIST} ; do cd ${ORIGDIR} -cd ${INPUT} || continue +# Make sure a directory exists before changing into it, +# otherwise Solaris2 will fail-exit the script. +# +if [ ! -d ${INPUT} ]; then + continue +fi +cd ${INPUT} + INPUT=`${PWDCMD}` # diff --git a/gcc/fixinc/inclhack.tpl b/gcc/fixinc/inclhack.tpl index 4300f216935..d264d5b0c47 100644 --- a/gcc/fixinc/inclhack.tpl +++ b/gcc/fixinc/inclhack.tpl @@ -135,7 +135,14 @@ for INPUT in ${INPUTLIST} ; do cd ${ORIGDIR} -cd ${INPUT} || continue +# Make sure a directory exists before changing into it, +# otherwise Solaris2 will fail-exit the script. +# +if [ ! -d ${INPUT} ]; then + continue +fi +cd ${INPUT} + INPUT=`${PWDCMD}` #