title: How to check if a directory doesn't exist in make and create it
body: <p>In my project's directory, I have some subdirs: <code>code/</code>, <code>export/</code>, <code>docs/</code> and <code>object/</code>. What <code>make</code> does is simply compile all the files from the code dir, and put the .o files into the object dir.</p>
  
  <p>The problem is, I told git to ignore all .o files, because I don't want them uploaded, so it doesn't track the object dir either. I'm actually OK with that, I don't want the <code>object/</code> uploaded to my GitHub account as well, but with the current solution (which is a simple empty text file inside the <code>object/</code> dir), the directory does get uploaded and needs to be present before the build (the makefile just assumes it's there).</p>
  
  <p>This doesn't really seem like the best solution, so is there a way to check if a directory doesn't exist before the build in a make file, and create it if so? This would allow for the object dir not to be present when the make command is called, and created afterwards.</p>