Re: [PATCH] perlhack.pod
[p5sagit/p5-mst-13.2.git] / ext / Hash / Util / Makefile.PL
CommitLineData
96c33d98 1use ExtUtils::MakeMaker;
2
3# this file was templated from ext/List/Util/Makefile.PL
4# thanks to Graham Barr who wrote that module.
5
6WriteMakefile(
7 VERSION_FROM => "lib/Hash/Util.pm",
8 MAN3PODS => {}, # Pods will be built by installman.
9 NAME => "Hash::Util",
10 DEFINE => "-DPERL_EXT",
11);
12
13package MY;
14
15# We go through the HashUtil.c trickery to foil platforms
16# that have the feature combination of
17# (1) static builds
18# (2) allowing only one object by the same name in the static library
19# (3) the object name matching being case-blind
20# This means that we can't have the top-level util.o
21# and the extension-level Util.o in the same build.
22# One such platform is the POSIX-BC BS2000 EBCDIC mainframe platform.
23
24BEGIN {
25 use Config;
26 unless (defined $Config{usedl}) {
27 eval <<'__EOMM__';
28sub xs_c {
29 my($self) = shift;
30 return '' unless $self->needs_linking();
31'
32HashUtil.c: Util.xs
33 $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) Util.xs > HashUtil.xsc && $(MV) HashUtil.xsc HashUtil.c
34';
35}
36
37sub xs_o {
38 my($self) = shift;
39 return '' unless $self->needs_linking();
40'
41
42Util$(OBJ_EXT): HashUtil.c
43 $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) HashUtil.c
44 $(MV) HashUtil$(OBJ_EXT) Util$(OBJ_EXT)
45';
46}
47
48__EOMM__
49 }
50}