dumping ground for random patches and texts
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH 4/5] makefile: add `check-build' target
Date: Thu,  7 Dec 2023 11:42:45 +0000	[thread overview]
Message-ID: <20231207114246.3614375-4-e@80x24.org> (raw)
In-Reply-To: <20231207114246.3614375-1-e@80x24.org>

A quick build check can detect bugs more quickly normal runtime
tests.
---
 Makefile.PL | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Makefile.PL b/Makefile.PL
index 28f8263e..2b2e6b18 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -34,6 +34,19 @@ my @syn = (@EXE_FILES, grep(m!^lib/.*\.pm$!, @manifest), @scripts);
 @syn = grep(!/SaPlugin/, @syn) if !eval { require Mail::SpamAssasin };
 $v->{syn_files} = \@syn;
 $v->{my_syntax} = [map { "$_.syntax" } @syn];
+my %native = (
+	XapHelperCxx => [ qw(xh_cidx.h xh_mset.h xap_helper.h) ],
+);
+my @ck_build;
+for my $m (sort keys %native) {
+	my $hdr = $native{$m};
+	my @dep = map { "lib/PublicInbox/$_" } ("$m.pm", @$hdr);
+	$t->{"$m.check_build: @dep"} = [ "\$(PERL) -w -I lib ".
+		"-MPublicInbox::$m -e PublicInbox::${m}::check_build" ];
+	push @ck_build, "$m.check_build";
+}
+$t->{"check-build: @ck_build"} = [];
+
 my @no_pod;
 $v->{-m1} = [ map {
 		my $x = (split('/'))[-1];

  parent reply	other threads:[~2023-12-07 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 11:42 [PATCH 1/5] *search: simplify handling of Xapian term iterators Eric Wong
2023-12-07 11:42 ` [PATCH 2/5] *search: favor wantarray form of xap_terms Eric Wong
2023-12-07 11:42 ` [PATCH 3/5] xap_helper_cxx: drop chdir usage in build Eric Wong
2023-12-07 11:42 ` Eric Wong [this message]
2023-12-07 11:42 ` [PATCH 5/5] xap_helper: support term length limit 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

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

  git send-email \
    --in-reply-to=20231207114246.3614375-4-e@80x24.org \
    --to=e@80x24.org \
    --cc=spew@80x24.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).