Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: Source/bindings/scripts/generate-bindings.pl

Issue 18190004: Add Python flow to bindings generation, move dummy-generating IDL files over (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak similarity Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/perl -w 1 #!/usr/bin/perl -w
2 # 2 #
3 # Copyright (C) 2005 Apple Computer, Inc. 3 # Copyright (C) 2005 Apple Computer, Inc.
4 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 4 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
5 # 5 #
6 # This file is part of WebKit 6 # This file is part of WebKit
7 # 7 #
8 # This library is free software; you can redistribute it and/or 8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Library General Public 9 # modify it under the terms of the GNU Library General Public
10 # License as published by the Free Software Foundation; either 10 # License as published by the Free Software Foundation; either
11 # version 2 of the License, or (at your option) any later version. 11 # version 2 of the License, or (at your option) any later version.
12 # 12 #
13 # This library is distributed in the hope that it will be useful, 13 # This library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Library General Public License for more details. 16 # Library General Public License for more details.
17 # 17 #
18 # You should have received a copy of the GNU Library General Public License 18 # You should have received a copy of the GNU Library General Public License
19 # along with this library; see the file COPYING.LIB. If not, write to 19 # along with this library; see the file COPYING.LIB. If not, write to
20 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 # Boston, MA 02110-1301, USA. 21 # Boston, MA 02110-1301, USA.
22 # 22 #
23 23
24 # This script is a temporary hack.
25 # Files are generated in the source directory, when they really should go
26 # to the DerivedSources directory.
27 # This should also eventually be a build rule driven off of .idl files
28 # however a build rule only solution is blocked by several radars:
29 # <rdar://problems/4251781&4251785>
30
Nils Barth (inactive) 2013/07/08 05:24:38 This comment is out of date. generate-bindings.pl/
31 use strict; 24 use strict;
32 25
33 use File::Path; 26 use File::Path;
34 use File::Basename; 27 use File::Basename;
35 use Getopt::Long; 28 use Getopt::Long;
36 use Text::ParseWords; 29 use Text::ParseWords;
37 use Cwd; 30 use Cwd;
38 31
39 use IDLParser; 32 use IDLParser;
40 use CodeGeneratorV8; 33 use CodeGeneratorV8;
41 use IDLSerializer; 34 use IDLSerializer;
42 35
43 my @idlDirectories; 36 my @idlDirectories;
44 my $outputDirectory; 37 my $outputDirectory;
45 my $defines; 38 my $defines;
46 my $filename;
Nils Barth (inactive) 2013/07/08 05:24:38 Unused, remove.
47 my $preprocessor; 39 my $preprocessor;
48 my $verbose; 40 my $verbose;
49 my $supplementalDependencyFile; 41 my $supplementalDependencyFile;
50 my $additionalIdlFiles; 42 my $additionalIdlFiles;
51 my $idlAttributesFile; 43 my $idlAttributesFile;
52 my $writeFileOnlyIfChanged; 44 my $writeFileOnlyIfChanged;
53 45
54 GetOptions('include=s@' => \@idlDirectories, 46 GetOptions('include=s@' => \@idlDirectories,
55 'outputDir=s' => \$outputDirectory, 47 'outputDir=s' => \$outputDirectory,
56 'defines=s' => \$defines, 48 'defines=s' => \$defines,
57 'filename=s' => \$filename,
58 'preprocessor=s' => \$preprocessor, 49 'preprocessor=s' => \$preprocessor,
59 'verbose' => \$verbose, 50 'verbose' => \$verbose,
60 'supplementalDependencyFile=s' => \$supplementalDependencyFile, 51 'supplementalDependencyFile=s' => \$supplementalDependencyFile,
61 'additionalIdlFiles=s' => \$additionalIdlFiles, 52 'additionalIdlFiles=s' => \$additionalIdlFiles,
62 'idlAttributesFile=s' => \$idlAttributesFile, 53 'idlAttributesFile=s' => \$idlAttributesFile,
63 'write-file-only-if-changed=s' => \$writeFileOnlyIfChanged); 54 'write-file-only-if-changed=s' => \$writeFileOnlyIfChanged);
64 55
65 my $targetIdlFile = $ARGV[0]; 56 my $targetIdlFile = $ARGV[0];
66 57
67 die('Must specify input file.') unless defined($targetIdlFile); 58 die('Must specify input file.') unless defined($targetIdlFile);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 last OUTER; 292 last OUTER;
302 } 293 }
303 } 294 }
304 } 295 }
305 if ($error) { 296 if ($error) {
306 die "IDL ATTRIBUTE CHECKER ERROR: $error 297 die "IDL ATTRIBUTE CHECKER ERROR: $error
307 If you want to add a new IDL attribute, you need to add it to bindings/scripts/I DLAttributes.txt and add explanations to the Blink IDL document (http://chromium .org/blink/webidl). 298 If you want to add a new IDL attribute, you need to add it to bindings/scripts/I DLAttributes.txt and add explanations to the Blink IDL document (http://chromium .org/blink/webidl).
308 "; 299 ";
309 } 300 }
310 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698