Commit graph

15 commits

Author SHA1 Message Date
Jon Siwek
4ac6d0ae2e Fixes for script auto-documentation.
- Fixing the parts of the `make restdoc` and `make doc` process that were
  broken by the last Bro script re-organization

- Generated documentation for Bro scripts derived from BiFs now use the
  original BiF source file as the "original source file" link

- Renaming of the internal POLICYDEST definition and other misc places that
  refer to "policy" scripts; that terminology doesn't make total sense now

- Added a documentation blacklist reminder test that will fail if there's
  scripts that are blacklisted from being documentated because they're still
  in progress

- Some minor Bro script changes to fix small @load dependency errors

Addresses #543
2011-08-08 19:50:45 -05:00
Seth Hall
d223637460 Small tweaks for doc generation.
- There is still a bug in that scripts loaded by core scripts don't
  get their path correctly figured out by Bro's documentation
  generation.
2011-08-06 00:40:30 -04:00
Jon Siwek
5a2cd265ab Update the generated script doc organization.
Added an additional master TOC index for Bro script packages that
automatically gets filled in at ``make doc`` time.  The master TOC
links to per-package indexes which contains links to all the scripts
contained within it along with their summary.  The per-package index
is also now automatically generated/derived from the path component
of the script passed into the rest_target() macro.
2011-06-30 16:58:20 -05:00
Jon Siwek
fe5f4b8e53 Changes to make generated script docs understand new policy/ hierarchy.
Added an arg to the search_for_files() util function that can return
the subpath of BROPATH's policy/ dir in which the loaded file is found.
This subpath is then used in both the the reST file's document title
(so that script's named e.g. "base.bro" actually have some context) and
in figuring out how to interlink with other generated docs of other
scripts that are found in @load directives.

I still need to overhaul things so the loading of "packages" is
documented in a meaningful way and that the CMake targets are able
to generate indexes for packages.
2011-06-30 11:37:15 -05:00
Jon Siwek
33f0c237ca Doc tweaks for new conn/contents.bro 2011-05-25 15:34:57 -05:00
Jon Siwek
d1cdc9f208 Generation of docs for http/detect-webapps.bro and depending scripts now works. 2011-05-18 11:51:06 -05:00
Jon Siwek
3a655c610c Add all new policy scripts to doc generation target.
Minor script tweaks along the way to get rid of reST format warnings
or @load dependency issues.
2011-05-17 11:15:09 -05:00
Jon Siwek
56a946568a More changes to how Bro generates docs for scripts in subdirs of BROPATH
The output reST filename now reflects the subdir information (by flattening
'/' path separators into the '^' character).  This is to prevent file name
conflicts when generated reST docs, but during the CMake 'doc' target to
build HTML docs, everything gets unflattened.
2011-05-16 20:17:58 -05:00
Jon Siwek
f70b5ece8c Add note to stub files used for grouping script docs. 2011-05-12 15:13:51 -05:00
Jon Siwek
650177cde0 DNS policy scripts documentation cleanup/tweaks. 2011-05-12 12:19:43 -05:00
Jon Siwek
68784634ff Fixing doc tests in the btest suite.
- reduce number of docs generated by `make doc`; will add as they're reviewed

- Conforming to new Notice::Type enum for notices
2011-05-12 11:21:20 -05:00
Jon Siwek
e2c194c990 Fix make doc CMake 2.8.3 incompatibility.
CMake 2.8.4 seems to be able to handle add_custom_target()
interdependencies with the DEPENDS arguments, but 2.8.3 does not.

Using add_dependencies() to create top-level target
dependencies works in both cases.
2011-05-10 11:03:56 -05:00
Jon Siwek
ceaba8077b Fixes related to make doc handling of script summary text (##! comments)
- Summary comments (##!) can now be placed at the beginning of
BiF files (but still outside C segments).  An issue was fixed where
these comments would mistakenly be transferred into the generated
.func_def file and cause a compile error. I completely removed writing
any opt_ws value into the .func_def file because it was currently not
writing anything besides whitespace.

- The generation of reST for the collecting of "groups" of policy
script documentation now happens at build time of `make doc` through the
use of a helper script rather than doing this at configure time so that
changes to summary text will always be reflected in the documentation.
2011-05-02 15:34:34 -05:00
Jon Siwek
f10d2e10ea Overhaul of "doc" build target for generating policy script documentation.
It's now all implemented in CMake scripting.

The generation of reST docs is now a distinct target, "restdoc", while
the target to generate HTML docs, "doc", depends on "restdoc".  reST doc
generation supports incremental builds (documentation for a given policy
script is only regenerated when it is out of date), but HTML doc generation
via ``make doc`` is not incremental (Sphinx always starts with fresh input).

Building the "restdoc" target is now covered by a btest to ensure all
policy scripts are parse-able when Bro is in "doc mode".

Generated reST docs should now support "@load"ing from subdirectories.  e.g.
"@load foo/baz" and "@load bar/baz" will now generate the right xref links.
2011-04-26 22:13:04 -05:00
Jon Siwek
4634d92394 Move stuff related to policy script documentation from doc/ to doc/scripts/ 2011-04-20 21:11:32 -05:00