Changeset 34767 in webkit for trunk/JavaScriptCore


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.

Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r34762 r34767  
     12008-06-24  Joerg Bornemann  <[email protected]>
     2
     3        Reviewed by Simon.
     4
     5        For the Qt build on Windows don't depend on the presence of GNU CPP
     6        but use MSVC's preprocessor instead.
     7        dftables accepts a --preprocessor option which is set in pcre.pri for MSVC platforms.
     8
     9        * pcre/dftables: Added support for specifying the preprocessor command
     10        to use via --preprocessor, similar to
     11        WebCore/bindings/scripts/generate-bindings.pl.
     12        * pcre/pcre.pri: Pass --preprocessor='cl /e' to dftables, or more
     13        generally speaking QMAKE_CC /E for the win32-msvc buildspecs.
     14
    1152008-06-24  Simon Hausmann  <[email protected]>
    216
  • 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 $@;
  • trunk/JavaScriptCore/pcre/pcre.pri

    r29402 r34767  
    2424
    2525# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
     26win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\""
    2627DFTABLES = $$PWD/dftables
    2728ctgen.input = DFTABLES
    2829ctgen.output = $$GENERATED_SOURCES_DIR/chartables.c
    29 ctgen.commands = perl $$DFTABLES ${QMAKE_FILE_OUT}
     30ctgen.commands = perl $$DFTABLES ${QMAKE_FILE_OUT} $$PREPROCESSOR
    3031ctgen.CONFIG += target_predeps no_link
    3132ctgen.variable_out = GENERATED_SOURCES
Note: See TracChangeset for help on using the changeset viewer.