xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/ext/List/Util/Makefile.PL (revision 0:68f95e015346)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22use ExtUtils::MakeMaker;
23
24WriteMakefile(
25    VERSION_FROM    => "lib/List/Util.pm",
26    MAN3PODS        => {},  # Pods will be built by installman.
27    NAME            => "List::Util",
28    DEFINE          => "-DPERL_EXT",
29);
30
31package MY;
32
33# We go through the ListUtil.c trickery to foil platforms
34# that have the feature combination of
35# (1) static builds
36# (2) allowing only one object by the same name in the static library
37# (3) the object name matching being case-blind
38# This means that we can't have the top-level util.o
39# and the extension-level Util.o in the same build.
40# One such platform is the POSIX-BC BS2000 EBCDIC mainframe platform.
41
42BEGIN {
43    use Config;
44    unless (defined $Config{usedl}) {
45	eval <<'__EOMM__';
46sub xs_c {
47    my($self) = shift;
48    return '' unless $self->needs_linking();
49'
50ListUtil.c:	Util.xs
51	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) Util.xs > ListUtil.xsc && $(MV) ListUtil.xsc ListUtil.c
52';
53}
54
55sub xs_o {
56    my($self) = shift;
57    return '' unless $self->needs_linking();
58'
59
60Util$(OBJ_EXT):	ListUtil.c
61	$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) ListUtil.c
62	$(MV) ListUtil$(OBJ_EXT) Util$(OBJ_EXT)
63';
64}
65
66__EOMM__
67    }
68}
69