2
1

0003-build-make-it-possible-to-disable-the-build-of-the-d.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From b89b8475a5b2f9444c32f7d254b35968da3c8a23 Mon Sep 17 00:00:00 2001
  2. From: "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. Date: Fri, 29 Sep 2017 18:03:51 +0200
  4. Subject: [PATCH] build: make it possible to disable the build of the
  5. documentation
  6. When targetting embedded evices, the documentation is not needed.
  7. Building the documentation default to whether the program is built.
  8. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  9. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  10. ---
  11. Makefile.am | 8 +++++++-
  12. configure.ac | 6 ++++++
  13. 2 files changed, 13 insertions(+), 1 deletion(-)
  14. diff --git a/Makefile.am b/Makefile.am
  15. index fce30b2..ee75b64 100644
  16. --- a/Makefile.am
  17. +++ b/Makefile.am
  18. @@ -41,9 +41,15 @@ EXTRA_DIST = \
  19. .indent.pro \
  20. autogen.sh
  21. +MAYBE_SUBDIRS =
  22. +
  23. +if ENABLE_DOC
  24. +MAYBE_SUBDIRS += doc
  25. +endif
  26. +
  27. SUBDIRS = \
  28. src \
  29. - doc \
  30. + $(MAYBE_SUBDIRS) \
  31. examples \
  32. po \
  33. tests \
  34. diff --git a/configure.ac b/configure.ac
  35. index c54e98f..b3ae450 100644
  36. --- a/configure.ac
  37. +++ b/configure.ac
  38. @@ -80,6 +80,12 @@ AC_ARG_ENABLE([program],
  39. [], [enable_program=yes])
  40. AM_CONDITIONAL([ENABLE_PROGRAM], [test "x$enable_program" = xyes])
  41. +AC_ARG_ENABLE([doc],
  42. + [AS_HELP_STRING([--disable-doc],
  43. + [do not build the documentation])],
  44. + [], [enable_doc=${enable_program}])
  45. +AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = xyes -a "x$enable_program" = xyes])
  46. +
  47. # --disable-bootstrap is intended only to workaround problems with bootstrap
  48. # (e.g. when cross-compiling flex or when bootstrapping has bugs).
  49. # Ideally we should be able to bootstrap even when cross-compiling.
  50. --
  51. 2.11.0