0001-configure-add-without-demo-option.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Add options to enable/disable docs and demos
  2. Originally written by Anthony Viallard
  3. <viallard@syscom-instruments.com>.
  4. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  5. [Vincent: adapt patch to 5.0.5 version]
  6. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  7. [Michael: adapt patch to 5.4.0 version]
  8. Signed-off-by: Michael Fischer <mf@go-sys.de>
  9. [Michael: adapt patch to 6.0.0 version]
  10. Signed-off-by: Michael Fischer <mf@go-sys.de>
  11. --- a/configure.ac 2023-12-19 00:28:58.000000000 +0100
  12. +++ b/configure.ac 2024-05-13 15:41:18.313920528 +0200
  13. @@ -715,6 +715,32 @@
  14. dnl Process rest of with and enable options
  15. +dnl Whether we want to build the doc files
  16. +dnl Does nothing here, is passed on to the doc subdir
  17. +AC_ARG_ENABLE(doc,dnl
  18. +[ --disable-doc do not build doc files])
  19. +dnl build doc files
  20. +if test "$enable_doc" != no; then
  21. + AC_CONFIG_SUBDIRS(docs)
  22. + DOCSUBDIR=docs
  23. +else
  24. + DOCSUBDIR=
  25. +fi
  26. +AC_SUBST(DOCSUBDIR)
  27. +
  28. +dnl Whether we want to build the demo files
  29. +dnl Does nothing here, is passed on to the demo subdir
  30. +AC_ARG_ENABLE(demo,dnl
  31. +[ --disable-demo do not build demo files])
  32. +dnl build demo files
  33. +if test "$enable_demo" != no; then
  34. + AC_CONFIG_SUBDIRS(demo)
  35. + DEMOSUBDIR=demo
  36. +else
  37. + DEMOSUBDIR=
  38. +fi
  39. +AC_SUBST(DEMOSUBDIR)
  40. +
  41. dnl without-extra-coordinate may leave a hole in "struct coordinate"
  42. AC_ARG_WITH(extra-coordinate,dnl
  43. [ --without-extra-coordinate leave possible hole in struct coordinate],,)
  44. --- a/Makefile.am 2023-12-19 00:28:58.000000000 +0100
  45. +++ b/Makefile.am 2024-05-13 15:54:21.189906680 +0200
  46. @@ -1,7 +1,7 @@
  47. ## Process this file with automake to produce Makefile.in -*-Makefile-*-
  48. AUTOMAKE_OPTIONS = foreign
  49. -SUBDIRS = config m4 term src docs man demo share
  50. +SUBDIRS = config m4 term src $(DOCSUBDIR) man $(DEMOSUBDIR) share
  51. EXTRA_DIST = BUGS Copyright FAQ.pdf INSTALL INSTALL.gnu \
  52. PATCHLEVEL PGPKEYS README RELEASE_NOTES \