diff options
author | Doug Evans <dje@gnu.org> | 1993-02-20 08:17:28 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1993-02-20 08:17:28 +0000 |
commit | 631e21eb7b2cf181fe8662990fa5a91db26e2686 (patch) | |
tree | e7f02a0db7b28ffc959b279de446dc3f34f48959 /gcc | |
parent | 49b6e255d9b3f6e7fbf146046ab9913c53a6ec06 (diff) | |
download | gcc-631e21eb7b2cf181fe8662990fa5a91db26e2686.zip gcc-631e21eb7b2cf181fe8662990fa5a91db26e2686.tar.gz gcc-631e21eb7b2cf181fe8662990fa5a91db26e2686.tar.bz2 |
* Save temp file in ${LIB}. Use -I${ORIGDIR} when compiling types.c.
From-SVN: r3499
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/fixincludes | 9 |
1 files 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 |