C++ g++/c++;生成忽略boost头的makefile依赖项?

C++ g++/c++;生成忽略boost头的makefile依赖项?,c++,makefile,gnu-make,C++,Makefile,Gnu Make,我在g++(和c++)中使用makefile依赖项生成选项,如下所示: c++ -I/opt/local/include -MM main.cc 在main.cc文件中: #include <iostream> #include <boost/shared_ptr.hpp> #include "projects/all_projects.h" int main(int argc, const char * argv[]) { // ... } #包括 #包括

我在g++(和c++)中使用makefile依赖项生成选项,如下所示:

c++ -I/opt/local/include -MM main.cc
在main.cc文件中:

#include <iostream>
#include <boost/shared_ptr.hpp>

#include "projects/all_projects.h"

int main(int argc, const char * argv[])
{
  // ...
}
#包括
#包括
#包括“projects/all_projects.h”
int main(int argc,const char*argv[]
{
// ...
}
-MM选项可以防止为iostream生成依赖项,这很好,但对于shared_ptr.hpp则不行。有没有一种方法可以防止boost头文件(甚至是尖括号中的任何头文件)产生依赖关系


我读过GCC的早期版本用于将角括号中的任何头作为系统头,但不再是这样了。

< P>使用代码> C++ + ISOS/OPT/PATION/EMP-MM。CC < /代码> < / P>
(和
mangcc
:-)

具有不完整的依赖关系树会导致不一致的构建。系统头文件不会更新。