Commit e01e2d23 authored by hausmann@webkit.org's avatar hausmann@webkit.org

2008-06-24 Joerg Bornemann <joerg.bornemann@trolltech.com>

        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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4874ebbb
2008-06-24 Joerg Bornemann <joerg.bornemann@trolltech.com>
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.
* pcre/dftables: Added support for specifying the preprocessor command
to use via --preprocessor, similar to
WebCore/bindings/scripts/generate-bindings.pl.
* pcre/pcre.pri: Pass --preprocessor='cl /e' to dftables, or more
generally speaking QMAKE_CC /E for the win32-msvc buildspecs.
2008-06-24 Simon Hausmann <hausmann@webkit.org>
Fix the Qt build, added missing include.
......
......@@ -47,17 +47,26 @@ use strict;
use File::Basename;
use File::Spec;
use File::Temp;
use Getopt::Long;
sub readHeaderValues();
my %pcre_internal;
if (scalar(@ARGV) != 1) {
print STDERR "Usage: ", basename($0), " output-file\n";
if (scalar(@ARGV) < 1) {
print STDERR "Usage: ", basename($0), " [--preprocessor=program] output-file\n";
exit 1;
}
my $outputFile = shift @ARGV;
my $outputFile;
my $preprocessor;
GetOptions('preprocessor=s' => \$preprocessor);
if (not $preprocessor) {
$preprocessor = "cpp";
}
$outputFile = $ARGV[0];
die('Must specify output file.') unless defined($outputFile);
readHeaderValues();
......@@ -232,7 +241,7 @@ sub readHeaderValues()
local $/ = undef;
my $headerPath = File::Spec->catfile(dirname($0), "pcre_internal.h");
my $fh = new File::Temp(
DIR => ($ENV{'TMPDIR'} || "/tmp"),
SUFFIX => ".in",
......@@ -255,10 +264,10 @@ sub readHeaderValues()
close($fh);
open(CPP, "cpp \"$tempFile\" |") or die "$!";
open(CPP, "$preprocessor \"$tempFile\" |") or die "$!";
my $content = <CPP>;
close(CPP);
eval $content;
die "$@" if $@;
}
......@@ -23,10 +23,11 @@ SOURCES += \
}
# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\""
DFTABLES = $$PWD/dftables
ctgen.input = DFTABLES
ctgen.output = $$GENERATED_SOURCES_DIR/chartables.c
ctgen.commands = perl $$DFTABLES ${QMAKE_FILE_OUT}
ctgen.commands = perl $$DFTABLES ${QMAKE_FILE_OUT} $$PREPROCESSOR
ctgen.CONFIG += target_predeps no_link
ctgen.variable_out = GENERATED_SOURCES
ctgen.dependency_type = TYPE_C
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment