|
From: <mr...@mr...> - 2005-03-26 03:33:08
|
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/26 00:56:47+01:00 mr...@fo... =
# sub tc2_require for use by extensions
# =
# tools/tc2make
# 2005/03/26 00:56:47+01:00 mr...@fo... +9 -4
# sub tc2_require for use by extensions
# =
diff -Nru a/tools/tc2make b/tools/tc2make
--- a/tools/tc2make 2005-03-26 04:32:55 +01:00
+++ b/tools/tc2make 2005-03-26 04:32:55 +01:00
@@ -94,7 +94,7 @@
my @imports; # imported interface-symbol pairs
my %imports;
my @sources; # source files
-my @requires; # required interfaces
+my %requires; # required interfaces
my @tc2version; # TC2 version required
my @hooks;
my @confs; # Conf options
@@ -126,7 +126,7 @@
undef @imports;
undef %imports;
undef @sources;
- undef @requires;
+ undef %requires;
undef @tc2version;
undef @hooks;
undef @confs;
@@ -208,6 +208,10 @@
}
}
=
+sub tc2_require {
+ @requires{@_} =3D @_;
+}
+
sub tc2_extdata {
my($name, $data);
$extdata{$name} =3D $data;
@@ -255,7 +259,7 @@
} elsif (/^sources\s+(.+)$/) {
push @sources, split /\s+/, $1;
} elsif (/^require\s+\"(.+)\"$/) {
- push @requires, $1;
+ tc2_require $1;
} elsif (/^tc2version\s+(\d+)\.(\d+)\.(\d+)$/) {
@tc2version =3D ($1, $2, $3);
} elsif (/^add_hook\s+\"(.+)\"\s+(.+)$/) {
@@ -650,6 +654,7 @@
open $ifh, $file or print STDERR "$file: $!\n" and return;
=
while(<$ifh>){
+ s/#.*//;
next if (/^\s*$/);
if(/^\s*symbol\s+\"(.*?)\"\s+(.*)/){
$int{'symbols'}{$1} =3D $2;
@@ -801,7 +806,7 @@
my($hf) =3D @_;
=
my %h;
- for (map($$_[0], @imports), @requires, keys %interfaces) {
+ for (map($$_[0], @imports), keys %requires, keys %interfaces) {
my $h =3D symbol $_;
if(!exists $h{$h}){
print $hf "#include <$h.h>\n";
|