title: writing Makefiles that are dependent on date and/or time
body: <p>Is there anything in GNU Make that allows for dependency on date and/or time?</p>
  <p>Currently I have a <code>Makefile</code> that checks whether or not to download the latest financial data. The target is something like <code>stock_symbol.csv</code>, and the important dependency is a a file called <code>last_updated.txt</code>. <code>last_updated.txt</code> changes once a day, and when it does, <code>make</code> will know to refresh my historical data.</p>
  <p>The annoying thing is that I have to change this finally manually, or let some other program (e.g. cron) modify it on a schedule. I'm wondering if there's a way to remove the need for external programs here. Does Make have anything that will achieve this?</p>
  <p>This is my present <code>Makefile</code></p>
  <pre><code>.PHONY : run
  run :
      R --quiet -e &quot;shiny::runApp(launch.browser=TRUE)&quot;
  
  # update model
  model.RData: model.R data/vix.csv
      Rscript fit_model.R
  
  # update data
  data/vix.csv: last_updated.txt update_csv.R
      Rscript update_csv.R
  
  ## remove all target, output and extraneous files
  .PHONY: cleanall
  cleanall:
      rm -f *~ *.Rout *.RData *.docx *.pdf *.html *-syntax.R *.RData
  </code></pre>