Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 1 | From 63e8270141a296843cfe1daba38e1969ac6d75ae Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Kjellerstedt <peter.kjellerstedt@axis.com> |
| 3 | Date: Sat, 30 Apr 2022 00:35:34 +0200 |
| 4 | Subject: [PATCH] Make it possible to disable the generation of the |
| 5 | documentation |
| 6 | |
| 7 | Not all systems have docbook and po4a available. |
| 8 | |
| 9 | Upstream-Status: Backport [https://salsa.debian.org/debian/base-passwd/-/commit/2a6d16e595c93084e279d0dcbef37d960b44fd1a] |
| 10 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> |
| 11 | --- |
| 12 | Makefile.am | 2 ++ |
| 13 | configure.ac | 9 +++++++++ |
| 14 | 2 files changed, 11 insertions(+) |
| 15 | |
| 16 | diff --git a/Makefile.am b/Makefile.am |
| 17 | index 4bdd769..97b4f42 100644 |
| 18 | --- a/Makefile.am |
| 19 | +++ b/Makefile.am |
| 20 | @@ -1,4 +1,6 @@ |
| 21 | +if ENABLE_DOCS |
| 22 | SUBDIRS = doc man |
| 23 | +endif |
| 24 | |
| 25 | sbin_PROGRAMS = update-passwd |
| 26 | |
| 27 | diff --git a/configure.ac b/configure.ac |
| 28 | index 1e35ad1..b98374e 100644 |
| 29 | --- a/configure.ac |
| 30 | +++ b/configure.ac |
| 31 | @@ -27,6 +27,15 @@ AS_IF([test "x$enable_debconf" != xno], |
| 32 | [debconf support not available (use --disable-debconf to disable)])]) |
| 33 | AC_DEFINE([HAVE_DEBCONF], [1], [Define if you have libdebconfclient])]) |
| 34 | |
| 35 | +dnl Check whether to build the documentation |
| 36 | +AC_MSG_CHECKING([whether to build the documentation]) |
| 37 | +AC_ARG_ENABLE([docs], |
| 38 | + [AC_HELP_STRING([--disable-docs], [do not build and install documentation])], |
| 39 | + [], |
| 40 | + [enable_docs=yes]) |
| 41 | +AC_MSG_RESULT($enable_docs) |
| 42 | +AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes) |
| 43 | + |
| 44 | dnl Finally output everything |
| 45 | AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile]) |
| 46 | AC_OUTPUT |