org: detect C++ errors
* doc/org/g++wrap.in: Save error messages. * doc/Makefile.am: Display them at the end of the compilation.
This commit is contained in:
parent
f9eefdc295
commit
55a524cf3c
2 changed files with 18 additions and 4 deletions
|
|
@ -57,9 +57,12 @@ dist_pkgdata_DATA = $(srcdir)/spot.tag
|
||||||
.PHONY: org org-man
|
.PHONY: org org-man
|
||||||
org:
|
org:
|
||||||
cd $(top_builddir) && $(MAKE) doc/org/init.el
|
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
|
$(MAKE) org-man org/plantuml.jar
|
||||||
$(EMACS) --batch -Q -l org/init.el
|
$(EMACS) --batch -Q -l org/init.el
|
||||||
|
if test -s $(builddir)/org/org.errors; then \
|
||||||
|
cat $(builddir)/org/org.errors; exit 1; \
|
||||||
|
else :; fi
|
||||||
|
|
||||||
org/plantuml.jar:
|
org/plantuml.jar:
|
||||||
wget http://downloads.sourceforge.net/project/plantuml/plantuml.jar -O org/plantuml.jar || curl http://downloads.sourceforge.net/project/plantuml/plantuml.jar -o org/plantuml.jar
|
wget http://downloads.sourceforge.net/project/plantuml/plantuml.jar -O org/plantuml.jar || curl http://downloads.sourceforge.net/project/plantuml/plantuml.jar -o org/plantuml.jar
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# This is a wrapper around the compiler, to ensure that the code
|
# This is a wrapper around the compiler, to ensure that the code
|
||||||
# example run from the org-mode file are all linked with Spot.
|
# example run from the org-mode file are all linked with Spot.
|
||||||
exec @top_builddir@/libtool link @CXX@ -std=c++11 -Wall \
|
#
|
||||||
|
# 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 \
|
-I@abs_top_builddir@ -I@abs_top_srcdir@ -I@abs_top_srcdir@/buddy/src \
|
||||||
"$@" @abs_top_builddir@/spot/libspot.la
|
"$@" @abs_top_builddir@/spot/libspot.la 2> errors.$$
|
||||||
|
code=$?
|
||||||
|
if test $code -ne 0 && test -s errors.$$; then
|
||||||
|
cat errors.$$ >>org.errors
|
||||||
|
cat errors.$$ >&2
|
||||||
|
fi
|
||||||
|
rm -f errors.$$
|
||||||
|
exit $code
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue