Code

src/Makefile.am: Fix building / packaging without the Pinba plugin.
authorFlorian Forster <octo@huhu.verplant.org>
Mon, 3 May 2010 07:47:42 +0000 (09:47 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Mon, 3 May 2010 07:47:42 +0000 (09:47 +0200)
Getting the dependency right on generated sources wasn't quite as easy as I
hoped.

src/Makefile.am

index 2a32ece82ea621469bacf0b75b2493e06f6dcbc4..c6b0538d305a572b67a5ec06ff63c3506279793b 100644 (file)
@@ -108,6 +108,7 @@ collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
 pkglib_LTLIBRARIES = 
 
 BUILT_SOURCES = 
+CLEANFILES = 
 
 if BUILD_PLUGIN_APACHE
 pkglib_LTLIBRARIES += apache.la
@@ -811,8 +812,9 @@ endif
 
 if BUILD_PLUGIN_PINBA
 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
+CLEANFILES += pinba.pb-c.c pinba.pb-c.h
 pkglib_LTLIBRARIES += pinba.la
-pinba_la_SOURCES = pinba.c pinba.pb-c.c pinba.pb-c.h
+pinba_la_SOURCES = pinba.c
 pinba_la_LDFLAGS = -module -avoid-version
 pinba_la_LIBADD = -lprotobuf-c
 collectd_LDADD += "-dlopen" pinba.la
@@ -1247,10 +1249,8 @@ EXTRA_DIST +=   collectd.conf.pod \
                echo "$@ has some POD errors!"; false; \
        fi
 
-if HAVE_PROTOC_C
 pinba.pb-c.c pinba.pb-c.h: pinba.proto
        protoc-c --c_out $(builddir) pinba.proto
-endif
 
 install-exec-hook:
        $(mkinstalldirs) $(DESTDIR)$(sysconfdir)