|Description||Sometimes there are spurious "cannot include xxx_m.h: no such file or directory" errors during build, while the corresponding .msg file exists. The Makefile somehow doesn't invoke opp_msgc in time for that .msg file.|
Analysis reveals that this happens when the .cc file includes xxx_m.h via a header file (say foo.h) which is marked as "ambiguous include" in the IDE. (The warning for the #include "foo.h" line is: "Makefile autodeps: ambiguous include (more than one matching file found)", meaning there are more than one foo.h files in the project.) Looking at the Makefile, the dependencies for the .cc file DON'T contain foo.h (or xxx_m.h), which is apparently why make doesn't know that xxx_m.h will be needed for compiling the .cc file, and doesn't invoke opp_msgc.
Thus, the root cause of the problem seems to be that the makefile generator leaves out ambiguous includes from the dependencies. Instead of leaving out foo.h, it should play safe and list both (all) foo.h files in the project as the dependency of the .cc file.