7 EXTRA_DIST = perl/Makefile.PL \
8 perl/uninstall_mod.pl \
10 perl/lib/Collectd/Unixsock.pm \
11 perl/lib/Collectd/Plugins/Monitorus.pm \
12 perl/lib/Collectd/Plugins/OpenVZ.pm
15 buildperl/Collectd.pm \
16 buildperl/Collectd/Plugins/OpenVZ.pm \
17 buildperl/Collectd/Unixsock.pm \
18 buildperl/Makefile.PL \
22 buildperl/Collectd.pm \
23 buildperl/Collectd/Plugins/OpenVZ.pm \
24 buildperl/Collectd/Unixsock.pm \
25 buildperl/Makefile.PL \
28 all-local: @PERL_BINDINGS@
32 [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
34 # Perl 'make uninstall' does not work as well as wanted.
35 # So we do the work here.
37 @PERL@ -I$(DESTDIR)$(prefix) $(srcdir)/perl/uninstall_mod.pl Collectd
38 find $(DESTDIR)$(prefix) -name "perllocal.pod" -exec rm {} \;
43 perl: buildperl/Makefile
44 cd buildperl && $(MAKE)
46 buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
47 $(top_builddir)/config.status
48 cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(DESTDIR)$(prefix) @PERL_BINDINGS_OPTIONS@
50 buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
52 .perl-directory-stamp:
53 if test ! -d buildperl; then \
54 mkdir -p buildperl/Collectd/Plugins; \
55 cp $(srcdir)/perl/lib/Collectd.pm buildperl/; \
56 cp $(srcdir)/perl/Makefile.PL buildperl/; \
57 cp $(srcdir)/perl/lib/Collectd/Unixsock.pm buildperl/Collectd/; \
58 cp $(srcdir)/perl/lib/Collectd/Plugins/OpenVZ.pm buildperl/Collectd/Plugins/; \