title: Check if a makefile exists before including it
body: <p>I have a makefile that includes a Rules.mak file that holds includes to tools I want to use. Problem is that the tools folder has free options if they want to extract a version or use the "native" installation. So I want to include the tools extracted rules if it exists otherwise I want to include the native file.</p>
  
  <p>something like this is the goal:</p>
  
  <pre><code>if Tool/Rules.mak exists then
    include Tool/Rules.mak
  else
    include common/Rules-Tool.mak
  fi
  </code></pre>
  
  <p>I have tried either the bash way or the make way but as this is preincludes to setup the enviroment I don't have a specifik target but make calls out wrong due to the check fails.</p>
  
  <pre><code>if [ -f Tool/Rules.mak ]
  then
  echo testfile exists!
  fi
  </code></pre>
  
  <p>also </p>
  
  <pre><code>if [ -d ./Tool ]
  then
  echo testfile exists!
  fi
  </code></pre>
  
  <p>as well as versions with quotes and similar. Problem is that almost all the time when I type make I get the following error:</p>
  
  <pre><code>Rules.mak:14: *** missing separator.  Stop.    
  </code></pre>