title: missing separator error in a makefile when adding extra space inside foreach
body: <pre><code>THIS_MAKE := $(word $(words $(MAKEFILE_LIST)), $(MAKEFILE_LIST))
  MAKER := $(MAKE) -f $(THIS_MAKE)
  
  FILE_LIST=tmp/file tmp/dir/file
  
  all:
   rm -rf tmp
   $(MAKER) copy_files
  
  copy_files: $(FILE_LIST)
  
  tmp/file: | tmp
   echo hello&gt;$@
  
  tmp/dir/file: | tmp/dir
   echo world&gt;$@
  
  define dst_dir_rule
  $(1):
   -mkdir -p $$@
  
  endef
  $(foreach dir,$(dir $(FILE_LIST)), $(eval $(call dst_dir_rule,$(dir))))
  
  #end of makefile
  </code></pre>
  
  <p>The makefile above should create the files in the FILE_LIST variable.<br>
  The problem is with the part that tries to automatically generate rules for the directories.<br>
  When I run it I get a "missing separator." error.<br>
  When I delete the space between the comma and the $(eval) it works.  </p>
  
  <p>I would really like to understand why.  </p>
  
  <p>Thanks,<br>
  Gur</p>