aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-11 12:25:30 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-11 12:25:30 -0800
commita5571189025387d8af0a2569576fadd3e65da543 (patch)
treef919756fc0ff47e8a33c8ffa6734d3f6815c0958 /Makefile
parent4f3b3d495ad43d85bd3c044873adf658c84b9966 (diff)
Removed circular build dependency, improved testarchive.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b26c664..0bea9af 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ JSMODULES=$(wildcard js/lib/*.js)
.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
-all: $(PROG)
+all: $(PROG) man/man3/cmark.3
@echo "Binaries can be found in $(BUILDDIR)/src"
$(PROG): $(BUILDDIR)
@@ -30,12 +30,12 @@ $(PROG): $(BUILDDIR)
check:
@cmake --version > /dev/null || (echo "You need cmake to build this program: http://www.cmake.org/download/" && exit 1)
-$(BUILDDIR): check $(SRCDIR)/html_unescape.h $(SRCDIR)/case_fold_switch.inc man/man3/cmark.3
+$(BUILDDIR): check $(SRCDIR)/html_unescape.h $(SRCDIR)/case_fold_switch.inc
mkdir -p $(BUILDDIR); \
cd $(BUILDDIR); \
cmake .. -G "$(GENERATOR)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-install: $(BUILDDIR)
+install: $(BUILDDIR) man/man3/cmark.3
make -C $(BUILDDIR) install
debug:
@@ -110,13 +110,17 @@ testtarball: $(TARBALL)
rm -rf $(PKGDIR); \
tar xvzf $(TARBALL); \
cd $(PKGDIR); \
- mkdir build && cd build && cmake .. && make && ctest -V
+ mkdir build && cd build && cmake .. && make && \
+ (ctest -V || \
+ (cat build/Testing/Temporary/LastTest.log && exit 1))
testziparchive: $(ZIPARCHIVE)
rm -rf $(PKGDIR); \
unzip $(ZIPARCHIVE); \
cd $(PKGDIR); \
- mkdir build && cd build && cmake .. && make && ctest -V
+ mkdir build && cd build && cmake .. && make && \
+ (ctest -V || \
+ (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]))' > $@