From 7adaaaba5522a5bc583e6ae37d0158a85018f5bb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 12 Nov 2014 12:58:01 -0800 Subject: Use a more portable way of determining SPECVERSION. --- Makefile | 9 +++++---- 1 file 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; \ -- cgit v1.2.3