As I am using bazaar for version management, the directory to be archived usually contains a sub-directory called .bzr. This is obviously a directory to be excluded.
In my Makefile I first define a variable for my project's directory:
sourcedir=$(PWD)
This is done for portability.
Then the actual rule to make the tar:
tar: veryclean
(cd ../; tar -cvzf $(PROJECT)-`date +'%b-%d-%y' | tr A-Z a-z`.tgz \
--exclude "$(sourcedir)/.bzr" $(sourcedir))
veryclean is a rule to remove files generated during compilation (like log files), and is called first.
No comments:
Post a Comment