Commit 55a524cf authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

org: detect C++ errors

* doc/org/ Save error messages.
* doc/ Display them at the end of the compilation.
parent f9eefdc2
......@@ -57,9 +57,12 @@ dist_pkgdata_DATA = $(srcdir)/spot.tag
.PHONY: org org-man
cd $(top_builddir) && $(MAKE) doc/org/init.el
rm -rf $(srcdir)/userdoc
rm -rf $(srcdir)/userdoc $(builddir)/org/org.errors
$(MAKE) org-man org/plantuml.jar
$(EMACS) --batch -Q -l org/init.el
if test -s $(builddir)/org/org.errors; then \
cat $(builddir)/org/org.errors; exit 1; \
else :; fi
wget -O org/plantuml.jar || curl -o org/plantuml.jar
# This is a wrapper around the compiler, to ensure that the code
# example run from the org-mode file are all linked with Spot.
exec @top_builddir@/libtool link @CXX@ -std=c++11 -Wall \
-I@abs_top_builddir@ -I@abs_top_srcdir@ -I@abs_top_srcdir@/buddy/src \
"$@" @abs_top_builddir@/spot/
# Also we save errors to org.errors, so that we can detect issues
# after org-mode has exported everything. Otherwise these errors
# would go undetected.
@top_builddir@/libtool link @CXX@ @CXXFLAGS@ -Wall -Werror \
-I@abs_top_builddir@ -I@abs_top_srcdir@ -I@abs_top_srcdir@/buddy/src \
"$@" @abs_top_builddir@/spot/ 2> errors.$$
if test $code -ne 0 && test -s errors.$$; then
cat errors.$$ >>org.errors
cat errors.$$ >&2
rm -f errors.$$
exit $code
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment