From: Peter Rabbitson Date: Wed, 20 Feb 2013 09:35:00 +0000 (+0100) Subject: Even more distbuilding checks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f264099c62b2fde7e3dffac18b33160aa2ee463;p=dbsrgits%2FDBIx-Class-Historic.git Even more distbuilding checks Frew's environment (and *only* his environment) keeps producing weirdly broken dists. Add an extra check for this until we figure out how exactly his environment is broken. Extra check tested on cygwin and strawberry for good measure. --- diff --git a/maint/Makefile.PL.inc/91_inc_sanity_check.pl b/maint/Makefile.PL.inc/91_inc_sanity_check.pl new file mode 100644 index 0000000..80dd107 --- /dev/null +++ b/maint/Makefile.PL.inc/91_inc_sanity_check.pl @@ -0,0 +1,29 @@ +my @files_to_check = qw(AutoInstall.pm Can.pm WriteAll.pm Win32.pm); + +END { + # shit already hit the fan + return if $?; + + for my $f (@files_to_check) { + if (! -f "inc/Module/Install/$f") { + warn "Your inc/ does not contain a critical Module::Install component - \$_. Something went horrifically wrong... please ask the cabal for help\n"; + unlink 'Makefile'; + exit 1; + } + } +} + +my $oneliner = <<"EOO"; +-f qq(\$(DISTVNAME)/inc/Module/Install/\$_) or die "\\nYour \$(DISTVNAME)/inc/ does not contain a critical Module::Install component: \$_. Something went horrifically wrong... please ask the cabal for help\\n\\n" for (qw(@files_to_check)) +EOO + +postamble <<"EOP"; +create_distdir : sanity_check_inc + +sanity_check_inc : +\t\$(NOECHO) @{[ $mm_proto->oneliner($oneliner) ]} + +EOP + +# keep the Makefile.PL eval happy +1;