bc31b2c2cc6d7243060d4688d495bc109a70dccc
[p5sagit/p5-mst-13.2.git] / ext / re / Makefile.PL
1 use ExtUtils::MakeMaker;
2 use File::Spec;
3
4 WriteMakefile(
5     NAME                => 're',
6     VERSION_FROM        => 're.pm',
7     MAN3PODS            => {},  # Pods will be built by installman.
8     XSPROTOARG          => '-noprototypes',
9     OBJECT              => 're_exec$(OBJ_EXT) re_comp$(OBJ_EXT) re$(OBJ_EXT)',
10     DEFINE              => '-DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG',
11     clean               => { FILES => '*$(OBJ_EXT) *.c ../../lib/re.pm' },
12 );
13
14 package MY;
15
16 sub upupfile {
17     File::Spec->catfile(File::Spec->updir, File::Spec->updir, $_[0]);
18 }
19
20 sub postamble {
21     my $regcomp_c = upupfile('regcomp.c');
22     my $regexec_c = upupfile('regexec.c');
23
24     <<EOF;
25 re_comp.c : $regcomp_c
26         - \$(RM_F) re_comp.c
27         \$(CP) $regcomp_c re_comp.c
28
29 re_comp\$(OBJ_EXT) : re_comp.c
30
31 re_exec.c : $regexec_c
32         - \$(RM_F) re_exec.c
33         \$(CP) $regexec_c re_exec.c
34
35 re_exec\$(OBJ_EXT) : re_exec.c
36
37 EOF
38 }