]> Sergey Matveev's repositories - public-inbox.git/commitdiff
Makefile.PL: do not depend on git
authorEric Wong <e@80x24.org>
Wed, 13 Jun 2018 02:07:59 +0000 (02:07 +0000)
committerEric Wong <e@80x24.org>
Wed, 13 Jun 2018 20:55:55 +0000 (20:55 +0000)
Otherwise, things do not work from a tarball distribution.

Reported-by: Leah Neukirchen <leah@vuxu.org>
  https://public-inbox.org/meta/871sdfzy80.fsf@gmail.com/

Makefile.PL

index a47e17bc4ad9157460f1a089c823c40d5fbffac4..027c3e63fb742a09a5090ec569d9f35f6c997da6 100644 (file)
@@ -3,9 +3,10 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use ExtUtils::MakeMaker;
-my @EXE_FILES = split("\n", `git ls-files 'script/*' 2>/dev/null`);
-my $PM_FILES = `git ls-files lib '*.pm' 2>/dev/null`;
-$PM_FILES =~ tr/\n/ /;
+open my $m, '<', 'MANIFEST' or die "open(MANIFEST): $!\n";
+chomp(my @manifest = (<$m>));
+my @EXE_FILES = grep(m!^script/!, @manifest);
+my $PM_FILES = join(' ', grep(m!^lib/.*\.pm$!, @manifest));
 
 WriteMakefile(
        NAME => 'PublicInbox',