Consider the following scenario: foo.cpp has the following includes: #include <utility> #include "bar.h" bar.h has the following includes: #include "utility/bazz.h" running 'makedepend -I. foo.cpp' will give the following error: failed to read ./utility The reason is that makedepend does not bother to check if the file it is trying to open is actually a directory. It should ignore directories with the same name as the include file it is trying to parse. A fix is attached to the bug. Reproducible: Always Steps to Reproduce: 1.Unpack attached file 2.cd makedepend_bug 3.makedepend -I. foo.cpp Actual Results: makedepend: error: failed to read ./utility Expected Results: Makedepend should run successfully a patch is attached that fixes the problem.
Created attachment 179408 [details, diff] Patch to fix the problem
Created attachment 179410 [details] files supporting test case Run it with: cd makedepend_bug makedepend -I. foo.cpp
makedepend has been deprecated by upstream for quite a while now and is only kept around for systems where the C compiler cannot generate dependency information (gcc can, sun's cc can too apparently). So this is definitely a issue that needs to be reported to FreeDesktop's bugzilla (http://bugs.freedesktop.org/) so that it can be fixed there. If you can, I strongly suggest you try using gcc's dependency tracking system rather than makedepend's. Thanks