Commit 48bd9529 by Bruce Korb

regenerated

From-SVN: r26088
parent 8f34d1e9
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
# #
# DO NOT EDIT THIS FILE (fixincl.sh) # DO NOT EDIT THIS FILE (fixincl.sh)
# #
# It has been autogen-ed Wednesday March 31, 1999 at 01:12:08 AM MST # It has been autogen-ed Wednesday March 31, 1999 at 12:03:13 PM PST
# From the definitions /puke/law//egcs/egcs/gcc/fixinc/inclhack.def # From the definitions inclhack.def
# and the template file /puke/law//egcs/egcs/gcc/fixinc/inclhack.tpl # and the template file inclhack.tpl
# #
# Install modified versions of certain ANSI-incompatible system header # Install modified versions of certain ANSI-incompatible system header
# files which are fixed to work correctly with ANSI C and placed in a # files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search. # directory that GNU C will search.
# #
# This script contains 105 fixup scripts. # This script contains 103 fixup scripts.
# #
# See README-fixinc for more information. # See README-fixinc for more information.
# #
...@@ -128,6 +128,7 @@ for INPUT in ${INPUTLIST} ; do ...@@ -128,6 +128,7 @@ for INPUT in ${INPUTLIST} ; do
cd ${ORIGDIR} cd ${ORIGDIR}
cd ${INPUT} || continue cd ${INPUT} || continue
INPUT=`${PWDCMD}`
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
...@@ -135,13 +136,16 @@ cd ${INPUT} || continue ...@@ -135,13 +136,16 @@ cd ${INPUT} || continue
echo Finding directories and links to directories echo Finding directories and links to directories
# Find all directories and all symlinks that point to directories. # Find all directories and all symlinks that point to directories.
# Put the list in $files. # Put the list in $all_dirs.
# Each time we find a symlink, add it to newdirs # Each time we find a symlink, add it to newdirs
# so that we do another find within the dir the link points to. # so that we do another find within the dir the link points to.
# Note that $files may have duplicates in it; # Note that $all_dirs may have duplicates in it;
# later parts of this file are supposed to ignore them. # later parts of this file are supposed to ignore them.
dirs="." dirs="."
levels=2 levels=2
all_dirs=""
search_dirs=""
while [ -n "$dirs" ] && [ $levels -gt 0 ] while [ -n "$dirs" ] && [ $levels -gt 0 ]
do do
levels=`expr $levels - 1` levels=`expr $levels - 1`
...@@ -152,7 +156,7 @@ do ...@@ -152,7 +156,7 @@ do
# Find all directories under $d, relative to $d, excluding $d itself. # Find all directories under $d, relative to $d, excluding $d itself.
# (The /. is needed after $d in case $d is a symlink.) # (The /. is needed after $d in case $d is a symlink.)
files="$files `find $d/. -type d -print | \ all_dirs="$all_dirs `find $d/. -type d -print | \
sed -e '/\/\.$/d' -e 's@/./@/@g'`" sed -e '/\/\.$/d' -e 's@/./@/@g'`"
# Find all links to directories. # Find all links to directories.
# Using `-exec test -d' in find fails on some systems, # Using `-exec test -d' in find fails on some systems,
...@@ -168,10 +172,11 @@ do ...@@ -168,10 +172,11 @@ do
# add that dir to $newdirs # add that dir to $newdirs
if [ -d $d1 ] if [ -d $d1 ]
then then
files="$files $d1" all_dirs="$all_dirs $d1"
if [ "`ls -ld $d1 | sed -n 's/.*-> //p'`" != "." ] if [ "`ls -ld $d1 | sed -n 's/.*-> //p'`" != "." ]
then then
newdirs="$newdirs $d1" newdirs="$newdirs $d1"
search_dirs="$search_dirs $d1"
fi fi
fi fi
done done
...@@ -184,9 +189,9 @@ done ...@@ -184,9 +189,9 @@ done
# #
dirs= dirs=
echo "All directories (including links to directories):" echo "All directories (including links to directories):"
echo $files echo $all_dirs
for file in $files; do for file in $all_dirs; do
rm -rf $LIB/$file rm -rf $LIB/$file
if [ ! -d $LIB/$file ] if [ ! -d $LIB/$file ]
then mkdir $LIB/$file then mkdir $LIB/$file
...@@ -199,53 +204,67 @@ mkdir $LIB/root ...@@ -199,53 +204,67 @@ mkdir $LIB/root
# treetops gets an alternating list # treetops gets an alternating list
# of old directories to copy # of old directories to copy
# and the new directories to copy to. # and the new directories to copy to.
treetops="${INPUT} ${LIB}" treetops=". ${LIB}"
if $LINKS; then if $LINKS; then
echo 'Making symbolic directory links' echo 'Making symbolic directory links'
for file in $files; do
dest=`ls -ld $file | sed -n 's/.*-> //p'`
if [ "$dest" ]; then
cwd=`${PWDCMD}` cwd=`${PWDCMD}`
# In case $dest is relative, get to $file's dir first.
for sym_link in $search_dirs; do
cd ${INPUT} cd ${INPUT}
cd `echo ./$file | sed -n 's&[^/]*$&&p'` dest=`ls -ld ${sym_link} | sed -n 's/.*-> //p'`
# In case $dest is relative, get to ${sym_link}'s dir first.
#
cd ./`echo ${sym_link} | sed 's;/[^/]*$;;'`
# Check that the target directory exists. # Check that the target directory exists.
# Redirections changed to avoid bug in sh on Ultrix. # Redirections changed to avoid bug in sh on Ultrix.
#
(cd $dest) > /dev/null 2>&1 (cd $dest) > /dev/null 2>&1
if [ $? = 0 ]; then if [ $? = 0 ]; then
cd $dest cd $dest
# X gets the dir that the link actually leads to.
x=`${PWDCMD}` # full_dest_dir gets the dir that the link actually leads to.
#
full_dest_dir=`${PWDCMD}`
# Canonicalize ${INPUT} now to minimize the time an # Canonicalize ${INPUT} now to minimize the time an
# automounter has to change the result of ${PWDCMD}. # automounter has to change the result of ${PWDCMD}.
#
cinput=`cd ${INPUT}; ${PWDCMD}` cinput=`cd ${INPUT}; ${PWDCMD}`
# If a link points to ., make a similar link to . # If a link points to ., make a similar link to .
if [ $x = ${cinput} ]; then #
echo $file '->' . ': Making link' if [ ${full_dest_dir} = ${cinput} ]; then
rm -fr ${LIB}/$file > /dev/null 2>&1 echo ${sym_link} '->' . ': Making self link'
ln -s . ${LIB}/$file > /dev/null 2>&1 rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
ln -s . ${LIB}/${sym_link} > /dev/null 2>&1
# If link leads back into ${INPUT}, # If link leads back into ${INPUT},
# make a similar link here. # make a similar link here.
elif expr $x : "${cinput}/.*" > /dev/null; then #
elif expr ${full_dest_dir} : "${cinput}/.*" > /dev/null; then
# Y gets the actual target dir name, relative to ${INPUT}. # Y gets the actual target dir name, relative to ${INPUT}.
y=`echo $x | sed -n "s&${cinput}/&&p"` y=`echo ${full_dest_dir} | sed -n "s&${cinput}/&&p"`
# DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}. # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}.
dots=`echo "$file" | dots=`echo "${sym_link}" |
sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'` sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
echo $file '->' $dots$y ': Making link' echo ${sym_link} '->' $dots$y ': Making local link'
rm -fr ${LIB}/$file > /dev/null 2>&1 rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
ln -s $dots$y ${LIB}/$file > /dev/null 2>&1 ln -s $dots$y ${LIB}/${sym_link} > /dev/null 2>&1
else else
# If the link is to a dir $target outside ${INPUT}, # If the link is to a dir $target outside ${INPUT},
# repoint the link at ${INPUT}/root$target # repoint the link at ${INPUT}/root$target
# and process $target into ${INPUT}/root$target # and process $target into ${INPUT}/root$target
# treat this directory as if it actually contained the files. # treat this directory as if it actually contained the files.
echo $file '->' root$x ': Making link' #
if [ -d $LIB/root$x ] echo ${sym_link} '->' root${full_dest_dir} ': Making rooted link'
if [ -d $LIB/root${full_dest_dir} ]
then true then true
else else
dirname=root$x/ dirname=root${full_dest_dir}/
dirmade=. dirmade=.
cd $LIB cd $LIB
while [ x$dirname != x ]; do while [ x$dirname != x ]; do
...@@ -256,13 +275,16 @@ if $LINKS; then ...@@ -256,13 +275,16 @@ if $LINKS; then
dirname=`echo $dirname | sed -e 's|[^/]*/||'` dirname=`echo $dirname | sed -e 's|[^/]*/||'`
done done
fi fi
# Duplicate directory structure created in ${LIB}/$file in new
# Duplicate directory structure created in ${LIB}/${sym_link} in new
# root area. # root area.
for file2 in $files; do #
for file2 in $all_dirs; do
case $file2 in case $file2 in
$file/*) ${sym_link}/*)
dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"` dupdir=${LIB}/root${full_dest_dir}/`echo $file2 |
echo "Duplicating ${file}'s ${dupdir}" sed -n "s|^${sym_link}/||p"`
echo "Duplicating ${sym_link}'s ${dupdir}"
if [ -d ${dupdir} ] if [ -d ${dupdir} ]
then true then true
else else
...@@ -273,18 +295,20 @@ if $LINKS; then ...@@ -273,18 +295,20 @@ if $LINKS; then
;; ;;
esac esac
done done
# Get the path from ${LIB} to $file, accounting for symlinks.
parent=`echo "$file" | sed -e 's@/[^/]*$@@'` # Get the path from ${LIB} to ${sym_link}, accounting for symlinks.
#
parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'`
libabs=`cd ${LIB}; ${PWDCMD}` libabs=`cd ${LIB}; ${PWDCMD}`
file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"`
# DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
# DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}.
#
dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'` dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'`
rm -fr ${LIB}/$file > /dev/null 2>&1 rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
ln -s ${dots}root$x ${LIB}/$file > /dev/null 2>&1 ln -s ${dots}root${full_dest_dir} ${LIB}/${sym_link} > /dev/null 2>&1
treetops="$treetops $x ${LIB}/root$x" treetops="$treetops ${sym_link} ${LIB}/root${full_dest_dir}"
fi
fi fi
cd $cwd
fi fi
done done
fi fi
...@@ -299,6 +323,9 @@ while [ $# != 0 ]; do ...@@ -299,6 +323,9 @@ while [ $# != 0 ]; do
# #
SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}` SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}`
export SRCDIR export SRCDIR
FIND_BASE=$1
export FIND_BASE
shift shift
DESTDIR=`cd $1;${PWDCMD}` DESTDIR=`cd $1;${PWDCMD}`
...@@ -314,16 +341,16 @@ while [ $# != 0 ]; do ...@@ -314,16 +341,16 @@ while [ $# != 0 ]; do
touch ${DESTDIR}/DONE touch ${DESTDIR}/DONE
echo Fixing directory ${SRCDIR} into ${DESTDIR} echo Fixing directory ${SRCDIR} into ${DESTDIR}
# Check .h files which are symlinks as well as those which are files. # Check files which are symlinks as well as those which are files.
# A link to a header file will not be processed by anything but this.
# #
cd ${SRCDIR} cd ${INPUT}
required="$required `if $LINKS; then required="$required `if $LINKS; then
find . -name '*.h' \( -type f -o -type l \) -print find ${FIND_BASE}/. \( -type f -o -type l \) -print
else else
find . -name '*.h' -type f -print find ${FIND_BASE}/. -type f -print
fi | ${FIXINCL}`" fi | \
sed -e's;/\./;/;g' -e's;//*;/;g' | \
${FIXINCL}`"
done done
## Make sure that any include files referenced using double quotes ## Make sure that any include files referenced using double quotes
...@@ -368,8 +395,8 @@ find . -name DONE -exec rm -f '{}' ';' ...@@ -368,8 +395,8 @@ find . -name DONE -exec rm -f '{}' ';'
echo 'Removing unneeded directories:' echo 'Removing unneeded directories:'
cd $LIB cd $LIB
files=`find . -type d -print | sort -r` all_dirs=`find . -type d -print | sort -r`
for file in $files; do for file in $all_dirs; do
rmdir $LIB/$file > /dev/null 2>&1 | : rmdir $LIB/$file > /dev/null 2>&1 | :
done done
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment