Skip to content

Commit 1f1af31

Browse files
committed
fix RT-117800 by adding dummy test_{static,dynamic} always
1 parent 870187d commit 1f1af31

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

lib/ExtUtils/MakeMaker.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,7 @@ sub selfdocument {
13561356
# gmake will silently still work if any are .PHONY-ed but nmake won't
13571357
EOF
13581358
push @m, join "\n", map "$_ ::\n\t\$(NOECHO) \$(NOOP)\n",
1359+
qw(test_static test_dynamic),
13591360
# config is so manifypods won't puke if no subdirs
13601361
grep !$self->{SKIPHASH}{$_},
13611362
qw(static dynamic config);

t/lib/MakeMaker/Test/Setup/XS.pm

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ sub MY::postamble {
248248
$MAKEFILEPL,
249249
'Other', 'Other.pm', qq{},
250250
<<'EOF',
251-
SKIP => [qw(all static dynamic )],
251+
SKIP => [qw(all static dynamic)],
252252
clean => {'FILES' => 'libparser$(LIB_EXT)'},
253253
EOF
254254
) . <<'EOF',
@@ -293,6 +293,29 @@ EOF
293293
};
294294
virtual_rename('subdirsskip', 'Other/lib/file.c', 'Other/file.c');
295295

296+
# to mimic behaviour of Math-CDF version 0.1
297+
$label2files{subdirsskip2} = +{
298+
%{ $label2files{subdirsskip} }, # make copy
299+
'Other/Makefile.PL' => sprintf(
300+
$MAKEFILEPL,
301+
'Other', 'Other.pm', qq{},
302+
<<'EOF',
303+
SKIP => [qw(all static static_lib dynamic dynamic_lib test_dynamic test)],
304+
clean => {'FILES' => 'libparser$(LIB_EXT)'},
305+
EOF
306+
) . <<'EOF',
307+
sub MY::top_targets {
308+
my ($self) = @_;
309+
<<'SNIP' . $self->static_lib_pure_cmd('$(O_FILES)');
310+
test ::
311+
all :: static
312+
static :: libparser$(LIB_EXT)
313+
libparser$(LIB_EXT): $(O_FILES)
314+
SNIP
315+
}
316+
EOF
317+
};
318+
296319
my $XS_MULTI = $XS_OTHER;
297320
# check compiling from top dir still can include local
298321
$XS_MULTI =~ s:(#include "XSUB.h"):$1\n#include "header.h":;
@@ -425,6 +448,7 @@ sub list_dynamic {
425448
) : (),
426449
[ 'xsbuild', '', '' ],
427450
[ 'subdirsskip', '', '' ],
451+
[ 'subdirsskip2', '', '' ],
428452
);
429453
}
430454

0 commit comments

Comments
 (0)