title: Current working directory of makefile
body: <p>I have the following directory structure</p>
  
  <pre><code>project
  |-- Makefile
  |-- data
      |-- report.tex
      |-- plot_1.eps
  </code></pre>
  
  <p>One of the rules in the <code>Makefile</code> executes <code>latex data/report.tex</code>. As the working directory is <code>project</code>, I'm getting report.dvi and other output files there only. How do I get those in <code>./data</code>?</p>
  
  <p>Also, I've included <code>plot_1.eps</code> in the report. But still its expecting the path <code>data/plot_1.eps</code>. Do we need to give the file path relative to the current working directory from where <code>latex</code> is executed? Or location of <code>report.tex</code>?</p>
  
  <p>In the <code>Makefile</code>, I tried</p>
  
  <pre><code>reportdvi: outputparser
          cd data
          latex report.tex
          cd ..
  </code></pre>
  
  <p>But this didn't change the working directory and the problem persists. What to do?</p>