X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Ffixinc%2Ffixincl.sh;h=422fc5cbe6f5330126e93e0e736da5f6ac4ae943;hp=9a44cb8cc6815a52f75d1166f3c781c464c4563f;hb=3354d06135697ca8167dd76698a62d6abd0b0ecc;hpb=70ba55fd9d590bfddb52ba0432de4c36f31401b2 diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc/fixincl.sh index 9a44cb8cc68..422fc5cbe6f 100755 --- a/gcc/fixinc/fixincl.sh +++ b/gcc/fixinc/fixincl.sh @@ -8,7 +8,7 @@ # # See README-fixinc for more information. # -# fixincludes copyright (c) 1998, 1999, 2000 +# fixincludes copyright (c) 1998, 1999, 2000, 2002 # The Free Software Foundation, Inc. # # fixincludes is free software. @@ -84,7 +84,7 @@ export target_canonical # # Define PWDCMD as a command to use to get the working dir # in the form that we want. -PWDCMD=pwd +PWDCMD=${PWDCMD-pwd} case "`$PWDCMD`" in //*) @@ -97,6 +97,13 @@ esac ORIGDIR=`${PWDCMD}` export ORIGDIR FIXINCL=${ORIGDIR}/fixinc/fixincl +if [ ! -x $FIXINCL ] ; then + FIXINCL=${ORIGDIR}/fixincl + if [ ! -x $FIXINCL ] ; then + echo "Cannot find working fixincl" >&2 + exit 1 + fi +fi export FIXINCL # Make LIB absolute only if needed to avoid problems with the amd. @@ -449,11 +456,11 @@ if $LINKS; then all_dirs=`find . -type l -print` for file in $all_dirs do - if ls -lLd $file > /dev/null - then : - else rm -f $file - test $VERBOSE -gt 3 && echo " removed $file" - rmdir `dirname $file` > /dev/null && \ + if test ! -d $file + then + rm -f $file + test $VERBOSE -gt 3 && echo " removed $file" + rmdir `dirname $file` > /dev/null && \ test $VERBOSE -gt 3 && \ echo " removed `dirname $file`" fi @@ -470,11 +477,3 @@ then echo fixincludes is done ; fi done # # # # # # # # # # # # # # # # # # # # # # - -if [ x${INSTALL_ASSERT_H} != x ] && [ -f ${srcdir}/assert.h ] -then - cd $ORIGDIR - rm -f include/assert.h - cp ${srcdir}/assert.h include/assert.h || exit 1 - chmod a+r include/assert.h -fi