Commit aa239e5f authored by hausmann's avatar hausmann
Browse files

Correctly propagate the custom preprocessor option through the idl parser and the codegenerator.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2d4f54de
2007-07-27 Simon Hausmann <hausmann@kde.org>
Done with and reviewed by Lars and Zack.
Correctly propagate the custom preprocessor option through the idl parser and the codegenerator.
* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/generate-bindings.pl:
2007-07-27 Simon Hausmann <hausmann@kde.org>
 
Done with and reviewed by Lars and Zack.
......@@ -29,6 +29,7 @@ my $useGenerator = "";
my $useOutputDir = "";
my $useDirectories = "";
my $useLayerOnTop = 0;
my $preprocessor;
my $codeGenerator = 0;
......@@ -70,6 +71,7 @@ sub new
$useGenerator = shift;
$useOutputDir = shift;
$useLayerOnTop = shift;
$preprocessor = shift;
bless($reference, $object);
return $reference;
......@@ -93,7 +95,7 @@ sub ProcessDocument
# Dynamically load external code generation perl module
require $ifaceName . ".pm";
$codeGenerator = $ifaceName->new($object, $useOutputDir, $useLayerOnTop);
$codeGenerator = $ifaceName->new($object, $useOutputDir, $useLayerOnTop, $preprocessor);
unless (defined($codeGenerator)) {
my $classes = $useDocument->classes;
foreach my $class (@$classes) {
......@@ -154,7 +156,7 @@ sub AddMethodsConstantsAndAttributesFromParentClasses
# Step #2: Parse the found IDL file (in quiet mode).
my $parser = IDLParser->new(1);
my $document = $parser->Parse($foundFilename, $defines);
my $document = $parser->Parse($foundFilename, $defines, $preprocessor);
foreach my $class (@{$document->classes}) {
# Step #3: Enter recursive parent search
......
......@@ -65,5 +65,5 @@ my $parser = IDLParser->new(1);
my $document = $parser->Parse($idlFile, $defines, $preprocessor);
# Generate desired output for given IDL file.
my $codeGen = CodeGenerator->new(\@idlDirectories, $generator, $outputDirectory);
my $codeGen = CodeGenerator->new(\@idlDirectories, $generator, $outputDirectory, 0, $preprocessor);
$codeGen->ProcessDocument($document, $defines);
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