From bf449b5f3457852984e99d26d64cadf9dcac35d1 Mon Sep 17 00:00:00 2001 From: Yves Mettier Date: Wed, 14 Nov 2012 15:45:07 +0100 Subject: [PATCH] Fix make distcheck (against release 5.1.1) Signed-off-by: Florian Forster --- bindings/Makefile.am | 10 +++------- bindings/perl/uninstall_mod.pl | 8 ++++++++ clean.sh | 4 +++- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 bindings/perl/uninstall_mod.pl diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 3876cc2c..56fc5ed7 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -5,6 +5,7 @@ SUBDIRS += java endif EXTRA_DIST = perl/Makefile.PL \ + perl/uninstall_mod.pl \ perl/lib/Collectd.pm \ perl/lib/Collectd/Unixsock.pm \ perl/lib/Collectd/Plugins/Monitorus.pm \ @@ -33,12 +34,7 @@ install-exec-local: # Perl 'make uninstall' does not work as well as wanted. # So we do the work here. uninstall-local: - rm -f $(DESTDIR)$(mandir)/man3/Collectd::Unixsock.3pm - rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd.pm - rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd/Plugins/OpenVZ.pm - rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd/Unixsock.pm - rm -f $(DESTDIR)$(prefix)/lib64/perl5/perllocal.pod - rm -f $(DESTDIR)$(prefix)/lib64/perl5/auto/Collectd/.packlist + @PERL@ -I$(DESTDIR)$(prefix) $(srcdir)/perl/uninstall_mod.pl Collectd clean-local: rm -rf buildperl @@ -48,7 +44,7 @@ perl: buildperl/Makefile buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \ $(top_builddir)/config.status - cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(prefix) @PERL_BINDINGS_OPTIONS@ + cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(DESTDIR)$(prefix) @PERL_BINDINGS_OPTIONS@ buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status diff --git a/bindings/perl/uninstall_mod.pl b/bindings/perl/uninstall_mod.pl new file mode 100644 index 00000000..f8083af1 --- /dev/null +++ b/bindings/perl/uninstall_mod.pl @@ -0,0 +1,8 @@ +#! /usr/bin/perl + +use strict; +use ExtUtils::Installed; + +my $mod = $ARGV[0] || die "Usage : $0 Module\n"; +my $inst = ExtUtils::Installed->new(); +unlink $inst->files($mod), $inst->packlist($mod)->packlist_file(); diff --git a/clean.sh b/clean.sh index 098669da..9defb05d 100755 --- a/clean.sh +++ b/clean.sh @@ -47,4 +47,6 @@ true \ && rm -f -r src/libcollectdclient/.libs \ && rm -f src/libcollectdclient/*.o \ && rm -f src/libcollectdclient/*.la \ -&& rm -f src/libcollectdclient/*.lo +&& rm -f src/libcollectdclient/*.lo \ +&& rm -f bindings/.perl-directory-stamp \ +&& rm -f -r bindings/buildperl -- 2.11.0