Commit | Line | Data |
42793c05 |
1 | use ExtUtils::MakeMaker; |
00b02797 |
2 | use Config; |
42793c05 |
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 |
10 | if ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; } |
11 | else { $myextlib = 'sdbm/libsdbm$(LIB_EXT)'; } |
137443ea |
12 | |
42793c05 |
13 | WriteMakefile( |
bf99883d |
14 | NAME => 'SDBM_File', |
15 | MYEXTLIB => $myextlib, |
69158f75 |
16 | MAN3PODS => {}, # Pods will be built by installman. |
bf99883d |
17 | XSPROTOARG => '-noprototypes', # XXX remove later? |
18 | VERSION_FROM => 'SDBM_File.pm', |
19 | DEFINE => $define, |
ee13e175 |
20 | PERL_MALLOC_OK => 1, |
bf99883d |
21 | ); |
42793c05 |
22 | |
23 | sub MY::postamble { |
7a958ec3 |
24 | if ($^O =~ /MSWin32/ && Win32::IsWin95()) { |
00b02797 |
25 | if ($Config{'make'} =~ /dmake/i) { |
26 | # dmake-specific |
27 | return <<EOT; |
7a958ec3 |
28 | $(MYEXTLIB): sdbm/Makefile |
29 | @[ |
30 | cd sdbm |
31 | $(MAKE) all |
32 | cd .. |
33 | ] |
00b02797 |
34 | EOT |
35 | } elsif ($Config{'make'} =~ /nmake/i) { |
36 | # |
37 | return <<EOT; |
38 | $(MYEXTLIB): sdbm/Makefile |
39 | cd sdbm |
40 | $(MAKE) all |
41 | cd .. |
42 | EOT |
43 | } |
44 | } elsif ($^O ne 'VMS') { |
42793c05 |
45 | ' |
46 | $(MYEXTLIB): sdbm/Makefile |
137443ea |
47 | cd sdbm && $(MAKE) all |
42793c05 |
48 | '; |
7a958ec3 |
49 | } |
50 | else { |
51 | ' |
17f28c40 |
52 | $(MYEXTLIB) : [.sdbm]descrip.mms |
bf99883d |
53 | set def [.sdbm] |
54 | $(MMS) all |
55 | set def [-] |
56 | '; |
57 | } |
42793c05 |
58 | } |