This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Some calls to PerlMemShared_alloc() aren't checking the return value.
[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
3e3baf6d 9$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
17f28c40
CB
10if ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; }
11else { $myextlib = 'sdbm/libsdbm$(LIB_EXT)'; }
137443ea 12
42793c05 13WriteMakefile(
bf99883d
HM
14 NAME => 'SDBM_File',
15 MYEXTLIB => $myextlib,
69158f75 16 MAN3PODS => {}, # Pods will be built by installman.
bf99883d
HM
17 XSPROTOARG => '-noprototypes', # XXX remove later?
18 VERSION_FROM => 'SDBM_File.pm',
19 DEFINE => $define,
ee13e175 20 PERL_MALLOC_OK => 1,
bf99883d 21 );
42793c05
TB
22
23sub MY::postamble {
7a958ec3 24 if ($^O =~ /MSWin32/ && Win32::IsWin95()) {
00b02797
JH
25 if ($Config{'make'} =~ /dmake/i) {
26 # dmake-specific
94bf5962 27 return <<'EOT';
7a958ec3
BS
28$(MYEXTLIB): sdbm/Makefile
29@[
30 cd sdbm
31 $(MAKE) all
32 cd ..
33]
00b02797
JH
34EOT
35 } elsif ($Config{'make'} =~ /nmake/i) {
36 #
94bf5962 37 return <<'EOT';
00b02797
JH
38$(MYEXTLIB): sdbm/Makefile
39 cd sdbm
40 $(MAKE) all
41 cd ..
42EOT
43 }
44} elsif ($^O ne 'VMS') {
42793c05
TB
45 '
46$(MYEXTLIB): sdbm/Makefile
137443ea 47 cd sdbm && $(MAKE) all
42793c05 48';
7a958ec3
BS
49 }
50 else {
51 '
17f28c40 52$(MYEXTLIB) : [.sdbm]descrip.mms
bf99883d
HM
53 set def [.sdbm]
54 $(MMS) all
55 set def [-]
56';
57 }
42793c05 58}