This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Don't force recompilation of files depending on $(COVERAGE_H)


On Fri, May 02, 2003 at 03:08:28AM -0300, Alexandre Oliva wrote:
> On May  1, 2003, Matt Kraai <kraai@alumni.cmu.edu> wrote:
> 
> > Should you follow the stamp idiom?
> 
> Yup, this would avoid running gcov-iov over and over.
> 
> Patch ok if you arrange for 
> 
> > ! gcov-iov.h: s-iov ; @true
>                 ^^^^^ this to match
> > ! s-gcov-iov.h: gcov-iov$(build_exeext) $(srcdir)/move-if-change
>     ^^^^^^^^^^^^ this :-)
> 
> and add a ChangeLog entry.  Thanks,

OK, here's what I checked in, after bootstrapping and regression
testing on powerpc-unknown-linux-gnu:

	* Makefile.in (gcov-iov.h): Use move-if-change and a stamp.

Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1045
diff -c -3 -p -r1.1045 Makefile.in
*** gcc/Makefile.in	2 May 2003 11:33:01 -0000	1.1045
--- gcc/Makefile.in	3 May 2003 05:38:18 -0000
*************** gcov-iov.o: gcov-iov.c version.c $(BCONF
*** 2432,2439 ****
  	$(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(srcdir)/gcov-iov.c $(OUTPUT_OPTION)
  gcov-iov$(build_exeext): gcov-iov.o
  	$(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) gcov-iov.o -o $@
! gcov-iov.h: gcov-iov$(build_exeext)
! 	./gcov-iov$(build_exeext) > $@
  
  gcov.o: gcov.c gcov-io.h gcov-iov.h intl.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
  gcov-dump.o: gcov-dump.c gcov-io.h gcov-iov.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
--- 2432,2442 ----
  	$(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(srcdir)/gcov-iov.c $(OUTPUT_OPTION)
  gcov-iov$(build_exeext): gcov-iov.o
  	$(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) gcov-iov.o -o $@
! gcov-iov.h: s-iov
! s-iov: gcov-iov$(build_exeext) $(srcdir)/move-if-change
! 	./gcov-iov$(build_exeext) > tmp-gcov-iov.h
! 	$(SHELL) $(srcdir)/move-if-change tmp-gcov-iov.h gcov-iov.h
! 	$(STAMP) s-iov
  
  gcov.o: gcov.c gcov-io.h gcov-iov.h intl.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
  gcov-dump.o: gcov-dump.c gcov-io.h gcov-iov.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)

Matt
-- 
Matt Kraai <kraai@alumni.cmu.edu>
Debian GNU/Linux Peon


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