summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-12 12:58:01 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-12 12:58:01 -0800
commit7adaaaba5522a5bc583e6ae37d0158a85018f5bb (patch)
treed1a1d65aa17828ede24a0c5a75cabf3932d4aa20 /Makefile
parentc4047377582bfcd33c882b0126a234e7c30a2fb6 (diff)
Use a more portable way of determining SPECVERSION.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a608fc3..292880d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,11 @@ DATADIR?=data
BUILDDIR?=build
SPEC=spec.txt
SITE=_site
+SPECVERSION=`perl -ne 'print $$1 if /^version: *([0-9.]+)/' $(SPEC)`
PKGDIR?=cmark-$(SPECVERSION)
-SRCFILES=$(shell git ls-tree --full-tree -r HEAD --name-only $(SRCDIR))
TARBALL?=cmark-$(SPECVERSION).tar.gz
FUZZCHARS?=2000000 # for fuzztest
PROG?=$(BUILDDIR)/src/cmark
-SPECVERSION=$(shell grep version: $(SPEC) | sed -e 's/version: *//')
BENCHINP?=README.md
JSMODULES=$(wildcard js/lib/*.js)
@@ -34,11 +33,13 @@ debug:
cmake .. -DCMAKE_BUILD_TYPE=Debug; \
make
-tarball: spec.html
+tarball: spec.html $(SRCDIR)/scanners.c
rm -rf $(PKGDIR); \
mkdir -p $(PKGDIR)/man/man1; \
mkdir -p $(PKGDIR)/$(SRCDIR)/html; \
- for f in $(SRCFILES); do cp $$f $(PKGDIR)/$$f; done; \
+ srcfiles=`git ls-tree --full-tree -r HEAD --name-only $(SRCDIR)`; \
+ for f in $$srcfiles; do cp -a $$f $(PKGDIR)/$$f; done; \
+ cp -a $(SRCDIR)/scanners.c $(PKGDIR)/$(SRCDIR)/; \
cp spec.html $(PKGDIR); \
cp CMakeLists.txt $(PKGDIR); \
perl -ne '$$p++ if /^### JavaScript/; print if (!$$p)' Makefile > $(PKGDIR)/Makefile; \