From 631e21eb7b2cf181fe8662990fa5a91db26e2686 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Sat, 20 Feb 1993 08:17:28 +0000 Subject: [PATCH] * Save temp file in ${LIB}. Use -I${ORIGDIR} when compiling types.c. From-SVN: r3499 --- gcc/fixincludes | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/fixincludes b/gcc/fixincludes index 52a1e27..65d2277 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -27,6 +27,9 @@ case "`pwd`" in ;; esac +# Original directory. +ORIGDIR=`${PWDCMD}` + # Make sure it exists. if [ ! -d $LIB ]; then mkdir $LIB || exit 1 @@ -294,9 +297,9 @@ do # Extract the definition of SIZE_TYPE, if any. # (This file must be called something.c). echo "#include \"tm.h\" -gobblegobble SIZE_TYPE" > types.c - foo=`cc -E -I. -I$SRCDIR -I$SRCDIR/config types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"` - rm -f types.c +gobblegobble SIZE_TYPE" > ${LIB}/types.c + foo=`cc -E -I${ORIGDIR} -I${SRCDIR} -I${SRCDIR}/config ${LIB}/types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"` + rm -f ${LIB}/types.c # Default to our preferred type. 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 -- 2.7.4