Commits

Shlomi Fish committed 869c0ec

make distruntest now passes the Makefile.PL arguments.

Comments (0)

Files changed (1)

 
 # echo perl -pi~ -e '$$_=q($(version))."\n" if /#\ VERSION TEMPLATE/ ' $(TO_INST_PM)
 sub MY::postamble {
+    my $mpl_args = join " ", map qq["$_"], @ARGV;
 
     my $CC =
     (
             : ''
     );
 
-  return "$CC\n\n" . <<'MAKE_FRAG';
+  my $ret = "$CC\n\n" . <<'MAKE_FRAG';
 
 # used to update version numbers in all modules
 version:
         "local @INC = @INC;	unshift @INC, map { File::Spec->rel2abs(\$$_) } ('$(INST_LIB)', '$(INST_ARCHLIB)'); Test::Run::CmdLine::Iface->new({test_files => [glob(q{t/*.t})]})->run();"
 
 distruntest: distdir
-	cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
+	cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL {#mpl_args#}
 	cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
 	cd $(DISTVNAME) && $(MAKE) runtest $(PASTHRU)
 
 MAKE_FRAG
+
+    $ret =~ s/{#mpl_args#}/$mpl_args/;
+
+    return $ret;
 }