title: recursive gmake question
body: <p>I need to write a quick makefile for building all my projects. This is C++ code and I am using gmake.</p>
  
  <p>Say I have a list of directories, I want to cd to each, issue gmake command and if it succeeds, go to the next one and so on.</p>
  
  <p>I cooked this by looking at the <a href="http://www.gnu.org/software/automake/manual/make/Phony-Targets.html#Phony-Targets" rel="nofollow noreferrer">gmake manual</a></p>
  
  <pre><code>.PHONY: all clean dirs $(DIRS)
  
  dirs: $(DIRS)
  
  $(DIRS): \n\t
      $(MAKE) -C $@
  </code></pre>
  
  <p>It works for the "all" target - if I just type gmake, it does the right thing. But if I do gmake clean it does nothing.</p>
  
  <p>I am learning gmake as I go, so I am certainly doing something silly here :)</p>
  
  <p>Thanks for any help.</p>