diff options
author | Joachim Nilsson <troglobit@gmail.com> | 2019-10-15 21:01:52 +0200 |
---|---|---|
committer | Joachim Nilsson <troglobit@gmail.com> | 2019-10-15 21:01:52 +0200 |
commit | b796e3bd8da504afa2bad17ad0c4b0d620fe1025 (patch) | |
tree | 99ba08918cb355cf927d93ea3c620686eebffe00 | |
parent | 3eb53ad1c2fe171869705f278d38fe579c31ad60 (diff) | |
download | libnet-b796e3bd8da504afa2bad17ad0c4b0d620fe1025.tar.gz |
Automate building of doc both from GIT and dist tarball
From both GIT and dist tarball:
- Build html and man automatically if enabled and doxygen is available
- Install html and man if enabled and built successfully, skip otherwise
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | doc/Makefile.am | 5 | ||||
-rw-r--r-- | doc/man/man3/Makefile.am | 7 |
3 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a7e5f97..83dd967 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,7 @@ DX_MAN_FEATURE(ON) DX_INIT_DOXYGEN(${PACKAGE_NAME}, [${top_builddir}/Doxyfile], [doc]) AM_CONDITIONAL(ENABLE_DOXYGEN,[test "x${DX_FLAG_doc}" = x1]) AM_CONDITIONAL(ENABLE_HTML,[test "x${DX_FLAG_html}" = x1]) +AM_CONDITIONAL(ENABLE_MAN,[test "x${DX_FLAG_man}" = x1]) # Check for sample building AC_MSG_CHECKING([whether to build sample programs]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 255c143..203497e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -7,6 +7,11 @@ DISTCLEANFILES = libnet.tag if ENABLE_HTML pkgdata_DATA = html/* +all-local: doc + clean-local: -rm -rf html + +doc: + $(MAKE) -C @top_builddir@ $@ endif diff --git a/doc/man/man3/Makefile.am b/doc/man/man3/Makefile.am index c5902f6..39ba9c8 100644 --- a/doc/man/man3/Makefile.am +++ b/doc/man/man3/Makefile.am @@ -3,3 +3,10 @@ man3_MANS = $(srcdir)/libnet.3 \ $(srcdir)/libnet-macros.3 DISTCLEANFILES = libnet.3 libnet-functions.3 libnet-macros.3 EXTRA_DIST = $(man3_MANS) + +if ENABLE_MAN +$(man3_MANS): doc + +doc: + $(MAKE) -C @top_builddir@ $@ +endif |