title: Makefile does not find target
body: <p>I have the following Makefile, but it does not work. When I call</p>
  
  <pre><code>make html
  </code></pre>
  
  <p>I get a</p>
  
  <pre><code>make: *** No rule to make target `docs/index.html', needed by `html'.  Stop.
  </code></pre>
  
  <p>error, even though I think I have defined it.</p>
  
  <pre><code>SRCDIR = source
  OUTDIR = docs
  
  RMD = $(wildcard $(SRCDIR)/*.Rmd)
  
  TMP  = $(RMD:.Rmd=.html)
  HTML = ${subst $(SRCDIR),$(OUTDIR),$(TMP)}
  
  
  test:
      echo $(RMD)
      echo $(TMP)
      echo $(HTML)
  
  
  all: clean update html
  
  html:   $(HTML)
  
  %.html: %.Rmd
      echo $(HTML)
      @Rscript -e "rmarkdown::render('$&lt;', output_format = 'prettydoc::html_pretty', output_dir = './$(OUTDIR)/')"
  
  update:
      @Rscript -e "devtools::load_all(here::here()); microcosmScheme:::updateFromGoogleSheet(token = './source/googlesheets_token.rds')"
  
  
  ## from https://stackoverflow.com/a/26339924/632423
  list:
      @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2&gt;/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
  
  .PHONY: update clean cleanhtml all list
  </code></pre>
  
  <p>The variables seem to be correct:</p>
  
  <pre><code>15:21 $ make test
  echo source/index.Rmd
  source/index.Rmd
  echo source/index.html
  source/index.html
  echo docs/index.html
  docs/index.html
  </code></pre>
  
  <p>If I change it as follow it works, but the target points to the SRCDIR, but I want it to point to the OUTDIR:</p>
  
  <pre><code>RMD = $(wildcard $(SRCDIR)/*.Rmd)
  
  HTML  = $(RMD:.Rmd=.html)
  # HTML = ${subst $(SRCDIR),$(OUTDIR),$(TMP)}
  </code></pre>
  
  <p>I am sure it is one small thing...</p>