mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
Clarify the regexp used to detect source files in MSVC builds.
The old pattern would match files with strange extensions like *.ry or *.lpp. Refactor it to only include files with known extensions, and to make it more readable. Per Andrew Dunstan's suggestion.
This commit is contained in:
parent
c340494235
commit
ce01548d4f
@ -127,7 +127,7 @@ EOF
|
||||
foreach my $fileNameWithPath (sort keys %{ $self->{files} })
|
||||
{
|
||||
confess "Bad format filename '$fileNameWithPath'\n"
|
||||
unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.[r]?[cyl]$/);
|
||||
unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.(c|cpp|y|l|rc)$/);
|
||||
my $dir = $1;
|
||||
my $fileName = $2;
|
||||
if ($fileNameWithPath =~ /\.y$/ or $fileNameWithPath =~ /\.l$/)
|
||||
|
@ -71,7 +71,7 @@ EOF
|
||||
foreach my $fileNameWithPath (sort keys %{ $self->{files} })
|
||||
{
|
||||
confess "Bad format filename '$fileNameWithPath'\n"
|
||||
unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.[r]?[cyl]$/);
|
||||
unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.(c|cpp|y|l|rc)$/);
|
||||
my $dir = $1;
|
||||
my $file = $2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user