Commit | Line | Data |
42793c05 |
1 | use ExtUtils::MakeMaker; |
2 | |
3 | # The existence of the ./sdbm/Makefile.PL file causes MakeMaker |
4 | # to automatically include Makefile code for the targets |
5 | # config, all, clean, realclean and sdbm/Makefile |
6 | # which perform the corresponding actions in the subdirectory. |
7 | |
3e3baf6d |
8 | $define = ($^O eq 'MSWin32') ? '-DMSDOS' : ''; |
17f28c40 |
9 | if ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; } |
10 | else { $myextlib = 'sdbm/libsdbm$(LIB_EXT)'; } |
137443ea |
11 | |
42793c05 |
12 | WriteMakefile( |
bf99883d |
13 | NAME => 'SDBM_File', |
14 | MYEXTLIB => $myextlib, |
69158f75 |
15 | MAN3PODS => {}, # Pods will be built by installman. |
bf99883d |
16 | XSPROTOARG => '-noprototypes', # XXX remove later? |
17 | VERSION_FROM => 'SDBM_File.pm', |
18 | DEFINE => $define, |
ee13e175 |
19 | PERL_MALLOC_OK => 1, |
bf99883d |
20 | ); |
42793c05 |
21 | |
22 | sub MY::postamble { |
146174a9 |
23 | if ($^O =~ /MSWin32/ && Win32::IsWin95()) { |
24 | # XXX: dmake-specific, like rest of Win95 port |
25 | return |
26 | ' |
27 | $(MYEXTLIB): sdbm/Makefile |
28 | @[ |
29 | cd sdbm |
30 | $(MAKE) all |
31 | cd .. |
32 | ] |
33 | '; |
34 | } |
35 | elsif ($^O ne 'VMS') { |
42793c05 |
36 | ' |
37 | $(MYEXTLIB): sdbm/Makefile |
137443ea |
38 | cd sdbm && $(MAKE) all |
42793c05 |
39 | '; |
146174a9 |
40 | } |
41 | else { |
42 | ' |
17f28c40 |
43 | $(MYEXTLIB) : [.sdbm]descrip.mms |
bf99883d |
44 | set def [.sdbm] |
45 | $(MMS) all |
46 | set def [-] |
47 | '; |
48 | } |
42793c05 |
49 | } |