File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -2389,13 +2389,20 @@ Defines the linkext target which in turn defines the LINKTYPE.
2389
2389
2390
2390
=cut
2391
2391
2392
+ # LINKTYPE => static or dynamic or ''
2392
2393
sub linkext {
2393
2394
my ($self , %attribs ) = @_ ;
2394
- # LINKTYPE => static or dynamic or ''
2395
- my ($linktype ) = defined $attribs {LINKTYPE } ?
2396
- $attribs {LINKTYPE } : ' $(LINKTYPE)' ;
2395
+ my $extra = ' ' ; # so if LINKTYPE eq '' and there are DIR
2396
+ # we can bring in subdirs_(perl-linktype) for back-compat
2397
+ my $linktype = $attribs {LINKTYPE };
2398
+ $linktype = $self -> {LINKTYPE } unless defined $linktype ;
2399
+ if (defined $linktype and $linktype eq ' ' and @{ $self -> {DIR } || [] }) {
2400
+ warn " Warning: LINKTYPE set to '', no longer necessary\n " ;
2401
+ $extra = ' subdirs_' . $Config {usedl } ? ' dynamic' : ' static' ;
2402
+ }
2403
+ $linktype = ' $(LINKTYPE)' unless defined $linktype ;
2397
2404
"
2398
- linkext :: $linktype
2405
+ linkext :: $linktype $extra
2399
2406
\$ (NOECHO) \$ (NOOP)
2400
2407
" ;
2401
2408
}
You can’t perform that action at this time.
0 commit comments