Commit | Line | Data |
f4a2945e |
1 | use ExtUtils::MakeMaker; |
2 | |
3 | WriteMakefile( |
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 |
8 | ); |
9 | |
376b1d05 |
10 | package MY; |
11 | |
d7f54dbf |
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 |
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 | ' |
d7f54dbf |
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 |
376b1d05 |
31 | '; |
32 | } |
33 | |
d7f54dbf |
34 | sub xs_o { |
376b1d05 |
35 | my($self) = shift; |
36 | return '' unless $self->needs_linking(); |
37 | ' |
5f929d0c |
38 | |
d7f54dbf |
39 | Util$(OBJ_EXT): ListUtil.c |
40 | $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) ListUtil.c |
41 | $(MV) ListUtil$(OBJ_EXT) Util$(OBJ_EXT) |
5f929d0c |
42 | '; |
43 | } |
44 | |
376b1d05 |
45 | __EOMM__ |
46 | } |
47 | } |