[gtk-doc] gtkdoc-mkhtml: Don't swallow error messages from xsltproc
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] gtkdoc-mkhtml: Don't swallow error messages from xsltproc
- Date: Thu, 24 Nov 2016 17:32:11 +0000 (UTC)
commit cdc49f68b91509ecba1817f535ac1073fc7506ae
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Mon Nov 21 20:12:59 2016 +0000
gtkdoc-mkhtml: Don't swallow error messages from xsltproc
The stderr output from `xsltproc` was being redirected to a file named
profile.txt unconditionally. This meant that if the input XML file had
some errors, gtkdoc-mkhtml would hide the error messages in profile.txt
rather than displaying them to the caller.
Now stderr is only redirected if profiling was actually enabled.
https://bugzilla.gnome.org/show_bug.cgi?id=774812
gtkdoc-mkhtml.in | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
index 4e6e30e..4866439 100644
--- a/gtkdoc-mkhtml.in
+++ b/gtkdoc-mkhtml.in
@@ -68,22 +68,24 @@ else
styledir=$gtkdocdir
fi
-# profiling
-profile_args=""
-if test "$GTKDOC_PROFILE" != ""; then
- profile_args="--profile"
-fi
-
# We need to use a wrapper because there's no other way to conditionally pass
# a `--path $searchpath` argument with proper quoting for the path
run_xsltproc() {
# we could do "$path_option $PWD "
# to avoid needing rewriting entities that are copied from the header
# into docs under xml
- if test "X$searchpath" = "X"; then
- @XSLTPROC@ 2>profile.txt $profile_args "$@"
+ if test "$GTKDOC_PROFILE" == ""; then
+ if test "X$searchpath" = "X"; then
+ @XSLTPROC@ "$@"
+ else
+ @XSLTPROC@ --path "$searchpath" "$@"
+ fi
else
- @XSLTPROC@ 2>profile.txt $profile_args --path "$searchpath" "$@"
+ if test "X$searchpath" = "X"; then
+ @XSLTPROC@ 2>profile.txt --profile "$@"
+ else
+ @XSLTPROC@ 2>profile.txt --profile --path "$searchpath" "$@"
+ fi
fi
}
@@ -97,8 +99,6 @@ run_xsltproc --nonet --xinclude \
# profiling
if test "$GTKDOC_PROFILE" != ""; then
cat profile.txt | gprof2dot.py -e 0.01 -n 0.01 | dot -Tpng -o profile.png
-else
- rm profile.txt
fi
# copy navigation images and stylesheets to html directory ...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]