Ticket #239 (reopened defect)
makedepend gets confused with multiple #include "filename..." in same program
Description (last modified by olly) (diff)
Test condition:
In foo.cpp:
#include "bar.hpp" #include "test1.hpp"
In test1.cpp:
#include "bar.hpp:
In test2.cpp:
#include "bar.hpp"
In test1.hpp:
#include "bar.hpp"
In bar.hpp:
#include "caa1.hpp" #include "caa2.hpp"
When makedepend is processing file test1.hpp, it does not detect that bar.hpp has already been included. It DOES however, detect the fact that #include files in bar.hpp have already been processed.
Resultant output: There are two anomolies here 1. bar.hpp appears twice in the list of dependencies for foo.o (low priority) 2. All subsequent files (to makedepend) that #include bar.hpp do NOT specify files included by bar.hpp in their dependency list (high priority)
For example:
The makedepend command line has been supplied source filenames of foo.cpp, test1.cpp, and test2.cpp
The resultant makedepend output looks something like this:
foo.o: bar.hpp caa1.hpp caa2.hpp test1.hpp bar.hpp test1.o: bar.hpp test2.o: bar.hpp
I am actively debugging the code to see if I can fix the bug. Any help would be appreciated. I am using MSVC (I ported the project file to VS 2003).
