diff options
Diffstat (limited to 'makefiles/dist.mk')
-rw-r--r-- | makefiles/dist.mk | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/makefiles/dist.mk b/makefiles/dist.mk new file mode 100644 index 0000000..01464da --- /dev/null +++ b/makefiles/dist.mk @@ -0,0 +1,21 @@ +# creates distribution tarball +# +# requires: +# - PACKAGE_NAME +# - PACKAGE_VERSION +# +# provides: +# - target 'dist' + +.PHONY: dist +dist: distclean + test -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar || rm -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar + test -d /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION) || rm -rf /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION) + find . -type f | grep -v .svn | \ + xargs tar cf /tmp/pre + mkdir /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION) + cd /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION) && \ + tar xf ../pre && rm -f ../pre && cd .. && \ + tar cvf /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar $(PACKAGE_NAME)-$(PACKAGE_VERSION) + rm -rf /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION) + mv -f /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar . |