title: pushd not working in makefile
body: <p>I have the following rule in a makefile:</p>
  
  <pre><code>ninja:
      git clone git://github.com/martine/ninja.git
      pushd ninja
      pwd
      git checkout release
      ./configure.py --bootstrap
      popd
  </code></pre>
  
  <p>The idea is to download and build <a href="https://martine.github.io/ninja/" rel="noreferrer">ninja</a> automatically as a project dependency. Notice that the <code>pwd</code> command is just there to make sure that the directory was pushed. Here's the output it generates:</p>
  
  <pre><code>git clone git://github.com/martine/ninja.git
  Cloning into 'ninja'...
  remote: Counting objects: 8646, done.
  remote: Compressing objects: 100% (4/4), done.
  remote: Total 8646 (delta 0), reused 0 (delta 0), pack-reused 8642
  Receiving objects: 100% (8646/8646), 1.88 MiB | 427.00 KiB/s, done.
  Resolving deltas: 100% (6114/6114), done.
  Checking connectivity... done.
  pushd ninja
  ~/Desktop/core/ninja ~/Desktop/core
  pwd
  /Users/fratelli/Desktop/core
  git checkout release
  error: pathspec 'release' did not match any file(s) known to git.
  make: *** [ninja] Error 1
  </code></pre>
  
  <p>As you can see the directory does get pushed into the stack, but <code>pwd</code> does not return the correct directory. That's also why the <code>checkout</code> fails afterwards. Any ideas how to fix this?</p>