about summary refs log tree commit homepage
path: root/Makefile.PL
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL13
1 files changed, 13 insertions, 0 deletions
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];