Merge branch 'collectd-4.1' into collectd-4.2
[collectd.git] / bindings / Makefile.am
1 EXTRA_DIST = perl/Collectd.pm perl/Makefile.PL perl/Collectd/Makefile.PL perl/Collectd/Unixsock.pm
2
3 all-local: @PERL_BINDINGS@
4
5 install-exec-local:
6         [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) install )
7
8 clean-local:
9         [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean )
10
11 perl: perl/Makefile
12         cd perl && $(MAKE)
13
14 perl/Makefile: .perl-directory-stamp perl/Makefile.PL perl/Collectd/Makefile.PL
15         cd perl && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@
16
17 .perl-directory-stamp:
18         if test ! -d perl; then \
19           mkdir -p perl/Collectd; \
20           cp $(srcdir)/perl/Collectd.pm perl/; \
21           cp $(srcdir)/perl/Makefile.PL perl/; \
22           cp $(srcdir)/perl/Collectd/Unixsock.pm perl/Collectd/; \
23           cp $(srcdir)/perl/Collectd/Makefile.PL perl/Collectd/; \
24         fi
25         touch $@
26
27 .PHONY: perl
28