diff options
author | Duncan Roe <duncan_roe@optusnet.com.au> | 2021-10-17 12:39:51 +1100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-10-27 10:14:54 +0200 |
commit | 74576db959cbb762780fdc3feadf6778a62c955b (patch) | |
tree | b4e4a66a4450a2b5fbe02759ed2dd977db961123 /doxygen/Makefile.am | |
parent | 826d412956d263ba0c05a1af52c5d78abfccae21 (diff) |
build: doc: `make` generates requested documentation
Generate man pages, HTML, neither or both according to ./configure.
Based on the work done for libnetfilter_queue.
[ This patch updates the default ./configure option to build the
manpages in case that doxygen is available. ]
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'doxygen/Makefile.am')
-rw-r--r-- | doxygen/Makefile.am | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am new file mode 100644 index 0000000..582db4e --- /dev/null +++ b/doxygen/Makefile.am @@ -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 |