title: Wildcard to obtain list of all directories
body: <p>In my Makefile I need to get a list of all directories present in some other directory.</p>
  
  <p>To get a list of all directories in the same folder as my <code>Makefile</code> I use:</p>
  
  <pre><code>DIRECTORIES = $(wildcard */)
  
  all:
      echo $(DIRECTORIES)
  </code></pre>
  
  <p>which works fine, and gives me the desired list. However if I want to have a list of all directories in another directory using</p>
  
  <pre><code>DIRECTORIES = $(wildcard ../Test/*/)
  
  all:
      echo $(DIRECTORIES)
  </code></pre>
  
  <p>I get a list of ALL files (with paths) in that directory, including <code>.h</code> and <code>.cpp</code> files.</p>
  
  <p>Any suggestions why this happens and how to fix it? Other solutions to obtain the list are also welcome.</p>