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 @# beautify the output a bit
49 @echo 'cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@'
50 @cd buildperl && ( if ! @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@; then \
52 echo 'Check whether you have set $$PERL_MM_OPT in your environment and try using ./configure --with-perl-bindings=""'; \
56 buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
58 .perl-directory-stamp:
59 if test ! -d buildperl; then \
60 mkdir -p buildperl/Collectd/Plugins; \
61 cp $(srcdir)/perl/lib/Collectd.pm buildperl/; \
62 cp $(srcdir)/perl/Makefile.PL buildperl/; \
63 cp $(srcdir)/perl/lib/Collectd/Unixsock.pm buildperl/Collectd/; \
64 cp $(srcdir)/perl/lib/Collectd/Plugins/OpenVZ.pm buildperl/Collectd/Plugins/; \