title: Partially preprocess a C or C++ source file?
body: <p>Is there a way to partially pre-process a <strong>C</strong> or C++ source file? By "partially preprocess" I mean expanding some but not all of the #include directives. For example, I would like to expand #includes pointing to my project headers, but not #includes pointing to other libraries' headers.</p>
  
  <p>I tried to do this by running <code>gcc -E</code> with only the <code>-I</code> flags for my project headers and not the <code>-I</code> flags for the libraries, but that doesn't work because gcc gives an error when it encounters an #include it cannot expand.</p>
  
  <p><strong>EDIT</strong>: I do not really care about the preprocessor's behaviour with respect to macro expansion.</p>