Patch: gcc.c support for -MF and -MT

Tom Tromey tromey@cygnus.com
Wed Oct 18 08:28:00 GMT 2000


A while back I sent in a proposal for how I'd like dependency tracking
options to work across all gcc front ends.  Recently I had a need to
extend gcj to allow for this richer dependency tracking "API", and
the gcj changes required this minor gcc.c change.

My proposal adds a few new options:

* -MF FILE   Set the name of the resulting dependency file
* -MT NAME   Set the name of the target used in the dependencies
* -MA        Print a dummy target for each dependency

I haven't changed any of the other front ends to support this, just
gcj.

Is this ok to check in?

I needed to put the new functionality into gcj so that I could get
more efficient rebuilds of libgcj.

2000-10-18  Tom Tromey  <tromey@cygnus.com>

	* cppspec.c (DEFAULT_WORD_SWITCH_TAKES_ARG): Added -MF and -MT.
	* gcc.c (DEFAULT_WORD_SWITCH_TAKES_ARG): Added -MF and -MT.

Tom

Index: cppspec.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppspec.c,v
retrieving revision 1.11
diff -u -r1.11 cppspec.c
--- cppspec.c	2000/08/02 20:21:25	1.11
+++ cppspec.c	2000/10/18 15:26:50
@@ -52,7 +52,8 @@
   || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
   || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
   || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
-  || !strcmp (STR, "isystem") || !strcmp (STR, "specs"))
+  || !strcmp (STR, "isystem") || !strcmp (STR, "specs") \
+  || !strcmp (STR, "MF") || !strcmp (STR, "MT"))
 
 #ifndef WORD_SWITCH_TAKES_ARG
 #define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR)
Index: gcc.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcc.c,v
retrieving revision 1.170
diff -u -r1.170 gcc.c
--- gcc.c	2000/10/05 20:07:24	1.170
+++ gcc.c	2000/10/18 15:26:57
@@ -650,7 +650,8 @@
   || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
   || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
   || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
-  || !strcmp (STR, "isystem") || !strcmp (STR, "specs"))
+  || !strcmp (STR, "isystem") || !strcmp (STR, "specs") \
+  || !strcmp (STR, "MF") || !strcmp (STR, "MT"))
 
 #ifndef WORD_SWITCH_TAKES_ARG
 #define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR)


More information about the Gcc-patches mailing list