summaryrefslogtreecommitdiffstats
path: root/doxygen
Commit message (Collapse)AuthorAgeFilesLines
* build: doc: Fix silly error in testDuncan Roe2025-03-111-1/+1
| | | | | | | | | | Without this patch, the doxygen bug workaround in the previous commit is ineffective since the test for doxygen's being a target version always fails. Fixes: 60aa4279fabf ("build: doc: Fix `fprintf` in man pages from using single quotes") Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Fix `fprintf` in man pages from using single quotesDuncan Roe2025-01-061-2/+15
| | | | | | | | | | | | For example, `man nfq_open` shows fprintf(stderr, 'error during nfq_open()\n'); where the single-quotes should be double-quotes (and are in the HTML). This doxygen bug appeared in doxygen 1.9.2. It is fixed in doxygen 1.13.0 (not yet released). Fixes: 088c883bd1ca ("build: doc: Update build_man.sh for doxygen 1.9.2") Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Only fix rendering of verbatim '\n"' when neededDuncan Roe2025-01-061-1/+8
| | | | | | | | | | | | | commit 9f52afa60839 ("build: doc: Fix rendering of verbatim '\n"' in man pages") worked around a doxygen bug which was fixed at doxygen 1.9. Applying the workaround to output from a fixed doxygen version reintroduced the bug. Update build_man.sh to record doxygen version and only apply workaround if that version is broken. Fixes: 9f52afa60839 ("build: doc: Fix rendering of verbatim '\n"' in man pages") Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: add missing backslash to build_man.shDuncan Roe2024-10-121-1/+1
| | | | | | | | | | Search for exact match of ".RI" had a '\' to escape '.' from the regexp parser but was missing another '\' to escape the 1st '\' from shell. Had not yet caused a problem but might as well do things correctly. Fixes: 6d17e6daa1757 ("build: Speed up build_man.sh") Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Phil Sutter <phil@nwl.cc>
* doc: Install libnetfilter_queue.7 man pageDuncan Roe2024-09-151-1/+3
| | | | | | | | doxygen/Makefile.am now installs libnetfilter_queue.7 in the man tree. Fixes: b35f537bd69b ("make the HTML main page available as `man 7 libnetfilter_queue`") Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: Speed up build_man.shDuncan Roe2024-08-151-130/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build_man.sh runs more than 10x as fast as it used to on a system with 16 cpus, and over 3x as fast on a system with 2 cpus. Overall cpu use is reduced to about half what it was on any system. Much of this comes from using ed in place of head, tail, cut &c. Using ed eliminates having to have temp files, so edits can be backgrounded to reduce elapsed time. Specifics: - Split off inserting "See also" from make_man7(). make_man7 had its own for loop over real man pages to insert "See also" lines. Put the code in a function and call it from the for loop in post_process() instead. Eliminates `find man/man3 -type f` which depended on make_symlinks(). - Background make_symlinks now it has no dependants. - Re-implement rename_real_pages(). Use ed to extract the name of the first documented function from each real man page instead of using grep in a for loop over the man links. - del_bogus_synopsis() removes the lines that del_modules() would, so run del_bogus_synopsis first and only run del_modules if del_bogus_synopsis fails to delete anything (doxygen older than 1.8.20). - Run make_man7() in background early on. - Modify fix_name_line() to not use the temp files and background it. fix_name_line still needs to work on a shortened target file but use ../$target.tmp instead of $fileC. (Put the uniquely-named temp file in parent directory so as to not disturb `ls -S`). - Streamline mygrep to not use any files and only return linnum. Only fix_name_line used the found line in $fileG. Signed-off-by: Florian Westphal <fw@strlen.de>
* make the HTML main page available as `man 7 libnetfilter_queue`Duncan Roe2023-10-082-6/+101
| | | | | | | | | | | | | | | | | | | Without this patch, man page users can miss important general information. The HTML display stays as it was. The man3 pages are updated to reference libnetfilter_queue.7. build_man.sh must be invoked with arguments to activate man7 generation, so will continue to work in other projects as before. build_man.sh remains generic, so should be able to make man7 pages for other netfilter projects. v2: Change commit message from "how" to "why" v3: Confine man page generation to build_man.sh per Pablo request; Add build_man.sh to doxyfile.stamp dependencies (should have always been) Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Fix doxygen obsolete option warningDuncan Roe2023-03-151-1/+0
| | | | | | | doxygen 1.9.5 complains about DOT_TRANSPARENT, removed. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Update build_man.sh to find bash in PATHDuncan Roe2022-09-211-1/+2
| | | | | | | | | | | The use of /bin/bash has been reported as a problem during a cross build of libmnl with a build system running macOS or BSD. build_man.sh is intended to be usable in a build, so don't start with #!/bin/bash. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Update build_man.sh for doxygen 1.9.2Duncan Roe2022-01-091-1/+1
| | | | | | | | | | | | Function del_def_at_lines() removes lines of the form: Definition at line <nnn> of file ... At doxygen 1.9.2, <nnn> is displayed in bold, so upgrade the regex to match an optional bold / normal pair around <nnn> Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Allow to specify whether to produce man pages, html, neither or bothDuncan Roe2021-10-272-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | New default action is: run doxygen (if installed) to produce man pages only. This adds 124 KB to the build tree (and to the install tree, after `make install`). For finer control of built documentation, the old --with-doxygen configure option is removed. Instead there are 2 new options: --enable-html-doc # +1160 KB --disable-man-pages # -124 KB If doxygen is not installed, configure outputs a warning that man pages will not be built. configure --disable-man-pages avoids this warning. After --enable-html-doc - `make install` installs built pages in htmldir instead of just leaving them in the build tree. - If the 'dot' program is not installed, configure outputs a warning that interactive diagrams will be missing and to install graphviz to get them. (There is an interactive diagram at the head of some modules, e.g. User-space network packet buffer). [ a few configure.ac edits to keep it in sync with libnetfilter_log --pablo] Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: build: Stop build_man.sh from deleting short Detailed DescriptionsDuncan Roe2021-09-201-1/+5
| | | | | | | | An empty Detailed Description is 3 lines long but a short (1-para) DD is also 3 lines. Check that the 3rd line really is empty. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Fix rendering of verbatim '\n"' in man pagesDuncan Roe2021-09-061-0/+4
| | | | | | | Without this patch, '\n"' rendered as '0' in e.g. man nfq_create_queue Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Be sure to rerun doxygen after ./configureDuncan Roe2021-08-301-1/+1
| | | | | | | | doxygen/Makefile was erroneously depending on Makefile.am when it should have depended on itself. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Eliminate warning from ./autogen.shDuncan Roe2021-08-301-1/+9
| | | | | | | Replace shell function call with a list of sources Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: fix `make distcleancheck`Duncan Roe2021-08-281-1/+1
| | | | | | | `make distcleancheck` was not passing before this patchset. Now fixed. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Avoid having to special-case `make distcheck`Duncan Roe2021-08-282-11/+28
| | | | | | | | | | - Move doxygen.cfg.in to doxygen/ - Tell doxygen.cfg.in where the sources are - Let doxygen.cfg.in default its output to CWD - In Makefile, `doxygen doxygen.cfg` "just works" Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Add a man page post-processor to build_man.shDuncan Roe2021-08-281-5/+195
| | | | | | | | | | | | | | - If there is a "Modules" section, delete it - If "Detailed Description" is empty, delete "Detailed Description" line - Reposition SYNOPSIS (with headers that we inserted) to start of page, integrating with defined functions to look like other man pages - Delete all "Definition at line nnn" lines - Delete lines that make older versions of man o/p an unwanted blank line For better readability, shell function definitions are separated by blank lines, and there is a bit of annotation. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Split off man pages script from Makefile.amDuncan Roe2021-08-282-31/+32
| | | | | | | | | | | | | | | Split off shell script from within doxygen/Makefile.am into doxygen/build_man.sh. This patch by itself doesn't fix anything. The patch is only for traceability, because diff patch format is not very good at catching code updates and moving code together. Therefore the script is exactly as it was; it still looks a bit different because of having to un-double doubled-up $ signs, remove trailing ";/" and so on. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: get rid of the need for manual updating of MakefileDuncan Roe2021-08-011-61/+31
| | | | | | | | | | | | | | | | | There used to be 3 things in doxygen/Makefile.am that developers had to update: 1. The dependency list (i.e. all C sources) 2. The setgroup lines, which renamed each module man page to be the page for the first described function. setgroup also set the target for: 3. The add2group lines, which symlinked pages for other documented functions in the group. The new system eliminates all of the above. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: `make distcheck` passes with doxygen enabledDuncan Roe2021-05-021-2/+74
| | | | | | | | | | | The main fix is to move fixmanpages.sh to inside doxygen/Makefile.am. This means that in future, developers need to update doxygen/Makefile.am when they add new functions and source files, since fixmanpages.sh is deleted. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Acked-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: Fix man page name for new pkt_buff function for ICMPDuncan Roe2021-03-171-0/+1
| | | | | Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: build: Reduce size of doxygen.cfg and doxygen build o/pDuncan Roe2020-09-301-1/+1
| | | | | | | | | | | | | doxygen.cfg only needs to contain non-default options. Removing other options shaves 4KB (off a 5KB file). Also remove options that are obsolete at the latest doxygen release: PERL_PATH, MSCGEN_PATH and PAPER_TYPE=a4wide (defaults to a4). While being about it, send doxygen stdout to /dev/null to make (future) warnings easier to see. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: "make" builds & installs a full set of man pagesDuncan Roe2020-02-241-0/+23
This enables one to enter "man <any nfq function>" and get the appropriate group man page created by doxygen. - New makefile in doxygen directory. Rebuilds documentation if any sources change that contain doxygen comments, or if fixmanpages.sh changes - New shell script fixmanpages.sh which - Renames each group man page to the first function listed therein - Creates symlinks for subsequently listed functions (if any) - Deletes _* temp files - Update top-level makefile to visit new subdir doxygen - Update top-level configure to only build documentation if doxygen installed Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>