This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Fix .d files
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 24 Oct 2003 13:08:30 -0400
- Subject: 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 <drow@mvista.com>
* 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)