summaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-06-07 07:32:54 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-06-07 07:32:54 +0000
commit4d3881dfa401daca98880dd2326065e9e71793d5 (patch)
treec3c7d70ddd73998b739fd78c96b1d4faf07bc4f5 /gcc/fixincludes
parente7399c765891fca0951102d3534e1c45c8688527 (diff)
downloadgcc-4d3881dfa401daca98880dd2326065e9e71793d5.tar.gz
* fixincludes: When running find, add "/." to directory name
to force expanding symlinks to directories. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12211 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index bdbd2dd6ab5..5ecdd7c0127 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -75,14 +75,11 @@ do
for d in $dirs
do
echo " Searching $INPUT/$d"
- if [ "$d" != . ]
- then
- d=$d/.
- fi
# Find all directories under $d, relative to $d, excluding $d itself.
- files="$files `find $d -type d -print | \
- sed -e '/\/\.$/d' -e '/^\.$/d'`"
+ # (The /. is needed after $d in case $d is a symlink.)
+ files="$files `find $d/. -type d -print | \
+ sed -e '/\/\.$/d' -e 's@/./@/@g'`"
# Find all links to directories.
# Using `-exec test -d' in find fails on some systems,
# and trying to run test via sh fails on others,
@@ -90,7 +87,7 @@ do
# First find all the links, then test each one.
theselinks=
$LINKS && \
- theselinks=`find $d -type l -print`
+ theselinks=`find $d/. -type l -print | sed -e 's@/./@/@g'`
for d1 in $theselinks --dummy--
do
# If the link points to a directory,
@@ -185,7 +182,7 @@ if $LINKS; then
# root area.
for file2 in $files; do
case $file2 in
- $file/./*)
+ $file/*)
dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"`
echo "Duplicating ${file}'s ${dupdir}"
if [ -d ${dupdir} ]