* Save temp file in ${LIB}. Use -I${ORIGDIR} when compiling types.c.
From-SVN: r3499
This commit is contained in:
parent
49b6e255d9
commit
631e21eb7b
|
@ -27,6 +27,9 @@ case "`pwd`" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Original directory.
|
||||||
|
ORIGDIR=`${PWDCMD}`
|
||||||
|
|
||||||
# Make sure it exists.
|
# Make sure it exists.
|
||||||
if [ ! -d $LIB ]; then
|
if [ ! -d $LIB ]; then
|
||||||
mkdir $LIB || exit 1
|
mkdir $LIB || exit 1
|
||||||
|
@ -294,9 +297,9 @@ do
|
||||||
# Extract the definition of SIZE_TYPE, if any.
|
# Extract the definition of SIZE_TYPE, if any.
|
||||||
# (This file must be called something.c).
|
# (This file must be called something.c).
|
||||||
echo "#include \"tm.h\"
|
echo "#include \"tm.h\"
|
||||||
gobblegobble SIZE_TYPE" > types.c
|
gobblegobble SIZE_TYPE" > ${LIB}/types.c
|
||||||
foo=`cc -E -I. -I$SRCDIR -I$SRCDIR/config types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"`
|
foo=`cc -E -I${ORIGDIR} -I${SRCDIR} -I${SRCDIR}/config ${LIB}/types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"`
|
||||||
rm -f types.c
|
rm -f ${LIB}/types.c
|
||||||
# Default to our preferred type.
|
# Default to our preferred type.
|
||||||
if [ $foo = SIZE_TYPE ]; then foo="unsigned long int"; else true; fi
|
if [ $foo = SIZE_TYPE ]; then foo="unsigned long int"; else true; fi
|
||||||
sed -e "s/typedef[ a-z_]*[ ]size_t/typedef $foo size_t/" ${LIB}/$file > ${LIB}/${file}.sed
|
sed -e "s/typedef[ a-z_]*[ ]size_t/typedef $foo size_t/" ${LIB}/$file > ${LIB}/${file}.sed
|
||||||
|
|
Loading…
Reference in New Issue