build: doc: `make` generates requested documentation
cover build: doc: `make` generates requested documentation
This patch mirrors all the documentation-related build changes in libnetfilter_queue, including
https://patchwork.ozlabs.org/project/netfilter-devel/patch/[email protected]/
which is not yet applied at time of writing.
Because all the changes are applied at once, the diffs are cleaner, f.i. configure.ac has one changed line and 3 blocks of insertions.
Duncan Roe (1):
build: doc: make generates requested documentation
.gitignore | 2 +- Makefile.am | 2 +- autogen.sh | 8 ++++ configure.ac | 58 +++++++++++++++++++++++- doxygen/Makefile.am | 39 ++++++++++++++++ doxygen.cfg.in => doxygen/doxygen.cfg.in | 9 ++-- 6 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 doxygen/Makefile.am rename doxygen.cfg.in => doxygen/doxygen.cfg.in (76%)
Signature · 1 line
2.17.5
PATCH 1/1 build: doc: `make` generates requested documentation
Generate man pages, HTML, neither or both according to ./configure. Based on the work done for libnetfilter_queue
Signed-off-by Duncan Roe <[email protected]>
--- .gitignore | 2 +- Makefile.am | 2 +- autogen.sh | 8 ++++ configure.ac | 58 +++++++++++++++++++++++- doxygen/Makefile.am | 39 ++++++++++++++++ doxygen.cfg.in => doxygen/doxygen.cfg.in | 9 ++-- 6 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 doxygen/Makefile.am rename doxygen.cfg.in => doxygen/doxygen.cfg.in (76%)
.gitignore +1 -1
@@ -13,6 +13,6 @@ Makefile.in /configure /libtool -/doxygen/ +/build_man.sh /doxygen.cfg /*.pc
Makefile.am +1 -1
@@ -1,4 +1,4 @@ -SUBDIRS = include src utils +SUBDIRS = include src utils doxygen ACLOCAL_AMFLAGS = -I m4
autogen.sh +8 -0
@@ -1,4 +1,12 @@ #!/bin/sh -e +# Allow to override build_man.sh url for local testing +# E.g. export NFQ_URL=file:///usr/src/libnetfilter_queue +NFQ_URL=${NFQ_URL:-https://git.netfilter.org/libnetfilter_queue/plain} + +curl $NFQ_URL/doxygen/build_man.sh -O +chmod a+x build_man.sh +mv build_man.sh doxygen/ + autoreconf -fi rm -Rf autom4te.cache
configure.ac +57 -1
71 lines not on this page · raw message
doxygen/Makefile.am new file +39 -0
@@ -0,0 +1,39 @@ +if HAVE_DOXYGEN + +doc_srcs = $(top_srcdir)/src/libnetfilter_log.c\ + $(top_srcdir)/src/nlmsg.c\ + $(top_srcdir)/src/libipulog_compat.c + +doxyfile.stamp: $(doc_srcs) Makefile + rm -rf html man + doxygen doxygen.cfg >/dev/null + +if BUILD_MAN + $(abs_top_srcdir)/doxygen/build_man.sh +endif + + touch doxyfile.stamp + +CLEANFILES = doxyfile.stamp + +all-local: doxyfile.stamp +clean-local: + rm -rf man html +install-data-local: +if BUILD_MAN + mkdir -p $(DESTDIR)$(mandir)/man3 + cp --no-dereference --preserve=links,mode,timestamps man/man3/*.3\ + $(DESTDIR)$(mandir)/man3/ +endif +if BUILD_HTML + mkdir -p $(DESTDIR)$(htmldir) + cp --no-dereference --preserve=links,mode,timestamps html/*\ + $(DESTDIR)$(htmldir) +endif + +# make distcheck needs uninstall-local +uninstall-local: + rm -rf $(DESTDIR)$(mandir) man html doxyfile.stamp $(DESTDIR)$(htmldir) +endif + +EXTRA_DIST = build_man.sh
doxygen/doxygen.cfg.in renamed from doxygen.cfg.in +5 -4
@@ -1,12 +1,11 @@ # Difference with default Doxyfile 1.8.20 PROJECT_NAME = @PACKAGE@ PROJECT_NUMBER = @VERSION@ -OUTPUT_DIRECTORY = doxygen ABBREVIATE_BRIEF = FULL_PATH_NAMES = NO TAB_SIZE = 8 OPTIMIZE_OUTPUT_FOR_C = YES -INPUT = . +INPUT = @abs_top_srcdir@/src FILE_PATTERNS = *.c RECURSIVE = YES EXCLUDE_SYMBOLS = nflog_g_handle \
@@ -18,7 +17,9 @@ SOURCE_BROWSER = YES ALPHABETICAL_INDEX = NO GENERATE_LATEX = NO LATEX_CMD_NAME = latex -GENERATE_MAN = YES -HAVE_DOT = YES +GENERATE_MAN = @GEN_MAN@ +GENERATE_HTML = @GEN_HTML@ +MAN_LINKS = YES +HAVE_DOT = @HAVE_DOT@ DOT_TRANSPARENT = YES SEARCHENGINE = NO
Signature · 1 line
2.17.5