This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
version-0.73 (was Re: Change 31920: Don't use ~0 as a version
[perl5.git] / ext / SDBM_File / Makefile.PL
CommitLineData
42793c05 1use ExtUtils::MakeMaker;
00b02797 2use Config;
42793c05
TB
3
4# The existence of the ./sdbm/Makefile.PL file causes MakeMaker
5# to automatically include Makefile code for the targets
6# config, all, clean, realclean and sdbm/Makefile
7# which perform the corresponding actions in the subdirectory.
8
4ad10cd1
DD
9# Work around: Darwin ppc64 bug ignores archive contents when building bundles
10
3e3baf6d 11$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
17f28c40 12if ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; }
4ad10cd1
DD
13elsif ($^O eq 'darwin' && $Config{'ldflags'} =~/-arch ppc64/) {
14 $myextlib = '-all_load sdbm/libsdbm$(LIB_EXT)'; }
17f28c40 15else { $myextlib = 'sdbm/libsdbm$(LIB_EXT)'; }
137443ea 16
42793c05 17WriteMakefile(
bf99883d
HM
18 NAME => 'SDBM_File',
19 MYEXTLIB => $myextlib,
69158f75 20 MAN3PODS => {}, # Pods will be built by installman.
bf99883d
HM
21 XSPROTOARG => '-noprototypes', # XXX remove later?
22 VERSION_FROM => 'SDBM_File.pm',
23 DEFINE => $define,
ee13e175 24 PERL_MALLOC_OK => 1,
bf99883d 25 );
42793c05
TB
26
27sub MY::postamble {
cf2f24a4 28 if ($^O =~ /MSWin32/ && !defined($ENV{SYSTEMROOT})) {
00b02797
JH
29 if ($Config{'make'} =~ /dmake/i) {
30 # dmake-specific
94bf5962 31 return <<'EOT';
7a958ec3
BS
32$(MYEXTLIB): sdbm/Makefile
33@[
34 cd sdbm
35 $(MAKE) all
36 cd ..
37]
00b02797
JH
38EOT
39 } elsif ($Config{'make'} =~ /nmake/i) {
40 #
94bf5962 41 return <<'EOT';
00b02797
JH
42$(MYEXTLIB): sdbm/Makefile
43 cd sdbm
44 $(MAKE) all
45 cd ..
46EOT
47 }
48} elsif ($^O ne 'VMS') {
42793c05
TB
49 '
50$(MYEXTLIB): sdbm/Makefile
137443ea 51 cd sdbm && $(MAKE) all
42793c05 52';
7a958ec3
BS
53 }
54 else {
55 '
17f28c40 56$(MYEXTLIB) : [.sdbm]descrip.mms
bf99883d
HM
57 set def [.sdbm]
58 $(MMS) all
59 set def [-]
60';
61 }
42793c05 62}