unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Leah Neukirchen <leah@vuxu.org>
Cc: meta@public-inbox.org
Subject: [PATCH] Makefile.PL: do not depend on git
Date: Wed, 13 Jun 2018 02:07:59 +0000	[thread overview]
Message-ID: <20180613020759.cpl2ewenermewylw@dcvr> (raw)
In-Reply-To: <8736xsb5s5.fsf@vuxu.org>

Leah Neukirchen <leah@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 <leah@vuxu.org>
  https://public-inbox.org/meta/871sdfzy80.fsf@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

  reply	other threads:[~2018-06-13  2:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09 17:06 Some points on public-inbox Leah Neukirchen
2018-06-12 10:09 ` Eric Wong
2018-06-12 11:31   ` Leah Neukirchen
2018-06-13  2:07     ` Eric Wong [this message]
2018-06-13 14:26       ` [PATCH] Makefile.PL: do not depend on git Leah Neukirchen
2018-06-13 21:04         ` Eric Wong
2018-06-13 21:20           ` Leah Neukirchen
2018-06-13 21:40     ` Some points on public-inbox Eric Wong
2018-06-13 22:43       ` [PATCH] www: use undecoded paths for Message-ID extraction Eric Wong
2018-06-26  7:46         ` [PATCH] additional tests for bad Message-IDs in URLs Eric Wong
2018-06-12 13:19   ` Some points on public-inbox Leah Neukirchen
2019-01-05  8:39     ` Eric Wong
2018-06-12 17:05   ` Konstantin Ryabitsev
2018-06-13  1:57     ` Eric Wong
2019-04-18  8:25   ` [RFC] www: support listing of inboxes Eric Wong
2019-05-05 23:36     ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180613020759.cpl2ewenermewylw@dcvr \
    --to=e@80x24.org \
    --cc=leah@vuxu.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).