Changeset 34767 in webkit for trunk/JavaScriptCore/pcre/dftables


Ignore:
Timestamp:
Jun 24, 2008, 7:33:32 AM (17 years ago)
Author:
Simon Hausmann
Message:

2008-06-24 Joerg Bornemann <[email protected]>

Reviewed by Simon.

For the Qt build on Windows don't depend on the presence of GNU CPP
but use MSVC's preprocessor instead.
dftables accepts a --preprocessor option which is set in pcre.pri for MSVC platforms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/pcre/dftables

    r31030 r34767  
    4848use File::Spec;
    4949use File::Temp;
     50use Getopt::Long;
    5051
    5152sub readHeaderValues();
     
    5354my %pcre_internal;
    5455
    55 if (scalar(@ARGV) != 1) {
    56     print STDERR "Usage: ", basename($0), " output-file\n";
     56if (scalar(@ARGV) < 1) {
     57    print STDERR "Usage: ", basename($0), " [--preprocessor=program] output-file\n";
    5758    exit 1;
    5859}
    5960
    60 my $outputFile = shift @ARGV;
     61my $outputFile;
     62my $preprocessor;
     63GetOptions('preprocessor=s' => \$preprocessor);
     64if (not $preprocessor) {
     65    $preprocessor = "cpp";
     66}
     67
     68$outputFile = $ARGV[0];
     69die('Must specify output file.') unless defined($outputFile);
    6170
    6271readHeaderValues();
     
    233242
    234243    my $headerPath = File::Spec->catfile(dirname($0), "pcre_internal.h");
    235 
     244 
    236245    my $fh = new File::Temp(
    237246        DIR => ($ENV{'TMPDIR'} || "/tmp"),
     
    256265    close($fh);
    257266
    258     open(CPP, "cpp \"$tempFile\" |") or die "$!";
     267    open(CPP, "$preprocessor \"$tempFile\" |") or die "$!";
    259268    my $content = <CPP>;
    260269    close(CPP);
    261 
     270   
    262271    eval $content;
    263272    die "$@" if $@;
Note: See TracChangeset for help on using the changeset viewer.