From ad425f2810b466a000f5556a7710859ca366d135 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 1 May 2007 19:59:47 -0700 Subject: [PATCH] Add a "make dist" that requires $(VERSION) to match `git describe` Signed-off-by: Josh Triplett --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index ee9d4465..77a68779 100644 --- a/Makefile +++ b/Makefile @@ -145,3 +145,10 @@ pre-process.h: clean: rm -f *.[oasi] core core.[0-9]* $(PROGRAMS) $(SLIB_FILE) pre-process.h sparse.pc + +dist: + @if test "`git describe`" != "$(VERSION)" ; then \ + echo 'Update VERSION in the Makefile before running "make dist".' ; \ + exit 1 ; \ + fi + git archive --format=tar --prefix=sparse-$(VERSION)/ HEAD^{tree} | gzip -9 > sparse-$(VERSION).tar.gz -- 2.11.4.GIT