X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=bindings%2FMakefile.am;h=16872e88e2159dd4b3db58cc72377a93ccc4f30d;hb=c89c9b7b5e498e5a77c6eb1b1a88593fcced85f5;hp=5aa49435fea620fa0d32ecf6a04bf523c248ebb6;hpb=61f5c1a972626212aab60c4d50f45097485b8e51;p=collectd.git diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 5aa49435..16872e88 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -1,20 +1,26 @@ 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_SUBDIR)/Makefile ] || $(MAKE) -C $(PERL_SUBDIR) install + [ ! -f perl/Makefile ] || $(MAKE) -C perl install clean-local: - [ ! -f $(PERL_SUBDIR)/Makefile ] || $(MAKE) -C $(PERL_SUBDIR) realclean + [ ! -f perl/Makefile ] || $(MAKE) -C perl realclean + +perl: perl/Makefile + $(MAKE) -C perl -@srcdir@/perl: $(PERL_SUBDIR)/Makefile - $(MAKE) -C $(PERL_SUBDIR) +perl/Makefile: .perl-directory-stamp 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@ +.perl-directory-stamp: + if test ! -d perl; then \ + mkdir -p perl/Collectd; \ + cp $(srcdir)/perl/{Collectd.pm,Makefile.PL} perl/; \ + cp $(srcdir)/perl/Collectd/{Unixsock.pm,Makefile.PL} perl/Collectd/; \ + fi + touch $@ -.PHONY: @srcdir@/perl +.PHONY: perl