title: correct flag to pass directory to g++ to include files
body: <p>I have compiled gcc 5.3.0 from source on an aws.ami linux to learn more about the entire development compiling chain. I have searched a number of threads for several hours and have not found the right combination to understand exactly what is going on.</p>
  
  <p>Looking in the .configure --help, I set the flag <code>--includedir=/home/mybin/include</code> and compiled the programs with no errors, using all the flags under <code>Fine tuning of the installation directories:</code></p>
  
  <p>When I compile a program passing <code>g++ -v test.cc</code> I see that by default the compiler is looking in </p>
  
  <pre><code>#include "..." search starts here:
  #include &lt;...&gt; search starts here:
  /home/mybin/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include
  /usr/local/include
  /home/mybin/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include-fixed
  /usr/include
  End of search list.
  </code></pre>
  
  <p>for include programs such as <code>map &amp; iostream</code> etc. </p>
  
  <p>Q1: why doesn't the -v output show the <code>--includedir</code> in the search. I note it does however look there for <code>#include</code> programs.</p>
  
  <p>Q2: I note that when the <code>make install</code> happened it did not copy the files from the compile tmp directory <code>/home/tmp/gcc-5.3.0/libstdc++-v3/include/std/....</code> to the <code>--includedir</code>. Is there a flag I have missed to get it to dump these files into that dir?</p>
  
  <p>Q3: Also using the <code>--help</code> output I have set <code>CPPFLAGS="-I/home/anotherBin"</code> to test if it will scan this dir for other include files. However it does not seem to work.
  So I tried each of the following with no success, what is the correct flag to set?</p>
  
  <pre><code>LDFLAGS="-L/home/anotherBin"     
          linker flags, e.g. -L&lt;lib dir&gt; if you have libraries in a               nonstandard directory &lt;lib dir&gt;
    LIBS="-l/home/anotherBin"
             libraries to pass to the linker, e.g. -l&lt;library&gt;
  </code></pre>