title: Pattern rule with partial dependency
body: <p>I have a <code>makefile</code> with a bunch of <code>.R</code> scripts that create <code>.csv</code> files as output. These files are then used in a python simulation.</p>
  
  <pre><code>all: $(FILES)
    python simulation.py
  
  $(FILES): %.csv: %.R 
    Rscript $&lt;
  </code></pre>
  
  <p>This is straightforward. My wrinkle is that one (and only one) of the <code>.R</code> scripts has its own dependency, say <code>sourcedata</code>. It seems that placing this dependency in the pattern would be annoying </p>
  
  <pre><code>all: $(FILES)
    python simulation.py
  
  $(FILES): %.csv: %.R sourcedata
    Rscript $&lt;
  
  sourcedata:
    wget "sourcedata.zip"
  </code></pre>
  
  <p>But doing it like <code>all: sourcedata $(FILES)</code> and relying on order-of-operations would <a href="https://stackoverflow.com/a/9160163/843419">be less effective</a>. I guess that I could also give that R file its own phony rule</p>
  
  <pre><code>problem_script.R: sourcedata
    @echo R script read
  </code></pre>
  
  <p>but I haven't been able to test if that will work. Is there an established way to do this?</p>