diff options
author | Mike Schilli <m@perlmeister.com> | 2001-04-24 18:29:21 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-27 12:45:39 +0000 |
commit | 1b99c731514ee0cc96f061cedd7325b0a94be362 (patch) | |
tree | f5b318d96dd4e9fb6dee5e30b01ed56e2b3cb1f7 /utils/h2xs.PL | |
parent | ff1a6a489418b33efc0878268a74dd4607101955 (diff) | |
download | perl-1b99c731514ee0cc96f061cedd7325b0a94be362.tar.gz |
MakeMaker 'make test' weirdness -- fix for h2xs provided
Message-id: <3AE68AE1.6A981723@perlmeister.com>
p4raw-id: //depot/perl@9880
Diffstat (limited to 'utils/h2xs.PL')
-rw-r--r-- | utils/h2xs.PL | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 1e78ec5cda..afd86b5215 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -1842,11 +1842,14 @@ it under the same terms as Perl itself. _RMEND_ close(RM) || die "Can't close $ext$modpname/README: $!\n"; -warn "Writing $ext$modpname/test.pl\n"; -open(EX, ">test.pl") || die "Can't create $ext$modpname/test.pl: $!\n"; +my $testdir = "t"; +my $testfile = "$testdir/1.t"; +mkdir "$testdir" or die "Cannot mkdir $testdir: $!\n"; +warn "Writing $ext$modpname/$testfile\n"; +open EX, ">$testfile" or die "Can't create $ext$modpname/$testfile: $!\n"; print EX <<'_END_'; # Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' +# `make test'. After `make install' it should work as `perl 1.t' ######################### @@ -1867,7 +1870,7 @@ ok(1); # If we made it this far, we're ok. # its man page ( perldoc Test ) for help writing this test script. _END_ -close(EX) || die "Can't close $ext$modpname/test.pl: $!\n"; +close(EX) || die "Can't close $ext$modpname/$testfile: $!\n"; unless ($opt_C) { warn "Writing $ext$modpname/Changes\n"; @@ -1887,7 +1890,7 @@ EOP warn "Writing $ext$modpname/MANIFEST\n"; open(MANI,'>MANIFEST') or die "Can't create MANIFEST: $!"; -my @files = <*>; +my @files = grep { -f } (<*>, <t/*>); if (!@files) { eval {opendir(D,'.');}; unless ($@) { @files = readdir(D); closedir(D); } |