docs: make ./waf --doxygen-no-build actually work

This commit is contained in:
Peter D. Barnes, Jr
2020-03-10 18:08:22 -07:00
parent 57aabffff0
commit 2d190e1723

24
wscript
View File

@@ -1058,7 +1058,7 @@ def build(bld):
bld.env['PRINT_BUILT_MODULES_AT_END'] = False
if Options.options.doxygen_no_build:
_doxygen(bld)
_doxygen(bld, skip_pid=True)
raise SystemExit(0)
if Options.options.docset_build:
@@ -1232,15 +1232,7 @@ class Ns3ShellContext(Context.Context):
wutils.run_argv([shell], env, os_env)
def _doxygen(bld):
env = wutils.bld.env
proc_env = wutils.get_proc_env()
if not env['DOXYGEN']:
Logs.error("waf configure did not detect doxygen in the system -> cannot build api docs.")
raise SystemExit(1)
return
def _print_introspected_doxygen (bld):
try:
program_obj = wutils.find_program('print-introspected-doxygen', env)
except ValueError:
@@ -1268,6 +1260,18 @@ def _doxygen(bld):
raise SystemExit(1)
text_out.close()
def _doxygen(bld, skip_pid=False):
env = wutils.bld.env
proc_env = wutils.get_proc_env()
if not env['DOXYGEN']:
Logs.error("waf configure did not detect doxygen in the system -> cannot build api docs.")
raise SystemExit(1)
return
if not skip_pid:
_print_introspected_doxygen(bld)
_getVersion()
doxygen_config = os.path.join('doc', 'doxygen.conf')
if subprocess.Popen(env['DOXYGEN'] + [doxygen_config]).wait():