This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
applied VMS patch from Dan Sugalski
[perl5.git] / ext / SDBM_File / sdbm / Makefile.PL
CommitLineData
42793c05 1use ExtUtils::MakeMaker;
137443ea
PP
2
3$define = '-DSDBM -DDUFF';
9c293c15 4$define .= ' -DWIN32 -DPERL_STATIC_SYMS' if ($^O eq 'MSWin32');
137443ea 5
17f28c40
CB
6if ($^O eq 'VMS') { # Old VAXC compiler can't handle Duff's device
7 require Config;
8 $define =~ s/\s+-DDUFF// if $Config::Config{'vms_cc_type'} eq 'vaxc';
9}
10
42793c05 11WriteMakefile(
ba14e5f0 12 NAME => 'sdbm', # (doesn't matter what the name is here) oh yes it does
bf99883d 13# LINKTYPE => 'static',
137443ea 14 DEFINE => $define,
4dcba783 15 INC => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
17f28c40
CB
16 INST_ARCHLIB => '.',
17 SKIP => [qw(dynamic dynamic_lib dlsyms)],
18 OBJECT => '$(O_FILES)',
74767600
PP
19 clean => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'},
20 H => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
21 C => [qw(sdbm.c pair.c hash.c)]
42793c05
TB
22);
23
137443ea
PP
24sub MY::post_constants {
25'
26INST_STATIC = libsdbm$(LIB_EXT)
27'
28}
42793c05
TB
29
30sub MY::top_targets {
ffea5178 31 my $r = '
42793c05 32all :: static
17f28c40 33 $(NOECHO) $(NOOP)
42793c05 34
42793c05 35config ::
17f28c40 36 $(NOECHO) $(NOOP)
42793c05
TB
37
38lint:
39 lint -abchx $(LIBSRCS)
02c45c47 40
ffea5178
DS
41';
42 $r .= '
02c45c47
GS
43# This is a workaround, the problem is that our old GNU make exports
44# variables into the environment so $(MYEXTLIB) is set in here to this
45# value which can not be built.
46sdbm/libsdbm.a:
ffea5178
DS
47 $(NOECHO) $(NOOP)
48' unless $^O eq 'VMS';
49
50 return $r;
42793c05 51}