The GCC -MM and -MMD options generate dependencies. However, when I try to build with Rogue Wave, not only to I get the local dependencies, but I also get all the STL and Rogue Wave dependencies. Note that RogueWave has its own version of the STL. The C++ file's header lists is: #include <iostream> #include <rw/tpordvec.h> #include <string> #include <iterator> #include "thisfile.h"
The command line is: g++-I$(RWPATH)/include -I$(RWPATH) -D_RWCONFIG_rmd -MMD -c thisfile.cc
What I should see in thisfile.d is: thisfile.o: thisfile.cc thisfile.h
What I do see is: thisfile.o: thisfile.cc <RWPATH>/include/iostream \ <RWPATH>/include/istream \ .... thisfile.h
According to the GCC man page, the -MM (and -MMD) options should exclude system headers (eg. those files included in angle brackets). I've tried a few different options. My partner in Toronto actually found that it was trying to compile some of the RogueWave files such as vector.cc since it is implicitly included as <RWPATH>/include/vector.cc into the .i file by the preprocessor.
I'm not worried about the performance implications regarding the inclusion of all the header files, but I am concerned about make implicitly wanting to compile the RW .cc files. One possible solution is to create a script to remove all the lines with <RWPATH>, but I'm looking for a more elegant solution.
programming@lists.opensuse.org