mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +08:00
Add output directory argument to generate-unicode_norm_table.pl
This is in preparation for building postgres with meson / ninja. When building with meson, commands are run at the root of the build tree. Add an option to put build output into the appropriate place. Author: Andres Freund <andres@anarazel.de> Author: Peter Eisentraut <peter@eisentraut.org> Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/5e216522-ba3c-f0e6-7f97-5276d0270029@enterprisedb.com
This commit is contained in:
parent
2bf626b714
commit
c8a9246e09
@ -10,20 +10,27 @@
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Getopt::Long;
|
||||
|
||||
use FindBin;
|
||||
use lib "$FindBin::RealBin/../../tools/";
|
||||
use PerfectHash;
|
||||
|
||||
my $output_table_file = "unicode_norm_table.h";
|
||||
my $output_func_file = "unicode_norm_hashfunc.h";
|
||||
my $output_path = '.';
|
||||
|
||||
GetOptions(
|
||||
'outdir:s' => \$output_path);
|
||||
|
||||
my $output_table_file = "$output_path/unicode_norm_table.h";
|
||||
my $output_func_file = "$output_path/unicode_norm_hashfunc.h";
|
||||
|
||||
|
||||
my $FH;
|
||||
|
||||
# Read list of codes that should be excluded from re-composition.
|
||||
my @composition_exclusion_codes = ();
|
||||
open($FH, '<', "CompositionExclusions.txt")
|
||||
or die "Could not open CompositionExclusions.txt: $!.";
|
||||
open($FH, '<', "$output_path/CompositionExclusions.txt")
|
||||
or die "Could not open $output_path/CompositionExclusions.txt: $!.";
|
||||
while (my $line = <$FH>)
|
||||
{
|
||||
if ($line =~ /^([[:xdigit:]]+)/)
|
||||
@ -38,8 +45,8 @@ close $FH;
|
||||
# and character decomposition mapping
|
||||
my @characters = ();
|
||||
my %character_hash = ();
|
||||
open($FH, '<', "UnicodeData.txt")
|
||||
or die "Could not open UnicodeData.txt: $!.";
|
||||
open($FH, '<', "$output_path/UnicodeData.txt")
|
||||
or die "Could not open $output_path/UnicodeData.txt: $!.";
|
||||
while (my $line = <$FH>)
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user