0001-configure-add-option-to-not-build-manpages.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 60a581253331ac38721a12495909d073eff703b7 Mon Sep 17 00:00:00 2001
  2. From: "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. Date: Sat, 13 Aug 2016 18:47:17 +0200
  4. Subject: [PATCH] configure: add option to not build manpages
  5. Man pages are not always needed, especially on embedded systems.
  6. Add a configure option to not build them; by default, build them.
  7. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  8. ---
  9. Patch sent upstream:
  10. https://github.com/systemd/systemd-bootchart/pull/14
  11. ---
  12. Makefile.am | 5 ++++-
  13. configure.ac | 10 +++++++++-
  14. 2 files changed, 13 insertions(+), 2 deletions(-)
  15. diff --git a/Makefile.am b/Makefile.am
  16. index a71f8d8..e6510d5 100644
  17. --- a/Makefile.am
  18. +++ b/Makefile.am
  19. @@ -74,7 +74,10 @@ EXTRA_DIST = \
  20. MANPAGES = man/bootchart.conf.5 man/systemd-bootchart.1
  21. MANPAGES_ALIAS = man/bootchart.conf.d.5
  22. -man_MANS = $(MANPAGES) $(MANPAGES_ALIAS)
  23. +if COND_man
  24. +MAYBE_MANPAGES = $(MANPAGES) $(MANPAGES_ALIAS)
  25. +endif
  26. +man_MANS = $(MAYBE_MANPAGES)
  27. man/bootchart.conf.d.5: man/bootchart.conf.5
  28. diff --git a/configure.ac b/configure.ac
  29. index f8e62d8..90e8b03 100644
  30. --- a/configure.ac
  31. +++ b/configure.ac
  32. @@ -167,8 +167,16 @@ AC_ARG_WITH([rootlibdir],
  33. AC_SUBST([rootprefix], [$with_rootprefix])
  34. AC_SUBST([rootlibdir], [$with_rootlibdir])
  35. +AC_ARG_ENABLE([man],
  36. + AS_HELP_STRING([--diable-man],[Build the man pages (default: yes)]),
  37. + [build_man=$enableval],
  38. + [build_man=yes])
  39. +
  40. AC_PATH_PROG([XSLTPROC], [xsltproc])
  41. -AS_IF([test -z "$XSLTPROC"], AC_MSG_ERROR([*** xsltproc is required for man pages]))
  42. +AS_IF([test -z "$XSLTPROC" -a "$build_man" = "yes"],
  43. + [AC_MSG_ERROR([*** xsltproc is required for man pages])])
  44. +
  45. +AM_CONDITIONAL([COND_man],[test "$build_man" = "yes"])
  46. AC_CONFIG_FILES([
  47. Makefile
  48. --
  49. 2.7.4