Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
Date: 2004-05-23
Initial Package Version: 3.3.3
Origin: Originally developed for GCC 3.2 by Greg Schafer <gschafer at zip dot com dot au>
then by Ronald Hummelink <ronald at hummelink dot xs4all dot nl> for GCC 3.3.
Description: Prevent fixincludes script from running. This patch differs from previous
in that all stages of gcc builds can use this patch. The gcc source can be read-only from
chap5 pass1 and beyond. To use this patch do ./configure... then
'touch gcc/DONOTFIXINCLUDES' and make normaly after (in gcc-build).

diff -Naur gcc-3.3.3.orig/gcc/Makefile.in gcc-3.3.3.nofixincludes/gcc/Makefile.in
--- gcc-3.3.3.orig/gcc/Makefile.in	2004-01-29 04:42:13.000000000 +0000
+++ gcc-3.3.3.nofixincludes/gcc/Makefile.in	2004-05-23 17:05:28.000000000 +0000
@@ -2341,10 +2341,13 @@
 	rm -f include/limits.h
 	cp xlimits.h include/limits.h
 	chmod a+r include/limits.h
-# Install the README
-	rm -f include/README
-	cp $(srcdir)/README-fixinc include/README
-	chmod a+r include/README
+# Nofixincludes - robert
+	if [ ! -f DONOTFIXINCLUDES ] ; then \
+	rm -f include/README; \
+	cp $(srcdir)/README-fixinc include/README; \
+	chmod a+r include/README; \
+	fi; \
+
 	$(STAMP) $@
 
 # fixinc.sh depends on this, not on specs directly.
@@ -2386,7 +2389,9 @@
 	(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
 	SHELL='$(SHELL)' ;\
 	export TARGET_MACHINE srcdir SHELL ; \
-	$(SHELL) ./fixinc.sh `${PWD_COMMAND}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \
+	if [ ! -f DONOTFIXINCLUDES ]; then \
+		$(SHELL) ./fixinc.sh `${PWD_COMMAND}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \
+	fi; \
 	rm -f include/syslimits.h; \
 	if [ -f include/limits.h ]; then \
 	  mv include/limits.h include/syslimits.h; \
