postamble <<"EOM";
fresh_manifest : remove_manifest manifest
+@{[ $crlf_fixup->('MANIFEST') ]}
remove_manifest :
\t\$(RM_F) MANIFEST
\tperldoc -u lib/DBIx/Class.pm > $dist_pod_fn
\t@{[ $mm_proto->oneliner(
- "s!^.*?this line is replaced with the author list.*! qq{List of the awesome contributors who made DBIC v$ver possible\n\n} . qx(\$^X -Ilib maint/gen_pod_authors)!me",
- [qw( -0777 -p -i )]
+ "s!^.*?this line is replaced with the author list.*! qq{List of the awesome contributors who made DBIC v$ver possible\\n\\n} . qx(\$^X -Ilib maint/gen_pod_authors)!me",
+ [qw( -0777 -p -i.arghwin32 )]
) ]} $dist_pod_fn
+\t\$(RM_F) $dist_pod_fn.arghwin32
create_distdir : dbic_distdir_defang_authors
# Remove the maintainer-only warning (be nice ;)
dbic_distdir_defang_authors :
-\t@{[ $mm_proto->oneliner('s/ ^ \s* \# \s* \*\*\* .+ \n ( ^ \s* \# \s*? \n )? //xmg', [qw( -0777 -p -i )] ) ]} \$(DISTVNAME)/AUTHORS
+\t@{[ $mm_proto->oneliner('s/ ^ \s* \# \s* \*\*\* .+ \n ( ^ \s* \# \s*? \n )? //xmg', [qw( -0777 -p -i.arghwin32 )] ) ]} \$(DISTVNAME)/AUTHORS
+@{[ $crlf_fixup->( '$(DISTVNAME)/AUTHORS' ) ]}
+\t\$(RM_F) \$(DISTVNAME)/AUTHORS.arghwin32
EOP
}
dbic_distdir_regen_license :
@{[ $start_file->( Meta->name . '-' . Meta->version . '/LICENSE' ) ]}
\t@{[ $mm_proto->oneliner('cat', ['-MExtUtils::Command']) ]} LICENSE >> \$(DISTVNAME)/LICENSE
+@{[ $crlf_fixup->('$(DISTVNAME)/LICENSE') ]}
EOP
my @xt_dist_tests = map { "$_/*.t" } sort keys %$xt_dist_dirs;
+my $parallel_jobs = ( $^O eq 'MSWin32' )
+ ? 1 # FIXME for some reason windows hangs on parallel jobs at `make dist`
+ : 4
+;
+
# inject an explicit xt test run, mainly to check the contents of
# lib and the generated POD's *before* anything is copied around
#
# perl cmd
join( ' ',
'$(ABSPERLRUN)',
- map { $mm_proto->quote_literal($_) } qw(-e $ENV{RELEASE_TESTING}=1;$ENV{HARNESS_OPTIONS}=j4;)
+ map { $mm_proto->quote_literal($_) } (
+ '-e',
+ "\$ENV{RELEASE_TESTING}=1;\$ENV{HARNESS_OPTIONS}=j$parallel_jobs;"
+ ),
),
# test list
join( ' ',
# perl cmd
join( ' ',
'$(ABSPERLRUN)',
- map { $mm_proto->quote_literal($_) } qw(-Ilib -e $ENV{RELEASE_TESTING}=1;$ENV{HARNESS_OPTIONS}=j4;)
+ map { $mm_proto->quote_literal($_) } (
+ '-Ilib',
+ '-e',
+ "\$ENV{RELEASE_TESTING}=1;\$ENV{HARNESS_OPTIONS}=j$parallel_jobs;"
+ ),
),
'xt/dist/postdistdir/*.t',
)
Test::NoTabs::all_perl_files_ok(@pl_targets);
# check some non-"perl files" in the root separately
-# use .gitignore as a guide of what to skip
-# (or do not test at all if no .gitignore is found)
+my @root_files = grep { -f $_ } bsd_glob('*');
+
+# use .gitignore as a partial guide of what to skip
if (open(my $gi, '<', '.gitignore')) {
my $skipnames;
while (my $ln = <$gi>) {
$skipnames->{$_}++ for bsd_glob($ln);
}
- # that we want to check anyway
- delete $skipnames->{'META.yml'};
+ # these we want to check no matter what the above says
+ delete $skipnames->{qw(
+ Changes
+ LICENSE
+ AUTHORS
+ README
+ MANIFEST
+ META.yml
+ META.json
+ )};
+
+ @root_files = grep { ! $skipnames->{$_} } @root_files;
+}
- for my $fn (bsd_glob('*')) {
- next if $skipnames->{$fn};
- next unless -f $fn;
- Test::EOL::eol_unix_ok($fn, { trailing_whitespace => 1 });
- Test::NoTabs::notabs_ok($fn);
- }
+for my $fn (@root_files) {
+ Test::EOL::eol_unix_ok($fn, { trailing_whitespace => 1 });
+ Test::NoTabs::notabs_ok($fn) unless $fn eq 'MANIFEST'; # it is always tab infested
}
# FIXME - Test::NoTabs and Test::EOL declare 'no_plan' which conflicts with done_testing