If a file is referenced with double quotes from
a fixed file, make sure it is copied into the fixed include directory. Remove DPS/XDPSlib.h special-case code. From-SVN: r5753
This commit is contained in:
parent
64791b18b8
commit
40f1c86cca
|
@ -223,6 +223,7 @@ if $LINKS; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
required=
|
||||||
set x $treetops
|
set x $treetops
|
||||||
shift
|
shift
|
||||||
while [ $# != 0 ]; do
|
while [ $# != 0 ]; do
|
||||||
|
@ -324,6 +325,11 @@ while [ $# != 0 ]; do
|
||||||
rm $2/$file
|
rm $2/$file
|
||||||
else
|
else
|
||||||
echo Fixed $file
|
echo Fixed $file
|
||||||
|
# Find any include directives that use "file".
|
||||||
|
for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' $2/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do
|
||||||
|
dir=`echo $file | sed -e s'|/[^/]*$||'`
|
||||||
|
required="$required $1 $dir/$include $2/$dir/$include"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -331,6 +337,24 @@ while [ $# != 0 ]; do
|
||||||
shift; shift
|
shift; shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Make sure that any include files referenced using double quotes
|
||||||
|
# exist in the fixed directory.
|
||||||
|
set x $required
|
||||||
|
shift
|
||||||
|
while [ $# != 0 ]; do
|
||||||
|
# $1 is the directory to copy from, $2 is the unfixed file,
|
||||||
|
# $3 is the fixed file name.
|
||||||
|
cd ${INPUT}
|
||||||
|
cd $1
|
||||||
|
if [ -r $2 ] && [ ! -r $3 ]; then
|
||||||
|
cp $2 $3 >/dev/null 2>&1 || echo "Can't copy $2"
|
||||||
|
chmod +w $3 2>/dev/null
|
||||||
|
chmod a+r $3 2>/dev/null
|
||||||
|
echo Copied $2
|
||||||
|
fi
|
||||||
|
shift; shift; shift
|
||||||
|
done
|
||||||
|
|
||||||
cd ${INPUT}
|
cd ${INPUT}
|
||||||
|
|
||||||
# Install the proper definition of size_t in header files that it comes from.
|
# Install the proper definition of size_t in header files that it comes from.
|
||||||
|
@ -476,20 +500,6 @@ if [ -r ${LIB}/$file ] ; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fix AIX use of "XDPS.h" to refer to <DPS/XDPS.h>
|
|
||||||
file=DPS/XDPSlib.h
|
|
||||||
if [ -r $file ] && [ ! -r ${LIB}/$file ] ; then
|
|
||||||
cp $file ${LIB}/$file
|
|
||||||
fi
|
|
||||||
if [ -r ${LIB}/$file ] ; then
|
|
||||||
echo Fixing $file
|
|
||||||
sed -e 's,"XDPS.h",<DPS/XDPS.h>,' ${LIB}/$file > ${LIB}/${file}.sed
|
|
||||||
rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
|
|
||||||
if cmp $file ${LIB}/$file >/dev/null 2>&1; then
|
|
||||||
rm ${LIB}/$file
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix an error in this file: the #if says _cplusplus, not the double
|
# Fix an error in this file: the #if says _cplusplus, not the double
|
||||||
# underscore __cplusplus that it should be
|
# underscore __cplusplus that it should be
|
||||||
file=tinfo.h
|
file=tinfo.h
|
||||||
|
|
Loading…
Reference in New Issue