source: trunk/essentials/dev-lang/perl/ext/B/Makefile.PL

Last change on this file was 3181, checked in by bird, 18 years ago

perl 5.8.8

File size: 976 bytes
Line 
1use ExtUtils::MakeMaker;
2use Config;
3use File::Spec;
4
5my $e = $Config{'exe_ext'};
6my $o = $Config{'obj_ext'};
7my $exeout_flag = '-o ';
8if ($^O eq 'MSWin32') {
9 if ($Config{'cc'} =~ /^cl/i) {
10 $exeout_flag = '-Fe';
11 }
12 elsif ($Config{'cc'} =~ /^bcc/i) {
13 $exeout_flag = '-e';
14 }
15}
16
17WriteMakefile(
18 NAME => "B",
19 VERSION_FROM => "B.pm",
20 PL_FILES => { 'defsubs_h.PL' => 'defsubs.h' },
21 MAN3PODS => {},
22 clean => {
23 FILES => "perl$e *$o B.c defsubs.h *~"
24 }
25);
26
27package MY;
28
29sub post_constants {
30 "\nLIBS = $Config::Config{libs}\n"
31}
32
33sub upupfile {
34 File::Spec->catfile(File::Spec->updir,
35 File::Spec->updir, $_[0]);
36}
37
38sub MY::postamble {
39 my $op_h = upupfile('op.h');
40 my $cop_h = upupfile('cop.h');
41 my $noecho = shift->{NOECHO};
42"
43B\$(OBJ_EXT) : defsubs.h
44
45defsubs.h :: $op_h $cop_h defsubs_h.PL
46 \$(PERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) defsubs_h.PL defsubs.h
47"
48}
Note: See TracBrowser for help on using the repository browser.