title: How do I create a directory in a makefile
body: <p>I'm using Visual Studio 2005 nmake, and I have a test makefile like this:</p>
  
  <pre><code>sometarget:
      -mkdir c:\testdir
  </code></pre>
  
  <p>I want to always create the directory, without having to specify 'sometarget'. For example, I can do this:</p>
  
  <pre><code>!if [if not exist c:\testdir\$(null) mkdir c:\testdir]
  !endif
  </code></pre>
  
  <p>But that requires two lines, where I really only want to do the "-mkdir c:\testdir". If I just replace it with "-mkdir c:\testdir" I get an error from nmake - "fatal error U1034: syntax error : separator missing".</p>
  
  <p>How can I always execute the mkdir, without messing about with !if [] stuff?</p>