aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-11-11 10:38:10 -0500
committerNick Mathewson <nickm@torproject.org>2019-11-11 10:38:10 -0500
commit2b3dc3384c41a1e8961b9303b5fa533edf4922c3 (patch)
treef8a7b29a146c4148527a6eeba655379baf1c14e7
parentee33bf5ee0d1a2c88d185caa29e1924f919cc3e9 (diff)
parentb1083584c752398056a591fb9b342f4e58e6b172 (diff)
downloadtor-2b3dc3384c41a1e8961b9303b5fa533edf4922c3.tar.gz
tor-2b3dc3384c41a1e8961b9303b5fa533edf4922c3.zip
Merge branch 'ticket32385'
-rw-r--r--Doxyfile.in4
-rw-r--r--changes/ticket323856
-rw-r--r--configure.ac18
3 files changed, 26 insertions, 2 deletions
diff --git a/Doxyfile.in b/Doxyfile.in
index 962ea6fc93..5dbe4500eb 100644
--- a/Doxyfile.in
+++ b/Doxyfile.in
@@ -767,7 +767,7 @@ WARNINGS = YES
# will automatically be disabled.
# The default value is: YES.
-WARN_IF_UNDOCUMENTED = YES
+WARN_IF_UNDOCUMENTED = @DOXYGEN_WARN_ON_MISSING@
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some parameters
@@ -790,7 +790,7 @@ WARN_NO_PARAMDOC = NO
# a warning is encountered.
# The default value is: NO.
-WARN_AS_ERROR = NO
+WARN_AS_ERROR = @DOXYGEN_FATAL_WARNINGS@
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
diff --git a/changes/ticket32385 b/changes/ticket32385
new file mode 100644
index 0000000000..2ff76be267
--- /dev/null
+++ b/changes/ticket32385
@@ -0,0 +1,6 @@
+ o Minor features (doxygen):
+ - Our "make doxygen" target now respects --enable-fatal-warnings by
+ default, and does not warn about items that are missing documentation.
+ To warn about missing documentation, run configure with the
+ "--enable-missing-doc-warnings" flag: doing so suspends fatal warnings
+ for doxygen. Closes ticket 32385.
diff --git a/configure.ac b/configure.ac
index 3a98a4a32c..afbf436f7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,24 @@ AC_ARG_ENABLE(nss,
AC_ARG_ENABLE(pic,
AS_HELP_STRING(--enable-pic, [Build Tor's binaries as position-independent code, suitable to link as a library.]))
+AC_ARG_ENABLE(missing-doc-warnings,
+ AS_HELP_STRING(--enable-missing-doc-warnings, [Tell doxygen to warn about missing documentation. Makes doxygen warnings nonfatal.]))
+
+if test "$enable_missing_doc_warnings" = "yes"; then
+ DOXYGEN_FATAL_WARNINGS=NO
+ DOXYGEN_WARN_ON_MISSING=YES
+elif test "$enable_fatal_warnings" = "yes"; then
+ # Fatal warnings from doxygen are nice, but not if we're warning about
+ # missing documentation.
+ DOXYGEN_FATAL_WARNINGS=YES
+ DOXYGEN_WARN_ON_MISSING=NO
+else
+ DOXYGEN_FATAL_WARNINGS=NO
+ DOXYGEN_WARN_ON_MISSING=NO
+fi
+AC_SUBST(DOXYGEN_FATAL_WARNINGS)
+AC_SUBST(DOXYGEN_WARN_ON_MISSING)
+
if test "x$enable_coverage" != "xyes" -a "x$enable_asserts_in_tests" = "xno" ; then
AC_MSG_ERROR([Can't disable assertions outside of coverage build])
fi