From efc1684daa63fbb27ccef5b7a6621af4232a3f95 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 11 Nov 2014 23:00:35 -0800 Subject: Makefile: Added tarball target. --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Makefile') 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) -- cgit v1.2.3