Problem with same headers filename in different directories
Maybe I missed something, but seems like there is a wrong behaviour for makedepend with headers with same name in different directories, let me explain.
Imagine you have 2 directories "one" and "two". Directory "one" contains a cpp file "one.cpp" and an header "def.h" The file "one.cpp" includes this "def.h".
Directory "two" contains a cpp file "two.cpp" and an header "def".h" The file "two.cpp" includes this other "def.h"
It means that we have 2 differents headers with the same name but not in the same place.
When "one/def.h" is modified, "one/one.o" should be rebuilt. When "two/def.h" is modified, "two/two.o" should be rebuilt. And that's all :)
The way how makedepend works seems to be like this: when makedepend finds an include statement, he tries to find in the list of "already seen" headers and return it (only based on the filename and not the path). It means that "makedepent one/one.cpp two/two.cpp" will produce wrong dependency for "two/two.o" (same error will appear if we change the order... but the rule impacted will be "one/one.cpp")
I understand this behaviour for system headers that can appear in multiple places and we only need the "first found" header.
Do you validate this issue ?
I will provide a test case + propose a fix very soon
Thank you team for maintaining this tool :)
Thibault