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