sub new {
my ($class, $args) = @_;
+ my %test = %{$args->{test}||{}};
+ my $tests = $test{TESTS} || 't/*.t';
+ $tests !~ /\b\Q$_\E\b/ and $tests .= " $_"
+ for 'xt/*.t', 'xt/*/*.t';
+ $test{TESTS} = $tests;
return $class->SUPER::new({
LICENSE => 'perl_5',
MIN_PERL_VERSION => '5.006',
AUTHOR => ($MM_VER >= 6.5702 ? $Distar::Author : join(', ', @$Distar::Author)),
(exists $args->{ABSTRACT} ? () : (ABSTRACT_FROM => $args->{VERSION_FROM})),
%$args,
- test => { TESTS => ($args->{test}{TESTS}||'t/*.t').' xt/*.t xt/*/*.t' },
+ test => \%test,
realclean => { FILES => (
($args->{realclean}{FILES}||'')
. ' Distar/ MANIFEST.SKIP MANIFEST MANIFEST.bak'
my %vars = (
DISTAR => $self->quote_literal($distar),
HELPERS => $self->quote_literal($helpers),
- REMAKE => join(' ', '$(PERLRUN)', 'Makefile.PL', map { $self->quote_literal($_) } @ARGV),
+ REMAKE => join(' ', '$(PERLRUN)', '-I$(DISTAR)/lib', '-mDistar', 'Makefile.PL', map { $self->quote_literal($_) } @ARGV),
BRANCH => $self->{BRANCH} ||= 'master',
CHANGELOG => $self->{CHANGELOG} ||= 'Changes',
DEV_NULL_STDOUT => ($self->{DEV_NULL} ? '>'.File::Spec->devnull : ''),
git push origin v$(VERSION) HEAD
distdir: readmefile
readmefile: create_distdir
- $(NOECHO) $(MAKE) $(DISTVNAME)/README
+ $(NOECHO) $(TEST_F) $(DISTVNAME)/README || $(MAKE) $(DISTVNAME)/README
$(DISTVNAME)/README: $(VERSION_FROM)
$(NOECHO) $(MKPATH) $(DISTVNAME)
pod2text $(VERSION_FROM) >$(DISTVNAME)/README
$(NOECHO) $(ABSPERLRUN) $(HELPERS)/add-to-manifest -d $(DISTVNAME) README
+distsignature: readmefile
disttest: distmanicheck
distmanicheck: create_distdir
cd $(DISTVNAME) && $(ABSPERLRUN) "-MExtUtils::Manifest=manicheck" -e "exit manicheck"
nextrelease:
$(ABSPERLRUN) $(HELPERS)/add-changelog-heading --git $(VERSION) $(CHANGELOG)
refresh:
- cd $(DISTAR) && git pull
+ cd $(DISTAR) && git pull || $(TRUE)
$(RM_F) $(FIRST_MAKEFILE)
$(REMAKE)
END