My favorites | Sign in
Project Home Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
use ExtUtils::MakeMaker;
use Config;
use File::Spec;

my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV;

WriteMakefile(
NAME => "B::C",
VERSION_FROM => "B/C.pm",
# 'scripts/assemble','scripts/disassemble',
EXE_FILES => [ 'scripts/cc_harness','scripts/perlcc' ],
PREREQ_PM => {
'B::Concise' => '0.74',
'B' => '1.17',
},
);

sub headerpath {
if ($core) {
return File::Spec->catdir(File::Spec->updir,
File::Spec->updir);
} else {
return File::Spec->catdir($Config::Config{archlibexp}, "CORE");
}
}

package MY;

sub post_constants {
"\nLIBS = $Config::Config{libs}\n"
}

sub depend {
my $headerpath = main::headerpath();
my @headers = map { File::Spec->catfile($headerpath, $_) } qw(op.h cop.h sv.h);
my $asmdata = File::Spec->catfile('B', 'Asmdata.pm');
my $byterun_c = File::Spec->catfile('ByteLoader', 'byterun.c');
my $byterun_h = File::Spec->catfile('ByteLoader', 'byterun.h');
my $perlcc = File::Spec->catfile('scripts', 'perlcc');
"
$perlcc : $perlcc.PL
\$(PERL) $perlcc.PL

$asmdata : bytecode.pl @headers
\$(PERL) bytecode.pl

$byterun_c : bytecode.pl @headers
\$(PERL) bytecode.pl

$byterun_h : bytecode.pl @headers
\$(PERL) bytecode.pl
"
}

=pod

=for CORE only

sub postamble {
my $headerpath = main::headerpath();
my @headers = map { File::Spec->catfile($headerpath, $_) } qw(op.h cop.h);
my $noecho = shift->{NOECHO};

"
B\$(OBJ_EXT) : defsubs.h

defsubs.h :: @headers defsubs_h.PL
\$(PERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) defsubs_h.PL defsubs.h $headerpath
"
}

sub processPL {
my $text = shift->SUPER::processPL(@_);
# Append our extra parameter
$text =~ s/^\t.*defsubs_h\.PL.*/$& . ' ' . main::headerpath()/me;
$text;
}

=cut

Change log

c21739460ca5 by Reini Urban <rur...@x-ray.at> on Jul 28, 2008   Diff
Initial import B-C-1.04_01


git-svn-id: http://perl-
compiler.googlecode.com/svn/trunk@2
ed534f1a-1453-0410-ab30-dfc593a8b23c
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1799 bytes, 79 lines
Powered by Google Project Hosting