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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Add options to enable/disable docs and demos
  2. Originally written by Anthony Viallard
  3. <viallard@syscom-instruments.com>.
  4. [Vincent: adapt patch to 5.0.5 version]
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  7. diff -rup a/configure.in b/configure.in
  8. --- a/configure.in 2016-09-07 05:14:29.000000000 +0100
  9. +++ b/configure.in 2016-12-01 12:09:31.487464774 +0000
  10. @@ -818,6 +818,16 @@ if test "$with_cwdrc" = yes; then
  11. [ Define if you want to read .gnuplot from current directory (SECURITY RISK!).])
  12. fi
  13. +dnl Whether we want to build the doc files
  14. +dnl Does nothing here, is passed on to the doc subdir
  15. +AC_ARG_ENABLE(doc,dnl
  16. +[ --disable-doc do not build doc files])
  17. +
  18. +dnl Whether we want to build the demo files
  19. +dnl Does nothing here, is passed on to the demo subdir
  20. +AC_ARG_ENABLE(demo,dnl
  21. +[ --disable-demo do not build demo files])
  22. +
  23. dnl Sort help/subtopic tables by row or column
  24. AC_ARG_WITH(row-help,dnl
  25. [ --with-row-help format help and subtopic tables by row (default)
  26. @@ -1303,6 +1313,24 @@ fi
  27. dnl No configuration option for this one yet
  28. AC_DEFINE(MAX_PARALLEL_AXES,7, [Maximum number of parallel axes supported])
  29. +dnl build doc files
  30. +if test "$enable_doc" != no; then
  31. + AC_CONFIG_SUBDIRS(docs)
  32. + DOCSUBDIR=docs
  33. +else
  34. + DOCSUBDIR=
  35. +fi
  36. +AC_SUBST(DOCSUBDIR)
  37. +
  38. +dnl build demo files
  39. +if test "$enable_demo" != no; then
  40. + AC_CONFIG_SUBDIRS(demo)
  41. + DEMOSUBDIR=demo
  42. +else
  43. + DEMOSUBDIR=
  44. +fi
  45. +AC_SUBST(DEMOSUBDIR)
  46. +
  47. dnl Substitute variables
  48. AC_SUBST(PACKAGE)
  49. AC_SUBST(VERSION_MAJOR)
  50. diff -rup a/Makefile.am b/Makefile.am
  51. --- a/Makefile.am 2014-05-30 17:38:08.000000000 +0100
  52. +++ b/Makefile.am 2016-12-01 12:09:31.488464794 +0000
  53. @@ -1,7 +1,7 @@
  54. ## Process this file with automake to produce Makefile.in -*-Makefile-*-
  55. AUTOMAKE_OPTIONS = foreign
  56. -SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share
  57. +SUBDIRS = config m4 term src $(DOCSUBDIR) $(LISPDIR) man $(DEMOSUBDIR) tutorial share
  58. EXTRA_DIST = BUGS CodeStyle Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \
  59. Makefile.maint PATCHLEVEL PGPKEYS PORTING README RELEASE_NOTES \