This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
more Maintainers.pl version tweaks
[perl5.git] / ext / List-Util / Makefile.PL
CommitLineData
f4a2945e
JH
1use ExtUtils::MakeMaker;
2
3WriteMakefile(
4 VERSION_FROM => "lib/List/Util.pm",
5 NAME => "List::Util",
dbc2e2f5 6 DEFINE => "-DPERL_EXT",
f4a2945e
JH
7);
8
376b1d05
JH
9package MY;
10
d7f54dbf
JH
11# We go through the ListUtil.c trickery to foil platforms
12# that have the feature combination of
13# (1) static builds
14# (2) allowing only one object by the same name in the static library
15# (3) the object name matching being case-blind
16# This means that we can't have the top-level util.o
17# and the extension-level Util.o in the same build.
18# One such platform is the POSIX-BC BS2000 EBCDIC mainframe platform.
19
376b1d05
JH
20BEGIN {
21 use Config;
22 unless (defined $Config{usedl}) {
23 eval <<'__EOMM__';
24sub xs_c {
25 my($self) = shift;
26 return '' unless $self->needs_linking();
27'
d7f54dbf
JH
28ListUtil.c: Util.xs
29 $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) Util.xs > ListUtil.xsc && $(MV) ListUtil.xsc ListUtil.c
376b1d05
JH
30';
31}
32
d7f54dbf 33sub xs_o {
376b1d05
JH
34 my($self) = shift;
35 return '' unless $self->needs_linking();
36'
5f929d0c 37
d7f54dbf
JH
38Util$(OBJ_EXT): ListUtil.c
39 $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) ListUtil.c
40 $(MV) ListUtil$(OBJ_EXT) Util$(OBJ_EXT)
5f929d0c
IZ
41';
42}
43
376b1d05
JH
44__EOMM__
45 }
46}