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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. diff -Naur a/configure.ac b/configure.ac
  10. --- a/configure.ac 2020-07-12 02:29:47.000000000 +0200
  11. +++ b/configure.ac 2020-08-06 14:21:17.918756893 +0200
  12. @@ -713,6 +713,17 @@
  13. [ Define if you want to read .gnuplot from current directory (SECURITY RISK!).])
  14. fi
  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. +
  20. +dnl Whether we want to build the demo files
  21. +dnl Does nothing here, is passed on to the demo subdir
  22. +AC_ARG_ENABLE(demo,dnl
  23. +[ --disable-demo do not build demo files])
  24. +
  25. +
  26. dnl Sort help/subtopic tables by row or column
  27. AC_ARG_WITH(row-help,dnl
  28. [ --with-row-help format help and subtopic tables by row (default)
  29. @@ -1095,6 +1106,24 @@
  30. AC_DEFINE_UNQUOTED([DIST_CONTACT],["$DIST_CONTACT"],[Contact address for modified and binary distributed gnuplot versions])
  31. fi
  32. +dnl build doc files
  33. +if test "$enable_doc" != no; then
  34. + AC_CONFIG_SUBDIRS(docs)
  35. + DOCSUBDIR=docs
  36. +else
  37. + DOCSUBDIR=
  38. +fi
  39. +AC_SUBST(DOCSUBDIR)
  40. +
  41. +dnl build demo files
  42. +if test "$enable_demo" != no; then
  43. + AC_CONFIG_SUBDIRS(demo)
  44. + DEMOSUBDIR=demo
  45. +else
  46. + DEMOSUBDIR=
  47. +fi
  48. +AC_SUBST(DEMOSUBDIR)
  49. +
  50. dnl Substitute variables
  51. AC_SUBST(PACKAGE)
  52. AC_SUBST(VERSION_MAJOR)
  53. diff -Naur a/Makefile.am b/Makefile.am
  54. --- a/Makefile.am 2020-03-31 19:28:16.000000000 +0200
  55. +++ b/Makefile.am 2020-08-06 14:34:12.995097799 +0200
  56. @@ -1,7 +1,7 @@
  57. ## Process this file with automake to produce Makefile.in -*-Makefile-*-
  58. AUTOMAKE_OPTIONS = foreign
  59. -SUBDIRS = config m4 term src docs man demo share
  60. +SUBDIRS = config m4 term src $(DOCSUBDIR) man $(DEMOSUBDIR) share
  61. EXTRA_DIST = BUGS Copyright FAQ.pdf INSTALL INSTALL.gnu \
  62. PATCHLEVEL PGPKEYS README RELEASE_NOTES \