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