This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Changes
[perl5.git] / ext / List / Util / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 WriteMakefile(
4     VERSION_FROM    => "lib/List/Util.pm",
5     MAN3PODS        => {},  # Pods will be built by installman.
6     NAME            => "List::Util",
7     DEFINE          => "-DPERL_EXT",
8 );
9
10 package MY;
11
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
21 BEGIN {
22     use Config;
23     unless (defined $Config{usedl}) {
24         eval <<'__EOMM__';
25 sub xs_c {
26     my($self) = shift;
27     return '' unless $self->needs_linking();
28 '
29 ListUtil.c:     Util.xs
30         $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) Util.xs > ListUtil.xsc && $(MV) ListUtil.xsc ListUtil.c
31 ';
32 }
33
34 sub xs_o {
35     my($self) = shift;
36     return '' unless $self->needs_linking();
37 '
38
39 Util$(OBJ_EXT): ListUtil.c
40         $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) ListUtil.c
41         $(MV) ListUtil$(OBJ_EXT) Util$(OBJ_EXT)
42 ';
43 }
44
45 __EOMM__
46     }
47 }