summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-passwd/base-passwd/0007-Make-it-possible-to-disable-the-generation-of-the-do.patch
blob: 2bec065cdbdfa3aa2b58cb491631b40a833f63dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 63e8270141a296843cfe1daba38e1969ac6d75ae Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Date: Sat, 30 Apr 2022 00:35:34 +0200
Subject: [PATCH] Make it possible to disable the generation of the
 documentation

Not all systems have docbook and po4a available.

Upstream-Status: Submitted [https://salsa.debian.org/debian/base-passwd/-/merge_requests/11]
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 Makefile.am  | 2 ++
 configure.ac | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 4bdd769..97b4f42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,6 @@
+if ENABLE_DOCS
 SUBDIRS = doc man
+endif
 
 sbin_PROGRAMS = update-passwd
 
diff --git a/configure.ac b/configure.ac
index 1e35ad1..b98374e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,15 @@ AS_IF([test "x$enable_debconf" != xno],
       [debconf support not available (use --disable-debconf to disable)])])
    AC_DEFINE([HAVE_DEBCONF], [1], [Define if you have libdebconfclient])])
 
+dnl Check whether to build the documentation 
+AC_MSG_CHECKING([whether to build the documentation])
+AC_ARG_ENABLE([docs],
+  [AC_HELP_STRING([--disable-docs], [do not build and install documentation])],
+  [],
+  [enable_docs=yes])
+AC_MSG_RESULT($enable_docs)
+AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes)
+
 dnl Finally output everything
 AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile])
 AC_OUTPUT