0002-configure-add-disable-doc-option.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From e9d5cbc01e3c0d6a31e2dba2f224b7f3dd21db37 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 23 Oct 2022 16:10:50 +0200
  4. Subject: [PATCH] configure: add --disable-doc option
  5. Allow the user to disable documentation through --disable-doc
  6. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  7. ---
  8. Makefile.am | 6 +++++-
  9. configure.ac | 8 ++++++++
  10. 2 files changed, 13 insertions(+), 1 deletion(-)
  11. diff --git a/Makefile.am b/Makefile.am
  12. index 6718af13..58a321d8 100644
  13. --- a/Makefile.am
  14. +++ b/Makefile.am
  15. @@ -45,7 +45,11 @@ if WITH_SYSTEMDSYSTEMUNITDIR
  16. SYSTEMD_DIR = systemd
  17. endif
  18. -SUBDIRS = lib daemons tools plugins configs doc $(SYSTEMD_DIR)
  19. +if HAVE_DOC
  20. + DOC_DIR = doc
  21. +endif
  22. +
  23. +SUBDIRS = lib daemons tools plugins configs $(DOC_DIR) $(SYSTEMD_DIR)
  24. if INSTALL_ETC
  25. diff --git a/configure.ac b/configure.ac
  26. index d28c6732..f3384c95 100644
  27. --- a/configure.ac
  28. +++ b/configure.ac
  29. @@ -486,6 +486,14 @@ AC_ARG_VAR(SETUPTOOLS_ENV,
  30. )
  31. +AC_ARG_ENABLE(doc,
  32. + [ --enable-doc Build and install documentation (default=yes)],
  33. + [ enable_doc="${enableval}" ],
  34. + [ enable_doc=yes]
  35. +)
  36. +AM_CONDITIONAL([HAVE_DOC], [test x$enable_doc = xyes])
  37. +
  38. +
  39. suffix=$(echo "$VERSION" | sed 's/.*-//')
  40. AM_CONDITIONAL(DEVEL, [test x$suffix = xdevel])
  41. --
  42. 2.35.1