title: How to enter a parent directory in Makefile?
body: <p>I've got the following <code>Makefile</code> (GNU Make 3.81):</p>
  
  <pre><code>CWD:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
  
  all:
          pwd
          cd "$(CWD)/.."
          pwd
          cd ".."
          pwd
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>$ make
  pwd
  /Users/kenorb/temp/foo
  cd "/Users/kenorb/temp/foo/.."
  pwd
  /Users/kenorb/temp/foo
  cd ".."
  pwd
  /Users/kenorb/temp/foo
  </code></pre>
  
  <p>It seems that <code>cd</code>'ing to parent directory via <code>..</code> doesn't take any effect.</p>
  
  <p>How do I change the current working directory to a parent directory relatively to <code>Makefile</code> file?</p>