X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=36093c161ac0acf397e42486d2d3714695450d0b;hb=e039f69b1c5738d36046f24f45d07b49336b4eab;hp=a2917a8fa1872d9c756bcf9484f0ec2f73c388e6;hpb=38bf2a2585e26a47c919fd4c286b7716acb51c00;p=gitmo%2FMoose.git diff --git a/Makefile.PL b/Makefile.PL index a2917a8..36093c1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,76 +1,20 @@ use strict; use warnings; -use Config; -use ExtUtils::MakeMaker; +use ExtUtils::MakeMaker::Dist::Zilla::Develop; -warn <<'EOF'; +use lib 'inc'; - ********************************* WARNING ********************************** +use MMHelper; +use MyInline; - This module uses Dist::Zilla for development. This Build.PL will let you run - the tests, but you are encouraged to install Dist::Zilla and the needed - plugins if you intend on doing any serious hacking. +system( $^X, 'author/extract-inline-tests', '--quiet' ); - **************************************************************************** - -EOF - -my $ccflags = ( $Config::Config{ccflags} || '' ) . ' -I.'; -$ccflags .= ' -Wall -Wdeclaration-after-statement'; - -my %mm = ( CCFLAGS => $ccflags ); - -{ - my (@OBJECT, %XS); - - for my $xs () { - (my $c = $xs) =~ s/\.xs$/.c/i; - (my $o = $xs) =~ s/\.xs$/\$(OBJ_EXT)/i; - - $XS{$xs} = $c; - push @OBJECT, $o; - } - - for my $c (<*.c>) { - (my $o = $c) =~ s/\.c$/\$(OBJ_EXT)/i; - push @OBJECT, $o; - } - - %mm = ( - %mm, - clean => { FILES => join( q{ }, @OBJECT ) }, - OBJECT => join( q{ }, @OBJECT ), - XS => \%XS, - ); -} +eval MMHelper::my_package_subs(); WriteMakefile( NAME => 'Moose', - %mm, + test => { TESTS => 't/*.t t/*/*.t' }, + CCFLAGS => MMHelper::ccflags_static('dev'), + MMHelper::mm_args(), ); - -package MY; - -use Config; - -sub const_cccmd { - my $ret = shift->SUPER::const_cccmd(@_); - return q{} unless $ret; - - if ($Config{cc} =~ /^cl\b/i) { - warn 'you are using MSVC... my condolences.'; - $ret .= ' /Fo$@'; - } - else { - $ret .= ' -o $@'; - } - - return $ret; -} - -sub postamble { - return <<'EOF'; -$(OBJECT) : mop.h -EOF -}