cmark

My personal build of CMark ✏️

Commit
efc1684daa63fbb27ccef5b7a6621af4232a3f95
Parent
248841d485647bf2981712aa22f8720e89eccf73
Author
John MacFarlane <jgm@berkeley.edu>
Date

Makefile: Added tarball target.

Diffstat

1 file changed, 11 insertions, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified Makefile 12 11 1
diff --git 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)