From 71a2b8fd2371d2d0a6f9141847433b7730a6e7de Mon Sep 17 00:00:00 2001 From: Heiko Hund Date: Fri, 12 Mar 2010 16:14:25 +0100 Subject: [PATCH] add snapshot target to Makefile --- Makefile.in | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index fefa3b4..ef50d01 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,6 @@ -BASENAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@ +ifndef VERSION + VERSION = @PACKAGE_VERSION@ +endif EXE = @PACKAGE_TARNAME@.exe CC = @CC@ @@ -41,11 +43,14 @@ dist: echo "please install and run configure again"; \ exit 1; \ } - rm -rf $(BASENAME) - mkdir $(BASENAME) - cp $(SOURCES) $(EXTRA) $(BASENAME) - $(ZIP) -qr $(BASENAME).zip $(BASENAME) - rm -rf $(BASENAME) + rm -rf @PACKAGE_TARNAME@-*/ + mkdir @PACKAGE_TARNAME@-$(VERSION) + cp $(SOURCES) $(EXTRA) @PACKAGE_TARNAME@-$(VERSION) + $(ZIP) -qr @PACKAGE_TARNAME@-$(VERSION).zip @PACKAGE_TARNAME@-$(VERSION) + rm -rf @PACKAGE_TARNAME@-$(VERSION) + +snapshot: + $(MAKE) dist VERSION="$(VERSION).git`git log --format=format:"%h" HEAD -1`" clean : rm -f *.o *.exe