Add helper target to help with making release tarball v1.22
authorSteve McIntyre <steve@einval.com>
Thu, 21 Nov 2019 18:46:11 +0000 (18:46 +0000)
committerSteve McIntyre <steve@einval.com>
Thu, 21 Nov 2019 18:46:11 +0000 (18:46 +0000)
Makefile

index f9cee2c..e7a448b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,3 +41,26 @@ clean:
 
 distclean: clean
        -make -C libjte distclean
+
+# Create source tarball from git. Complicated some - do autoconf dance
+# in there too
+gitdist:       Makefile
+               @VERSION=$$(git describe | awk '{gsub("^.*/","");gsub("^v","");print $$0}'); \
+               echo "VERSION is $$VERSION"; \
+               OUTPUT="jigit-$$VERSION"; \
+               WD=$$(pwd); \
+               if [ -e "../$$OUTPUT.tar.xz" ]; then \
+                echo "../$$OUTPUT.tar.xz exists - delete it first"; \
+                exit 1; \
+               fi ; \
+               if [ -d "../$$OUTPUT" ]; then \
+                echo "../$$OUTPUT exists - delete it first"; \
+                exit 1; \
+               fi ; \
+               echo "Creating working dir in ../$$OUTPUT"; \
+               git archive --format=tar --prefix="$$OUTPUT/" HEAD | tar -C .. -xf - ; \
+               echo "Running autoconf then cleanup in ../$$OUTPUT"; \
+               cd ../$$OUTPUT/libjte && ./bootstrap && rm -rf autom4te.cache && cd $$WD; \
+               echo "Creating dist tarball in ../$$OUTPUT.tar.xz"; \
+               tar -C .. -c --xz -f ../$$OUTPUT.tar.xz $$OUTPUT; rm -rf ../$$OUTPUT
+