On 29/06/10 17:27 -0700, Bernard Li wrote:
> Hi Justin:
> 
> On Tue, Jun 29, 2010 at 12:23 PM, Justin Bronder <jsbron...@gentoo.org> wrote:
> 
> > Good suggestion.  That's actually preferable to being triggered by enabling
> > python and being part of the default make install.
> 
> Not sure if this is the best way to do this, but here goes (patch
> against top level Makefile.am):
> 
> Index: Makefile.am
> ===================================================================
> --- Makefile.am       (revision 2305)
> +++ Makefile.am       (working copy)
> @@ -91,3 +91,8 @@
>  # the desired location if needed
>  install-data-hook:   contrib/ganglia_gmond.xml solaris/pkginfo
> 
> +install_gmond_module_examples:
> +     mkdir -p $(DESTDIR)$(datadir)/examples/modules && \
> +       $(INSTALL_DATA) gmond/modules/example/*.c
> gmond/modules/conf.d/*example* $(DESTDIR)$(datadir)/examples/modules
> +     mkdir -p $(DESTDIR)$(datadir)/examples/python_modules && \
> +       $(INSTALL_DATA) gmond/python_modules/example/*.py
> gmond/python_modules/conf.d/*example*
> $(DESTDIR)$(datadir)/examples/python_modules
> 
> This will install both the gmond C module example and the Python
> module examples to $datadir.
> 
> Comments?

That works fine, although I changed my mind and decided that the examples
should always be installed :)  It's up to you guys to decide which way to go,
I'll be happy regardless.  Patch attached for the heck of it.



Index: configure.in
===================================================================
--- configure.in        (revision 2305)
+++ configure.in        (working copy)
@@ -781,6 +780,7 @@
           gmond/python_modules/disk/Makefile
           gmond/python_modules/example/Makefile
           gmond/python_modules/network/Makefile
+          gmond/python_modules/conf.d/Makefile
           gmetad/conf.c
           gmetad-python/setup.py
           gmetad-python/Gmetad/gmetad_config.py
Index: gmond/python_modules/network/Makefile.am
===================================================================
--- gmond/python_modules/network/Makefile.am    (revision 2305)
+++ gmond/python_modules/network/Makefile.am    (working copy)
@@ -1,2 +1,7 @@
-pys = tcpconn.py
-EXTRA_DIST = $(pys)
+exampledir = $(docdir)/pymod-examples
+dist_example_DATA =
+
+if BUILD_PYTHON
+dist_example_DATA += tcpconn.py
+endif
+
Index: gmond/python_modules/Makefile.am
===================================================================
--- gmond/python_modules/Makefile.am    (revision 2305)
+++ gmond/python_modules/Makefile.am    (working copy)
@@ -1,2 +1,2 @@
-DIST_SUBDIRS = disk example network
-EXTRA_DIST = ./conf.d/*.pyconf
+SUBDIRS = disk example network conf.d
+
Index: gmond/python_modules/disk/Makefile.am
===================================================================
--- gmond/python_modules/disk/Makefile.am       (revision 2305)
+++ gmond/python_modules/disk/Makefile.am       (working copy)
@@ -1,2 +1,7 @@
-pys = multidisk.py
-EXTRA_DIST = $(pys)
+exampledir = $(docdir)/pymod-examples/
+dist_example_DATA =
+
+if BUILD_PYTHON
+dist_example_DATA += multidisk.py
+endif
+
Index: gmond/python_modules/example/Makefile.am
===================================================================
--- gmond/python_modules/example/Makefile.am    (revision 2305)
+++ gmond/python_modules/example/Makefile.am    (working copy)
@@ -1,2 +1,8 @@
-pys = example.py
-EXTRA_DIST = $(pys)
+exampledir = $(docdir)/pymod-examples
+dist_example_DATA =
+
+if BUILD_PYTHON
+dist_example_DATA += example.py \
+       spfexample.py
+endif
+

-- 
Justin Bronder

Attachment: pgp6UTzVG6nbp.pgp
Description: PGP signature

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to