title: How to make rake task dependent on file and another task
body: <p>I have two rake tasks that need to be dependent on a file, as well as another rake task.  Here is what I've tried:</p>
  
  <pre><code>task :dependencies do
    # Install some pacman packages if necessary
  end
  
  # the :build task should be dependent on output.pdf and the dependencies task
  task :build =&gt; [:dependencies, 'output.pdf']
  
  # the file task should also be dependent on dependencies (in case it's run directly)
  file 'output.pdf' =&gt; [:dependencies, 'output.md'] do
  </code></pre>
  
  <p>How can I tell a file task to depend on another rake task <em>as well as</em> its input file?  Also, how can I tell a regular task to be dependent on a file task and a regular task?</p>