Leah Neukirchen <l...@vuxu.org> wrote:
> Eric Wong <e...@80x24.org> writes:
> > been trying to avoid being at the computer too much for health
> > reasons.
> 
> No problem, get well soon.

Thanks, but they're more preventative measures than anything.

> >> 1) Makefile.PL only works properly when run from a checkout, not a tarball.
> >> I replaced the beginning with
> >> 
> >> my @EXE_FILES = split("\n", `printf '%s\n' script/* 2>/dev/null`);
> >> my $PM_FILES = `find lib 2>/dev/null`;
> >
> > Thanks, I'd probably add "-name '*.pm'" to find(1) to filter out
> > directories.  But I wonder if it's better to grep the MANIFEST
> > file...
> 
> Yes, using MANIFEST is a better solution.

OK, will push this out:

---------8<-------
Subject: [PATCH] Makefile.PL: do not depend on git

Otherwise, things do not work from a tarball distribution.

Reported-by: Leah Neukirchen <l...@vuxu.org>
  https://public-inbox.org/meta/871sdfzy80....@gmail.com/
---
 Makefile.PL | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index a47e17b..027c3e6 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -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',
-- 
EW
--
unsubscribe: meta+unsubscr...@public-inbox.org
archive: https://public-inbox.org/meta/

Reply via email to