Skip to content

Commit 8422441

Browse files
committed
Revert "Test, fix override of subdir top_targets to "all : static""
This reverts commit c06ae49. Reason: the distro it was re-enabling for back-compat reasons (Archive::Unzip::Burst) is genuinely broken in that it currently installs a non-XS Burst.a in site_perl, which then leaves a perl installation that breaks EUMM building/testing static perl (the "makeaperl" target activated by "test_static") which expects all installed *.a to be valid XS.
1 parent c06ae49 commit 8422441

File tree

2 files changed

+3
-67
lines changed

2 files changed

+3
-67
lines changed

lib/ExtUtils/MM_Unix.pm

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -992,14 +992,7 @@ sub xs_make_dynamic_lib {
992992
my ($self, $attribs, $from, $to, $todir, $ldfrom, $exportlist) = @_;
993993
$exportlist = '' if $exportlist ne '$(EXPORT_LIST)';
994994
my $armaybe = $self->_xs_armaybe($attribs);
995-
# if there are subdirs and MYEXTLIB looks relative ie in a subdir and
996-
# looks like a static library, heuristic to ensure MYEXTLIB gets built
997-
my $subdirs_static = '';
998-
$subdirs_static = 'subdirs_static'
999-
if $self->{MYEXTLIB} &&
1000-
(File::Spec->rel2abs($self->{MYEXTLIB}) ne $self->{MYEXTLIB}) &&
1001-
$self->{MYEXTLIB} =~ /\Q$self->{LIB_EXT}\E|\$\(LIB_EXT\)\z/;
1002-
my @m = sprintf '%s : %s $(MYEXTLIB) %s$(DFSEP).exists %s $(PERL_ARCHIVEDEP) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP) %s'."\n", $to, $from, $todir, $exportlist, $subdirs_static;
995+
my @m = sprintf '%s : %s $(MYEXTLIB) %s$(DFSEP).exists %s $(PERL_ARCHIVEDEP) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)'."\n", $to, $from, $todir, $exportlist;
1003996
if ($armaybe ne ':'){
1004997
$ldfrom = 'tmp$(LIB_EXT)';
1005998
push(@m,' $(ARMAYBE) cr '.$ldfrom.' $(OBJECT)'."\n");
@@ -3586,12 +3579,11 @@ sub subdirs {
35863579
#### print "Including $dir subdirectory\n";
35873580
}
35883581
if (@m){
3589-
unshift @m, <<'EOF';
3590-
3582+
unshift(@m, "
35913583
# The default clean, realclean and test targets in this Makefile
35923584
# have automatically been given entries for each subdir.
35933585
3594-
EOF
3586+
");
35953587
} else {
35963588
push(@m, "\n# none")
35973589
}

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

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -194,61 +194,6 @@ $label2files{staticmulti} = +{
194194
),
195195
};
196196

197-
# mimic scheme in Archive::Unzip::Burst:
198-
# MYEXTLIB is res/lib*.a
199-
# top-level postamble deps res/unzip/Makefile off MYEXTLIB and builds res/unzip/*.o
200-
# res/M.PL overrides top_targets with:
201-
# "all : static"
202-
# "static : lib*.a"
203-
# "lib*.a : unzip/*.o -> ar makes lib*.a"
204-
# this scheme depends on top level subdirs (specifically res's "static")
205-
# being built before it tries its MYEXTLIB target
206-
$label2files{subdirsoverride} = +{
207-
%{ $label2files{'basic'} }, # make copy
208-
209-
'Makefile.PL' => sprintf(
210-
$MAKEFILEPL, 'Test', 'Test.pm', qq{'$typemap'},
211-
q{DEFINE => '-DINVAR=input', MYEXTLIB => 'Other/libover$(LIB_EXT)'},
212-
) . <<'EOF',
213-
package MY;
214-
sub postamble {
215-
my ($self) = @_;
216-
sprintf <<'MAKEFRAG', $self->cd($self->catdir(qw(Other sub)), '$(MAKE)');
217-
$(MYEXTLIB) :
218-
%s
219-
MAKEFRAG
220-
}
221-
EOF
222-
223-
'Other/Makefile.PL' => sprintf($MAKEFILEPL, 'Other', '../Test.pm', qq{}, '') . <<'EOF',
224-
package MY;
225-
sub top_targets {
226-
<<'MAKEFRAG';
227-
all :: static
228-
static :: libover$(LIB_EXT)
229-
libover$(LIB_EXT) : sub/notmuch$(OBJ_EXT)
230-
$(AR) cr "$@" "$<"
231-
$(RANLIB) "$@"
232-
MAKEFRAG
233-
}
234-
EOF
235-
236-
'Other/sub/Makefile.PL' => sprintf(
237-
$MAKEFILEPL, 'Third', '../../Test.pm', qq{}, 'OBJECT => q{$(O_FILES)}'
238-
) . <<'EOF',
239-
package MY;
240-
sub top_targets {
241-
<<'MAKEFRAG';
242-
all :: $(O_FILES)
243-
MAKEFRAG
244-
}
245-
EOF
246-
247-
'Other/sub/notmuch.c' => '',
248-
249-
};
250-
virtual_rename('subdirsoverride', 'lib/XS/Test.pm', 'Test.pm');
251-
252197
sub virtual_rename {
253198
my ($label, $oldfile, $newfile) = @_;
254199
$label2files{$label}->{$newfile} = delete $label2files{$label}->{$oldfile};
@@ -289,7 +234,6 @@ sub list_dynamic {
289234
[ 'multi', '', '' ],
290235
[ 'staticmulti', ' LINKTYPE=dynamic', ' LINKTYPE=dynamic' ],
291236
[ 'staticmulti', ' dynamic', '_dynamic' ],
292-
[ 'subdirsoverride', '', '' ],
293237
);
294238
}
295239

0 commit comments

Comments
 (0)