@@ -3619,8 +3619,10 @@ TEST_FILES = $tests
36193619TESTDB_SW = -d
36203620
36213621testdb :: testdb_\$ (LINKTYPE)
3622+ \$ (NOECHO) \$ (NOOP)
36223623
36233624test :: \$ (TEST_TYPE) subdirs-test
3625+ \$ (NOECHO) \$ (NOOP)
36243626
36253627subdirs-test ::
36263628 \$ (NOECHO) \$ (NOOP)
@@ -3629,6 +3631,10 @@ subdirs-test ::
36293631pure_nolink ::
36303632 \$ (NOECHO) \$ (NOOP)
36313633
3634+ # Occasionally we may face this degenerate target:
3635+ test_ : test_dynamic
3636+ \$ (NOECHO) \$ (NOOP)
3637+
36323638" );
36333639
36343640 foreach my $dir (@{ $self -> {DIR } }) {
@@ -3641,26 +3647,21 @@ subdirs-test ::
36413647END
36423648 }
36433649
3644- push (@m , " \t\$ (NOECHO) \$ (ECHO) 'No tests defined for \$ (NAME) extension.'\n " )
3645- unless $tests or -f " test.pl" or @{$self -> {DIR }};
3646- push (@m , " \n " );
3647-
36483650 push (@m , " test_dynamic :: dynamic\n " );
36493651 push (@m , $self -> test_via_harness(' $(FULLPERLRUN)' , ' $(TEST_FILES)' ))
36503652 if $tests ;
36513653 push (@m , $self -> test_via_script(' $(FULLPERLRUN)' , ' $(TEST_FILE)' ))
36523654 if -f " test.pl" ;
3655+ push (@m , " \t\$ (NOECHO) \$ (ECHO) 'No tests defined for \$ (NAME) extension.'\n " )
3656+ unless $tests or -f " test.pl" or @{$self -> {DIR }};
36533657 push (@m , " \n " );
36543658
36553659 push (@m , " testdb_dynamic :: dynamic\n " );
36563660 push (@m , $self -> test_via_script(' $(FULLPERLRUN) $(TESTDB_SW)' ,
36573661 ' $(TEST_FILE)' ));
36583662 push (@m , " \n " );
36593663
3660- # Occasionally we may face this degenerate target:
3661- push @m , " test_ : test_dynamic\n\n " ;
3662-
3663- if ($self -> needs_linking()) {
3664+ if ($self -> needs_linking and ($tests or -f " test.pl" )) {
36643665 push (@m , " test_static :: static \$ (MAP_TARGET)\n " );
36653666 my $target = File::Spec-> rel2abs(' $(MAP_TARGET)' );
36663667 my $command = qq{ "$target " \$ (MAP_PERLINC)} ;
0 commit comments