ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/staticperl/perl/ext/re/Makefile.PL
Revision: 1.1
Committed: Thu Jun 30 14:27:06 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 File::Spec;
3     use Config;
4    
5     my $object = 're_exec$(OBJ_EXT) re_comp$(OBJ_EXT) re$(OBJ_EXT)';
6    
7     my $defines = '-DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG -DPERL_EXT';
8    
9     WriteMakefile(
10     NAME => 're',
11     VERSION_FROM => 're.pm',
12     MAN3PODS => {}, # Pods will be built by installman.
13     XSPROTOARG => '-noprototypes',
14     OBJECT => $object,
15     DEFINE => $defines,
16     clean => { FILES => '*$(OBJ_EXT) *.c ../../lib/re.pm' },
17     );
18    
19     package MY;
20    
21     sub upupfile {
22     File::Spec->catfile(File::Spec->updir, File::Spec->updir, $_[0]);
23     }
24    
25     sub postamble {
26     my $regcomp_c = upupfile('regcomp.c');
27     my $regexec_c = upupfile('regexec.c');
28    
29     <<EOF;
30     re_comp.c : $regcomp_c
31     - \$(RM_F) re_comp.c
32     \$(CP) $regcomp_c re_comp.c
33    
34     re_comp\$(OBJ_EXT) : re_comp.c
35    
36     re_exec.c : $regexec_c
37     - \$(RM_F) re_exec.c
38     \$(CP) $regexec_c re_exec.c
39    
40     re_exec\$(OBJ_EXT) : re_exec.c
41    
42     EOF
43     }
44    
45     sub MY::c_o {
46     my($self) = @_;
47     package MY; # so that "SUPER" works right
48     my $inh = $self->SUPER::c_o(@_);
49     use Config;
50     if ($Config{osname} eq 'aix' && $Config{ccversion} eq '5.0.1.0') {
51     # Known buggy optimizer.
52     my $cccmd = $self->const_cccmd;
53     $cccmd =~ s/^CCCMD\s*=\s*//;
54     $cccmd =~ s/\s\$\(OPTIMIZE\)\s/ /;
55     $inh .= qq{
56    
57     re_comp\$\(OBJ_EXT\): re_comp.c
58     \t$cccmd \$(CCCDLFLAGS) -I\$(PERL_INC) \$(DEFINE) \$*.c
59     };
60     }
61     $inh;
62     }