Fix my lazy IO mistake
[p5sagit/Distar.git] / lib / Distar.pm
index fc6cae4..df7fb8f 100644 (file)
@@ -84,7 +84,8 @@ sub run_preflight {
   $cached[1] eq "+$ARGV[0] - $ymd\n" or die "Changes new line should be: \n\n$ARGV[0] - $ymd\n ";
 }
 
-sub MY::postamble { <<'END'; }
+sub MY::postamble {
+    my $post = <<'END';
 preflight:
        perl -IDistar/lib -MDistar -erun_preflight $(VERSION)
 release: preflight
@@ -101,6 +102,11 @@ readmefile: create_distdir
        pod2text $(VERSION_FROM) >$(DISTVNAME)/README
        $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-readme-to-manifest
 END
+    if (open my $fh, '<', 'maint/Makefile.include') {
+        $post .= do { local $/; <$fh> };
+    }
+    return $post;
+}
 
 {
   no warnings 'redefine';