title: How to tar a directory with using makefile
body: <p>I have few files in sub directories, all the files are just text files like faq, user guides.There are no c/cpp src code
  in it. Following is the file and directory structure. </p>
  
  <pre><code>scr
  |_Makefile                     #Top level Makefile
  |_other_dirs
  |_some_other_dirs
  |_mydir
     |_Makefile                  #Makefile of mydir, need to put some code here
     |_dir1
     |  |_textfile0
     |  |_textfile1 
     |_dir2
        |_textfile2
        |_textfile3
  </code></pre>
  
  <p>Question, How can I tar the contents of dir1 and dir2 into one tar ball? I tried searching over internet about the Makefile and how to use it to create the take ball from top Makefile but no success yet. I am not  very familiar with Makefiles, any starting point will be appreciated. Thanks. </p>
  
  <p>Following is my novice attempt to have a very basic Makefile:</p>
  
  <pre><code> --&gt;cat Makefile
  mydir.tgz : *
      tar -zcvf mydir.tgz mydir/
  
   --&gt;make
  Makefile:1: *** missing separator.  Stop.
  </code></pre>
  
  <p>Idea is to run top Makefile and have tar file generated for mydir. </p>