From 61f5c1a972626212aab60c4d50f45097485b8e51 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 19 Dec 2007 14:33:39 +0100 Subject: [PATCH] bindings/Makefile.am: Fix a bug that happened when src and build directory are not the same. Thanks to Michael Tiernan for reporting this bug. --- bindings/Makefile.am | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 37e31ea1..5aa49435 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -1,18 +1,20 @@ EXTRA_DIST = perl/Collectd.pm perl/Makefile.PL perl/Collectd/Makefile.PL perl/Collectd/Unixsock.pm +PERL_SUBDIR = $(srcdir)/perl + all-local: @PERL_BINDINGS@ install-exec-local: - [ ! -f perl/Makefile ] || $(MAKE) -C perl install + [ ! -f $(PERL_SUBDIR)/Makefile ] || $(MAKE) -C $(PERL_SUBDIR) install clean-local: - [ ! -f perl/Makefile ] || $(MAKE) -C perl realclean + [ ! -f $(PERL_SUBDIR)/Makefile ] || $(MAKE) -C $(PERL_SUBDIR) realclean -perl: perl/Makefile - $(MAKE) -C perl +@srcdir@/perl: $(PERL_SUBDIR)/Makefile + $(MAKE) -C $(PERL_SUBDIR) -perl/Makefile: perl/Makefile.PL perl/Collectd/Makefile.PL - cd perl && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@ +@srcdir@/perl/Makefile: @srcdir@/perl/Makefile.PL @srcdir@/perl/Collectd/Makefile.PL + cd $(PERL_SUBDIR) && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@ -.PHONY: perl +.PHONY: @srcdir@/perl -- 2.11.0