]> granicus.if.org Git - graphviz/commitdiff
Add option for disabling/customizing of demos
authorDavid Seifert <soap@gentoo.org>
Sat, 14 May 2022 22:50:04 +0000 (00:50 +0200)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 15 May 2022 15:48:24 +0000 (08:48 -0700)
* Many distros have different directories for where to
  install example files to. Gentoo installs them under
  `$(docdir)/examples`. With `--without-demos`, we can suppress
  installation of the demos altogether.

configure.ac
tclpkg/gdtclft/demo/Makefile.am
tclpkg/gv/demo/Makefile.am
tclpkg/tcldot/demo/Makefile.am
tclpkg/tclpathplan/demo/Makefile.am
tclpkg/tclpathplan/demo/pathplan_data/Makefile.am
tclpkg/tkspline/demo/Makefile.am

index d76d918cd3172b16384d2ea01b9080e06476b065..e9a994402a18e8f9f22091c5660fe65df8bb6f6b 100644 (file)
@@ -291,6 +291,18 @@ AS_IF([test "x$enable_man_pdfs" != "xno"], [
 ])
 AM_CONDITIONAL([ENABLE_MAN_PDFS], [test "x$enable_man_pdfs" != "xno" && test -n "$GROFF" && test -n "$PS2PDF"])
 
+# allow disabling of demos installation
+AC_ARG_WITH([demos],
+  [AS_HELP_STRING([--with-demos=DIR], [Install demos (default: $(pkgdatadir)/demo)])])
+
+demodir='$(pkgdatadir)/demo'
+AS_IF([test "$with_demos" != "xyes" && test -n "$with_demos"], [
+  dnl user provided --with-demos=/my/demo/dir
+  demodir="$with_demos"
+])
+AM_CONDITIONAL([INSTALL_DEMOS], [test "x$with_demos" != "xno"])
+AC_SUBST([demodir])
+
 PKG_INSTALLDIR
 PKG_PROG_PKG_CONFIG
 
index 96a032cf7010478c9e158edd1e252cd89ccda2d1..64f24c75fba55fd87c256061b8cb425af93fba2c 100644 (file)
@@ -1,8 +1,8 @@
 ## Process this file with automake to produce Makefile.in
 
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
 if WITH_TCL
 dist_demo_SCRIPTS = entities.tcl
 dist_demo_DATA = entities.tcl.README entities.html
 endif
+endif
index d33e74af499c4c798d044e11fd2b0e4f1df2674d..a6ab30805a628acd889663d3fb688b066cc5780f 100644 (file)
@@ -1,19 +1,20 @@
 ## Process this file with automake to produce Makefile.in
 
-demosharpdir = $(pkgdatadir)/demo
-demoguiledir = $(pkgdatadir)/demo
-demoiodir = $(pkgdatadir)/demo
-demojavadir = $(pkgdatadir)/demo
-demoluadir = $(pkgdatadir)/demo
-demoocamldir = $(pkgdatadir)/demo
-demoperldir = $(pkgdatadir)/demo
-demophpdir = $(pkgdatadir)/demo
-demopythondir = $(pkgdatadir)/demo
-demopython3dir = $(pkgdatadir)/demo
-demoRdir = $(pkgdatadir)/demo
-demorubydir = $(pkgdatadir)/demo
-demotcldir = $(pkgdatadir)/demo
+demosharpdir = $(demodir)
+demoguiledir = $(demodir)
+demoiodir = $(demodir)
+demojavadir = $(demodir)
+demoluadir = $(demodir)
+demoocamldir = $(demodir)
+demoperldir = $(demodir)
+demophpdir = $(demodir)
+demopythondir = $(demodir)
+demopython3dir = $(demodir)
+demoRdir = $(demodir)
+demorubydir = $(demodir)
+demotcldir = $(demodir)
 
+if INSTALL_DEMOS
 if WITH_SHARP
 demosharp_SCRIPTS =
 endif
@@ -53,5 +54,6 @@ endif
 if WITH_TCL
 demotcl_SCRIPTS = modgraph.tcl
 endif
+endif
 
 EXTRA_DIST = modgraph.*
index a03f3a0d2f32177aff33d13b4d6ff6eb9e377e7b..a358ab46516e34efdc0f52db67c464f4ab52a9e3 100644 (file)
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
 if WITH_TCL
 demo_SCRIPTS = doted.tcl gcat.tcl
 demo_DATA = doted.tcl.README gcat.tcl.README
 endif
+endif
 
 EXTRA_DIST = doted.tcl gcat.tcl doted.tcl.README gcat.tcl.README
index cd772cf20962baba9e27765d1fe2769b44ed8f03..a8737d1b5e3a2664da9bf5f72a92cd1530b33f68 100644 (file)
@@ -2,11 +2,11 @@
 
 SUBDIRS = pathplan_data
 
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
 if WITH_TCL
 demo_SCRIPTS = pathplan.tcl
 demo_DATA = pathplan.tcl.README
 endif
+endif
 
 EXTRA_DIST = pathplan.tcl pathplan.tcl.README
index e79a1ce17bf6a5f29ff6f67f2a17df9047397332..f4e79eafc621280efa41dd169fc49d8ec1f8eeaf 100644 (file)
@@ -1,8 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-pathplanexampledir = $(pkgdatadir)/demo/pathplan_data
+pathplanexampledir = $(demodir)/pathplan_data
 
+if INSTALL_DEMOS
 if WITH_TCL
 dist_pathplanexample_DATA = boxes.dat dpd.dat funny.dat maze.dat nested.dat northo.dat \
        obs.dat other.dat paths.dat rotor.dat u.dat unknown.dat
 endif
+endif
index a0e3f05b836c9bae92959536db547a0b391f926d..b0abd4f2333461e51f9174fbc3d35f13811a24f3 100644 (file)
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
 if WITH_TK
 demo_SCRIPTS = spline.tcl
 demo_DATA = spline.tcl.README
 endif
+endif
 
 EXTRA_DIST = spline.tcl spline.tcl.README