ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/staticperl/perl/ext/B/Makefile.PL
Revision: 1.1
Committed: Thu Jun 30 14:26:43 2005 UTC (21 years, 5 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: PERL-5-8-7, HEAD
Branch point for: PERL
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 use ExtUtils::MakeMaker;
2     use Config;
3     use File::Spec;
4    
5     my $e = $Config{'exe_ext'};
6     my $o = $Config{'obj_ext'};
7     my $exeout_flag = '-o ';
8     if ($^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    
17     WriteMakefile(
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    
27     package MY;
28    
29     sub post_constants {
30     "\nLIBS = $Config::Config{libs}\n"
31     }
32    
33     sub upupfile {
34     File::Spec->catfile(File::Spec->updir,
35     File::Spec->updir, $_[0]);
36     }
37    
38     sub MY::postamble {
39     my $op_h = upupfile('op.h');
40     my $cop_h = upupfile('cop.h');
41     my $noecho = shift->{NOECHO};
42     "
43     B\$(OBJ_EXT) : defsubs.h
44    
45     defsubs.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     }