Add --without-docs configure option

27 views
Skip to first unread message

Christian Zuckschwerdt

unread,
Mar 19, 2022, 6:13:52 AM3/19/22
to bcm2835
Hi,

it would be nice if we could choose not to build docs, e.g.

--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,8 @@
 ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src doc
+SUBDIRS = src
+if HAVE_DOCS
+SUBDIRS += doc
+endif
 CLEANFILES = *~
 EXTRA_DIST = examples/blink/blink.c \
 examples/input/input.c \
--- a/configure.ac
+++ b/configure.ac
@@ -11,10 +11,21 @@
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE()
 AC_CHECK_LIB([rt], [clock_gettime])
-AC_CHECK_PROGS([DOXYGEN], [doxygen])
-if test -z "$DOXYGEN";
-   then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
+
+AC_MSG_CHECKING([for docs])
+AC_ARG_WITH([docs],
+   [AS_HELP_STRING([--with-docs], [generate doxygen docs (default yes)])],
+   [with_docs=$withval],
+   [with_docs=yes])
+AC_MSG_RESULT([$with_docs])
+AM_CONDITIONAL([HAVE_DOCS], [test "x$with_docs" = "xyes"])
+if test "x$with_docs" = "xyes" ; then
+   AC_CHECK_PROGS([DOXYGEN], [doxygen])
+   if test -z "$DOXYGEN";
+      then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
+   fi
 fi
+
 AC_PROG_RANLIB
 AC_PROG_CC
 AC_CONFIG_MACRO_DIR([m4])
--

Thanks!

Mike McCauley

unread,
Mar 20, 2022, 7:54:31 PM3/20/22
to bcm2835, 'Christian Zuckschwerdt' via bcm2835
Thanks.
This will appear in the next release.

Cheers.

On Saturday, 19 March 2022 20:13:52 AEST 'Christian Zuckschwerdt' via bcm2835
wrote:
--
Mike McCauley VK4AMM mi...@airspayce.com
Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia
http://www.airspayce.com 5R3MRFM2+X6
Phone +61 7 5598-7474



Reply all
Reply to author
Forward
0 new messages