summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cbc2251..f31473d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,13 @@ BENCHINP?=README.md
JSMODULES=$(wildcard js/lib/*.js)
SPEC=spec.txt
SITE=_site
+PKGDIR=cmark-$(SPECVERSION)
BUILDDIR=build
FUZZCHARS?=2000000 # for fuzztest
PROG?=$(BUILDDIR)/src/cmark
+SPECVERSION=$(shell grep version: $(SPEC) | sed -e 's/version: *//')
-.PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug
+.PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug tarball
all: $(BUILDDIR)
@cmake --build $(BUILDDIR) || (echo "You need cmake to build this program: http://www.cmake.org/download/" && exit 1)
@@ -27,6 +29,14 @@ debug:
cmake .. -DCMAKE_BUILD_TYPE=Debug; \
cmake --build .
+tarball:
+ rm -rf $(PKGDIR); \
+ mkdir -p $(PKGDIR)/man/man1; \
+ cp -r src/* $(PKGDIR)/; \
+ cp man/man1/cmark.1 $(PKGDIR)/man/man1/; \
+ cp README.md LICENSE spec.txt runtests.pl $(PKGDIR)/; \
+ tar cvzf cmark-$(SPECVERSION).tar.gz $(PKGDIR)
+
clean:
rm -rf $(BUILDDIR)