[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Makedepend -- Don't search standard libraries
From: |
Paul D. Smith |
Subject: |
RE: Makedepend -- Don't search standard libraries |
Date: |
Fri, 16 Jul 2004 09:37:24 -0400 |
%% hotquietday <address@hidden> writes:
h> Because standard library calls are made like:
h> #include <vector>
h> whereas custom includes are
h> #include "myFile.cpp"
For C++ that's true. Makedepend was developed for C when C++ was barely
a twinkle in Stroustrup's eye.
h> You pointed out thata makedepend is not really associated with
h> make. I suppose a better question would be: What is currently
h> considered the best way to find dependencies in C++ code? That is
h> all I'm really trying to do.
If you're using GCC, then -M is the way to go.
Some other compilers may (or may not) support that flag as well,
although probably they don't generate identical results.
The short answer, there is no best, supported way that I'm aware of.
There is only a way that works for you.
h> But in the example I gave:
h> makedepend -f- -Y -o.obj $*.cpp > address@hidden;
h> it is reading from a .cpp file, not from stdin,
h> isn't it? Am I missing your point?
Nope, I didn't read it carefully enough. In this case the "-" is taking
the place of the output filename and means stdout.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist