tiemann@arkesden.eng.sun.com (Michael Tiemann) (12/01/89)
The command g++ -M foo1.c foo2.cc foo3.C will give: foo1.o: ... foo2.o: ... foo3.C.o: ... This code in cccp.c supplies the make targets for g++ -M: /* Output P, but remove known suffixes. */ len = strlen (p); if (p[len - 2] == '.' && p[len - 1] == 'c') deps_output (p, len - 2); else if (p[len - 3] == '.' && p[len - 2] == 'c' && p[len - 1] == 'c') deps_output (p, len - 3); else deps_output (p, 0); /* Supply our own suffix. */ deps_output (".o : ", 0); deps_output (in_fname, 0); deps_output (" ", 0); Obviously .C is not a "known suffix". .cc has the advantage over .C that it can be used under systems which are not case-sensitive. Michael