* Save temp file in ${LIB}. Use -I${ORIGDIR} when compiling types.c.
authorDoug Evans <dje@gnu.org>
Sat, 20 Feb 1993 08:17:28 +0000 (08:17 +0000)
committerDoug Evans <dje@gnu.org>
Sat, 20 Feb 1993 08:17:28 +0000 (08:17 +0000)
From-SVN: r3499

gcc/fixincludes

index 52a1e27..65d2277 100755 (executable)
@@ -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