Mail Archives: djgpp/1994/03/31/23:32:55
Thus must have been discussed before, but I don't remember it.
I am having some trouble with gcc -MM to produce makefile depencies.
The problem seems to be with long command lines.
gcc -MM foo1.c foo2.c ..... foo_n.c > makefile.dep
gives the output "can't find file <-MM>" if the total line length
is more than 128 (or so).
This is not that much of a problem, as I can use
gcc -MM *.cc > makefile.dep
(although this did hang my system and required a reboot *once*,
it hasn't since then (?)).
Or I can use the response file method to accomplish the same thing.
A more interesting problem is what happens when I have an include
file that is located in an unusual directory. In such cases, the
path and drive letter appear in the output:
foo.o : foo.cc E:/OTHER/INCLUDE
But make (gnu make 3.69) chokes on the colon. The solution is to
escape the colon with a backslash, but this is painful if I have
a very large dependency file and don't happen to have 'sed' around.
In any case, gcc -MM should produce output that does not need to be
modified (IMHO).
Gordon J. Hogenson
ghogenso AT u DOT washington DOT edu
- Raw text -