1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

More MSVC build support from Magnus.

This commit is contained in:
Tom Lane
2006-11-29 19:49:31 +00:00
parent 0943799f2d
commit ae8c1bea02
4 changed files with 411 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ sub GenerateFiles {
confess "Bad format of version: $self->{strver}\n"
}
$self->{numver} = sprintf("%d%02d%02d", $1, $2, $3?$3:0);
$self->{majorver} = sprintf("%d.%d", $1, $2);
}
}
close(C);
@@ -206,6 +207,19 @@ EOF
EOF
close(O);
}
my $mf = Project::read_file('src\backend\catalog\Makefile');
$mf =~ s{\\s*[\r\n]+}{}mg;
$mf =~ /^POSTGRES_BKI_SRCS\s*:=[^,]+,(.*)\)$/gm || croak "Could not find POSTGRES_BKI_SRCS in Makefile\n";
my @allbki = split /\s+/, $1;
foreach my $bki (@allbki) {
next if $bki eq "";
if (IsNewer('src/backend/catalog/postgres.bki', "src/include/catalog/$bki")) {
print "Generating postgres.bki...\n";
system("perl src/tools/msvc/genbki.pl $self->{majorver} src/backend/catalog/postgres " . join(' src/include/catalog/',@allbki));
last;
}
}
}
sub AddProject {