From 97db4ed6eb497bc1e780915d4ae2f13c903eaa1a Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr" Date: Wed, 18 Mar 2020 17:10:36 -0700 Subject: [PATCH] docs: make ./waf --doxygen-no-build actually work Make doxygen.warnings.report.sh attempt to run print-introspected-doxygen, but not fail if p-i-d hasn't been built. --- doc/doxygen.conf | 6 ++++-- doc/doxygen.warnings.report.sh | 23 ++++++++++++++++------- wscript | 6 +----- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/doc/doxygen.conf b/doc/doxygen.conf index 0ca7eca01..d7c85f5de 100644 --- a/doc/doxygen.conf +++ b/doc/doxygen.conf @@ -1,4 +1,4 @@ -## -*-sh-*- +## -*- Mode:sh; indent-tabs-mode:nil -*- # Doxyfile 1.8.9.1 @@ -2075,7 +2075,9 @@ EXPAND_AS_DEFINED = ATTRIBUTE_ACCESSOR_DEFINE \ ATTRIBUTE_VALUE_DEFINE \ ATTRIBUTE_VALUE_DEFINE_WITH_NAME \ ATTRIBUTE_VALUE_IMPLEMENT \ - ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME + ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME \ + NS_UNUSED_GLOBAL \ + # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have diff --git a/doc/doxygen.warnings.report.sh b/doc/doxygen.warnings.report.sh index 1901e4942..b57c5418e 100755 --- a/doc/doxygen.warnings.report.sh +++ b/doc/doxygen.warnings.report.sh @@ -93,14 +93,20 @@ function status_report { local status="$1" local long_msg="$2" + local exitonerr="${3:-yes}" if [ $status -eq 0 ]; then verbose "$long_msg " "done." rm -f $VERBLOG else - verbose "$long_msg " "FAILED. Details:" - cat $VERBLOG - rm -f $VERBLOG - exit 1 + if [ $exitonerr == "yes" ]; then + verbose "$long_msg " "FAILED. Details:" + cat $VERBLOG + rm -f $VERBLOG + exit 1 + else + verbose "$long_msg " "FAILED, continuing" + rm -f $VERBLOG + fi fi } @@ -196,7 +202,11 @@ if [ $skip_doxy -eq 1 ]; then else if [ $skip_intro -eq 1 ]; then - verbose "" "Skipping ./waf build and print-introspected-doxygen." + verbose "" "Skipping ./waf build" + verbose -n "Trying print-introspected-doxygen..." + (cd "$ROOT" && ./waf --run-no-build print-introspected-doxygen >doc/introspected-doxygen.h >&6 2>&6 ) + status_report $? "./waf --run print-introspected-doxygen" noexit + else # Run introspection, which may require a build verbose -n "Building..." @@ -204,8 +214,7 @@ else status_report $? "./waf build" verbose -n "Running print-introspected-doxygen..." (cd "$ROOT" && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h >&6 2>&6 ) - status_report $? "./waf --run print-introspected-doxygen" - + status_report $? "./waf --run print-introspected-doxygen" fi # Modify doxygen.conf to generate all the warnings diff --git a/wscript b/wscript index bc7a96b83..32affc44e 100644 --- a/wscript +++ b/wscript @@ -1061,10 +1061,6 @@ def build(bld): _doxygen(bld, skip_pid=True) raise SystemExit(0) - if Options.options.docset_build: - _docset(bld) - raise SystemExit(0) - if Options.options.run_no_build: # Check that the requested program name is valid program_name, dummy_program_argv = wutils.get_run_program(Options.options.run_no_build, wutils.get_command_template(bld.env)) @@ -1232,7 +1228,7 @@ class Ns3ShellContext(Context.Context): wutils.run_argv([shell], env, os_env) -def _print_introspected_doxygen (bld): +def _print_introspected_doxygen(bld): try: program_obj = wutils.find_program('print-introspected-doxygen', env) except ValueError: