This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Still a lot of C++ files getting "fixed"


On Tue, Feb 01, 2000 at 10:55:38AM -0800, Bruce Korb wrote:
> Jeffrey A Law wrote:
> > 
> >   In message <20000131220031.D529@wolery.cumb.org>you write:
> >   > > [ Which reminds me -- a patch to remove the old slow fixincludes
> >   > > code would be greatly appreciated :-) ]
> >   >
> >   > Which old slow fixincludes code?  The script loose in gcc/, the shell
> >   > script that gets run if the C version doesn't compile, the smaller
> >   > shell scripts that get used on some platforms only...
> > The stuff that predates Bruce's work.  See "fixincludes" in the gcc
> > directory and its associated Makefile/configure.in hackery to make
> > selection of old vs new fixincludes possible.
> 
> I'll issue the coup des grace in a day or two, okay?
> That will remove commentary from gcc/Makefile.in and
> delete gcc/fixincludes.

A bit more than just that can go away...  There's also fixcpp,
fixinc-nt.sed, and a bit of Makefile cruft (patch appended).

Note I'm still waiting for review on the last round of corrections to
the new fixincludes, and Kaveh's patch to not rerun fixinc each pass
hasn't been approved either.  (The patch below includes Kaveh's patch.)

zw

===================================================================
Index: Makefile.in
--- Makefile.in	2000/01/28 21:21:49	1.375
+++ Makefile.in	2000/02/01 19:20:31
@@ -834,7 +834,7 @@ all.internal: start.encap rest.encap doc
 # This is what to compile if making a cross-compiler.
 # Note that we can compile enquire using the cross-compiler just built,
 # although we can't run it on this machine.
-all.cross: native gcc-cross xcpp$(exeext) specs stmp-headers $(STMP_FIXPROTO) \
+all.cross: native gcc-cross xcpp$(exeext) specs $(STMP_FIXPROTO) \
 	$(LIBGCC) $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc
 # This is what to compile if making gcc with a cross-compiler.
 all.build: native xgcc$(exeext) xcpp$(exeext) $(EXTRA_PARTS) lang.all.build
@@ -842,7 +842,7 @@ all.build: native xgcc$(exeext) xcpp$(ex
 start.encap: native xgcc$(exeext) xcpp$(exeext) specs $(LIBGCC1) \
 	xlimits.h lang.start.encap
 # These can't be made until after GCC can run.
-rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
+rest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
 # This is what is made with the host's compiler
 # whether making a cross compiler or not.
 native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \
@@ -2155,39 +2155,25 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xli
 	chmod a+r include/README
 	touch $@
 
-# Now that float.h no longer depends upon enquire, this is actually a no-op.
-stmp-headers:
-	touch $@
+# fixinc.sh depends on this, not on specs directly.
+# The idea is to make sure specs gets built, but not rerun fixinc.sh
+# after each stage just because specs' mtime has changed.
+specs.ready: specs
+	-if [ -f specs.ready ] ; then \
+		true; \
+	else \
+		touch specs.ready; \
+	fi
 
 FIXINCSRCDIR=$(srcdir)/fixinc
 fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \
 	$(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/gnu-regex.c \
 	$(FIXINCSRCDIR)/server.c $(FIXINCSRCDIR)/gnu-regex.h \
-	$(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs
+	$(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready
 	MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc; pwd` ; \
 	export MAKE srcdir ; \
 	cd ./fixinc; $(SHELL) $${srcdir}/mkfixinc.sh $(target)
 
-##stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
-##	rm -rf include
-##	mkdir include
-##	if [ x$(FIXINCLUDES) != xMakefile.in ]; \
-##	then \
-##	  for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
-##	    if [ -d $$dir ]; \
-##	    then \
-##	      $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
-##	    else true; fi; \
-##	  done; \
-##	  if [ x$(INSTALL_ASSERT_H) != x ] ; \
-##	  then \
-##	    rm -f include/assert.h; \
-##	    cp $(srcdir)/assert.h include/assert.h; \
-##	    chmod a+r include/assert.h; \
-##	  fi \
-##	else true; \
-##	fi
-
 # Build fixed copies of system files.
 stmp-fixinc: fixinc.sh gsyslimits.h
 	rm -rf include; mkdir include
@@ -2275,10 +2261,10 @@ fixhdr.ready: fix-header
 		touch fixhdr.ready; \
 	fi
 
-# stmp-headers is to make sure fixincludes has already finished.
+# stmp-int-hdrs is to make sure fixincludes has already finished.
 # The if statement is so that we don't run fixproto a second time
 # if it has already been run on the files in `include'.
-stmp-fixproto: fixhdr.ready fixproto stmp-headers
+stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
 	@echo "Various warnings and error messages from fixproto are normal"
 	-if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
 	-if [ -f include/fixed ] ; then true; \
@@ -2694,7 +2680,7 @@ install-include-dir: installdirs
 	-chmod a+rx $(libsubdir)/include
 
 # Install the include directory using tar.
-install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-tar: $(STMP_FIXPROTO) install-include-dir
 # We use `pwd`/include instead of just include to problems with CDPATH
 # Unless a full pathname is provided, some shells would print the new CWD,
 # found in CDPATH, corrupting the output.  We could just redirect the
@@ -2706,7 +2692,7 @@ install-headers-tar: stmp-headers $(STMP
 # So use `exit 0' to ignore its exit status.
 
 # Install the include directory using cpio.
-install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-cpio: $(STMP_FIXPROTO) install-include-dir
 # See discussion about the use of `pwd` above
 	cd `pwd`/include ; \
 	find . -print | cpio -pdum $(libsubdir)/include

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]