title: BSD Make and GNU Make compatible makefile
body: <p>I have a BSDmakefile and GNUmakefile that are pretty much identical except for dependency management.</p>
  
  <p>The GNUmakefile:</p>
  
  <pre><code>ifneq ($(MAKECMDGOALS), "clean")
  -include $(dependencies)
  endif
  </code></pre>
  
  <p>The BSDmakefile:</p>
  
  <pre><code>.for i in $(dependencies)
  .sinclude "${i}"
  .endfor
  </code></pre>
  
  <p>Is there a way to make it so that I can detect if I am running under gmake or bsdmake and then execute the appropriate include statements based off of that? I remember seeing someone take advantage of a quirk in both makefile processors so that they could achieve a similar effect.</p>
  
  <p>Alternatively, if there is a better approach than this, I would like to know! (switching to SCons or CMake is not appropriate!)</p>
  
  <p>Thanks!</p>