This is the mail archive of the mailing list for the glibc 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]

Fix .d files

I noticed yesterday that the .d files weren't doing their jobs - if I
modified a header then the target was sometimes not rebuilt.  It turns out
that this is why:

dl-lookup.o: ../sysdeps/generic/dl-lookup.c etc etc

Is there some version of GCC which output the value of -o as the default
makefile target?  Because at least back to 3.2 it's documented to be "the
basename of the input file, with the suffix changed to
TARGET_OBJECT_SUFFIX".  So the sed-remove-objpfx script fails to put the
right objpfx, and the dependency does nothing.  -MT fixes it.

OK, or am I missing something?

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-10-24  Daniel Jacobowitz  <>

	* Makerules (compile-mkdep-flags): Use -MT.

Index: Makerules
RCS file: /big/fsf/rsync/glibc-cvs/libc/Makerules,v
retrieving revision 1.413
diff -u -p -r1.413 Makerules
--- Makerules	12 Sep 2003 22:20:33 -0000	1.413
+++ Makerules	24 Oct 2003 16:52:53 -0000
@@ -362,7 +362,7 @@ endif # $(versioning) = yes
 endif # sysd-sorted-done
 # Generate .dT files as we compile.
-compile-mkdep-flags = -MD -MP -MF $@.dt
+compile-mkdep-flags = -MD -MP -MF $@.dt -MT $@
 compile-command.S = $(compile.S) $(OUTPUT_OPTION) $(compile-mkdep-flags)
 compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags)
 compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)

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