mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Various changes to documentation framework.
- Reorganize top-level 'doc' Makefile target so submodules can easily add their own doc-generating routines to it. e.g. the Bro project makes a placeholder 'doc' target, then adds 'restdoc', 'sphinxdoc'; later Broccoli can add it's own target as a dependency for generating API docs. - Fixed generated docs for BIFs not being organized under a base/ subdirectory like the original source files. - Fixed documentation style for function parameters not applying to functions declared as record fields. - Misc. script documentation tweaks to address warnings given by Sphinx.
This commit is contained in:
parent
eda2245e9e
commit
80e154ba3c
13 changed files with 137 additions and 43 deletions
|
@ -212,9 +212,9 @@ add_custom_target(restclean
|
|||
${RST_OUTPUT_DIR}
|
||||
VERBATIM)
|
||||
|
||||
# The "doc" target generates reST documentation for any outdated bro scripts
|
||||
# and then uses Sphinx to generate HTML documentation from the reST
|
||||
add_custom_target(doc
|
||||
# The "sphinxdoc" target generates reST documentation for any outdated bro
|
||||
# scripts and then uses Sphinx to generate HTML documentation from the reST
|
||||
add_custom_target(sphinxdoc
|
||||
# copy the template documentation to the build directory
|
||||
# to give as input for sphinx
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory
|
||||
|
@ -252,13 +252,16 @@ add_custom_target(doc
|
|||
# SOURCES just adds stuff to IDE projects as a convenience
|
||||
SOURCES ${DOC_SOURCES})
|
||||
|
||||
# The "docclean" target removes just the Sphinx input/output directories
|
||||
# The "sphinxclean" target removes just the Sphinx input/output directories
|
||||
# from the build directory.
|
||||
add_custom_target(docclean
|
||||
add_custom_target(sphinxclean
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory
|
||||
${DOC_SOURCE_WORKDIR}
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory
|
||||
${DOC_OUTPUT_DIR}
|
||||
VERBATIM)
|
||||
|
||||
add_dependencies(doc docclean restdoc)
|
||||
add_dependencies(sphinxdoc sphinxclean restdoc)
|
||||
|
||||
add_dependencies(doc sphinxdoc)
|
||||
add_dependencies(docclean sphinxclean restclean)
|
||||
|
|
|
@ -16,13 +16,13 @@ rest_target(${CMAKE_CURRENT_SOURCE_DIR} example.bro internal)
|
|||
rest_target(${psd} base/init-default.bro internal)
|
||||
rest_target(${psd} base/init-bare.bro internal)
|
||||
|
||||
rest_target(${CMAKE_BINARY_DIR}/src/base bro.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src/base const.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src/base event.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src/base logging.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src/base reporter.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src/base strings.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src/base types.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src base/bro.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src base/const.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src base/event.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src base/logging.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src base/reporter.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src base/strings.bif.bro)
|
||||
rest_target(${CMAKE_BINARY_DIR}/src base/types.bif.bro)
|
||||
rest_target(${psd} base/frameworks/cluster/main.bro)
|
||||
rest_target(${psd} base/frameworks/cluster/nodes/manager.bro)
|
||||
rest_target(${psd} base/frameworks/cluster/nodes/proxy.bro)
|
||||
|
@ -33,6 +33,7 @@ rest_target(${psd} base/frameworks/control/main.bro)
|
|||
rest_target(${psd} base/frameworks/dpd/main.bro)
|
||||
rest_target(${psd} base/frameworks/intel/main.bro)
|
||||
rest_target(${psd} base/frameworks/logging/main.bro)
|
||||
rest_target(${psd} base/frameworks/logging/postprocessors/scp.bro)
|
||||
rest_target(${psd} base/frameworks/logging/writers/ascii.bro)
|
||||
rest_target(${psd} base/frameworks/metrics/cluster.bro)
|
||||
rest_target(${psd} base/frameworks/metrics/main.bro)
|
||||
|
@ -101,6 +102,7 @@ rest_target(${psd} policy/integration/barnyard2/main.bro)
|
|||
rest_target(${psd} policy/integration/barnyard2/types.bro)
|
||||
rest_target(${psd} policy/misc/analysis-groups.bro)
|
||||
rest_target(${psd} policy/misc/loaded-scripts.bro)
|
||||
rest_target(${psd} policy/misc/pf-ring-load-balancing.bro)
|
||||
rest_target(${psd} policy/misc/profiling.bro)
|
||||
rest_target(${psd} policy/misc/trim-trace-file.bro)
|
||||
rest_target(${psd} policy/protocols/conn/known-hosts.bro)
|
||||
|
|
|
@ -73,7 +73,7 @@ bifs=`( cd ${sourcedir}/src && find . -name \*\.bif | sort )`
|
|||
for file in $bifs
|
||||
do
|
||||
f=${file:2}.bro
|
||||
echo "rest_target(\${CMAKE_BINARY_DIR}/src/base $f)" >> $outfile
|
||||
echo "rest_target(\${CMAKE_BINARY_DIR}/src base/$f)" >> $outfile
|
||||
done
|
||||
|
||||
scriptfiles=`( cd ${sourcedir}/scripts && find . -name \*\.bro | sort )`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue