File: Makefile.PL

package info (click to toggle)
libapache2-mod-perl2 2.0.9~1624218-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 11,840 kB
  • sloc: perl: 95,064; ansic: 14,522; makefile: 49; sh: 18
file content (32 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use lib qw(../lib);
use ModPerl::BuildMM ();

my $srcdir = '../../../src/modules/perl';
#link these two into Const.so so constants can be used outside of httpd
my @names = map { "modperl_$_" } qw(const constants);
my(@obj, @clean, %src);

for (@names) {
    push @obj, join '.', $_, 'o';
    my $cfile = join '.', $_, 'c';
    push @clean, $cfile;
    $src{$cfile} = "$srcdir/$cfile";
}

ModPerl::BuildMM::WriteMakefile(
    NAME => 'ModPerl::Const',
    VERSION_FROM => 'Const.pm',
    OBJECT => "Const.o @obj",
    clean => { FILES => "@clean" },
);

sub MY::postamble {
    my $self = shift;
    my $string = $self->ModPerl::BuildMM::MY::postamble;

    $string .= join '', map {
        "$_: $src{$_}\n\t\$(CP) $src{$_} .\n";
    } keys %src;

    return $string;
}