summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-11 23:00:35 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-11 23:00:35 -0800
commitefc1684daa63fbb27ccef5b7a6621af4232a3f95 (patch)
tree87d2e6df79b4a256d3c825f4b3cad181593e019b /Makefile
parent248841d485647bf2981712aa22f8720e89eccf73 (diff)
Makefile: Added tarball target.
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)