summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--Makefile46
2 files changed, 10 insertions, 42 deletions
diff --git a/.travis.yml b/.travis.yml
index e179160..d67dd57 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,9 +16,11 @@ before_install:
elif [ ${TRAVIS_OS_NAME:-'linux'} = 'osx' ]
then
brew update
- brew install python3
+ # We test on OSX without python3, to make sure that works
+ # brew install python3
brew install valgrind
fi
script:
- - make testtarball
+ - make
+ - make test
- PROG=`ls cmark-*.*/build/src/cmark` make leakcheck
diff --git a/Makefile b/Makefile
index 46f49f0..b77ab94 100644
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,10 @@ NUMRUNS?=10
PROG?=$(BUILDDIR)/src/cmark
BENCHINP?=README.md
JSMODULES=$(wildcard js/lib/*.js)
+VERSION?=$(SPECVERSION)
+RELEASE?=CommonMark-$(VERSION)
-.PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug mingw archive tarball ziparchive testarchive testtarball testziparchive testlib bench astyle
+.PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug mingw archive tarball ziparchive testtarball testziparchive testlib bench astyle
all: $(PROG) man/man3/cmark.3
@echo "Binaries can be found in $(BUILDDIR)/src"
@@ -53,28 +55,9 @@ mingw:
man/man3/cmark.3: src/cmark.h | $(PROG)
python3 man/make_man_page.py $< > $@ \
-archive: spec.html
- @rm -rf $(PKGDIR); \
- mkdir -p $(PKGDIR)/$(SRCDIR) \
- $(PKGDIR)/api_test $(PKGDIR)/man/man1 $(PKGDIR)/man/man3 \
- $(PKGDIR)/test $(PKGDIR)/data ; \
- srcfiles=`git ls-tree --full-tree -r HEAD --name-only $(SRCDIR) test api_test`; \
- for f in $$srcfiles; \
- do cp -a $$f $(PKGDIR)/$$f; \
- done; \
- cp -a $(SRCDIR)/scanners.c $(PKGDIR)/$(SRCDIR)/; \
- cp -a man/CMakeLists.txt man/make_man_page.py $(PKGDIR)/man;\
- cp -a man/man1/cmark.1 $(PKGDIR)/man/man1;\
- cp -a man/man3/cmark.3 $(PKGDIR)/man/man3;\
- cp -a data/CaseFolding-3.2.0.txt $(PKGDIR)/data/;\
- cp CMakeLists.txt $(PKGDIR); \
- perl -ne '$$p++ if /^### JavaScript/; print if (!$$p)' Makefile > $(PKGDIR)/Makefile; \
- cp -a Makefile.nmake nmake.bat $(PKGDIR); \
- cp -a README.md COPYING spec.txt spec.html $(PKGDIR)/; \
- tar czf $(TARBALL) $(PKGDIR); \
- zip -q -r $(ZIPARCHIVE) $(PKGDIR); \
- rm -rf $(PKGDIR) ; \
- echo "Created $(TARBALL) and $(ZIPARCHIVE)."
+archive:
+ git archive --prefix=$(RELEASE)/ -o $(RELEASE).tar.gz HEAD
+ git archive --prefix=$(RELEASE)/ -o $(RELEASE).zip HEAD
clean:
rm -rf $(BUILDDIR) $(MINGW_BUILDDIR) $(MINGW_INSTALLDIR) $(TARBALL) $(ZIPARCHIVE) $(PKGDIR)
@@ -102,23 +85,6 @@ $(TARBALL): archive
$(ZIPARCHIVE): archive
-testarchive: testtarball testziparchive
- rm -rf $(PKGDIR)
-
-testtarball: $(TARBALL)
- rm -rf $(PKGDIR); \
- tar xvzf $(TARBALL); \
- cd $(PKGDIR); \
- mkdir build && cd build && cmake .. && make -j2 && \
- (ctest || (cat build/Testing/Temporary/LastTest.log && exit 1))
-
-testziparchive: $(ZIPARCHIVE)
- rm -rf $(PKGDIR); \
- unzip $(ZIPARCHIVE); \
- cd $(PKGDIR); \
- mkdir build && cd build && cmake .. && make -j2 && \
- (ctest || (cat build/Testing/Temporary/LastTest.log && exit 1))
-
$(ALLTESTS): spec.txt
python3 test/spec_tests.py --spec $< --dump-tests | python3 -c 'import json; import sys; tests = json.loads(sys.stdin.read()); print("\n".join([test["markdown"] for test in tests]))' > $@