X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=bindings%2FMakefile.am;h=620389fabe7b0ab1424c727835eb802c86bd8e30;hb=43e1aa5836da14b8fd473111ad48f7a69700ce7b;hp=45735722771da84483bc8ac17cbdf18e04a8c54a;hpb=4a5e97d6e317ee050b0a942e50159473a7d144dc;p=collectd.git diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 45735722..620389fa 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -4,17 +4,27 @@ EXTRA_DIST = perl/Collectd.pm perl/Makefile.PL perl/Collectd/Makefile.PL \ all-local: @PERL_BINDINGS@ install-exec-local: - [ ! -f perl/Makefile ] || $(MAKE) -C perl install + [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) install ) clean-local: - [ ! -f perl/Makefile ] || $(MAKE) -C perl realclean + [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean ) perl: perl/Makefile - $(MAKE) -C perl + cd perl && $(MAKE) -perl/Makefile: perl/Makefile.PL perl/Collectd/Makefile.PL \ - $(top_builddir)/config.status +perl/Makefile: .perl-directory-stamp perl/Makefile.PL \ + perl/Collectd/Makefile.PL $(top_builddir)/config.status cd perl && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@ +.perl-directory-stamp: + if test ! -d perl; then \ + mkdir -p perl/Collectd; \ + cp $(srcdir)/perl/Collectd.pm perl/; \ + cp $(srcdir)/perl/Makefile.PL perl/; \ + cp $(srcdir)/perl/Collectd/Unixsock.pm perl/Collectd/; \ + cp $(srcdir)/perl/Collectd/Makefile.PL perl/Collectd/; \ + fi + touch $@ + .PHONY: perl