From: Graham Knop Date: Mon, 11 Feb 2013 07:40:46 +0000 (-0500) Subject: include maint/Makefile.include if it exists X-Git-Tag: v0.001000~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ac9c6a698d586878cb8ec40a72893feba8e462b;p=p5sagit%2FDistar.git include maint/Makefile.include if it exists --- diff --git a/lib/Distar.pm b/lib/Distar.pm index fc6cae4..ad971be 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -84,7 +84,9 @@ 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 { + open my $fh, '<', 'maint/Makefile.include'; + ($fh ? do { local $/; <$fh> } : '' ) . <<'END'; preflight: perl -IDistar/lib -MDistar -erun_preflight $(VERSION) release: preflight @@ -101,6 +103,7 @@ readmefile: create_distdir pod2text $(VERSION_FROM) >$(DISTVNAME)/README $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-readme-to-manifest END +} { no warnings 'redefine';