OLD | NEW |
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 |
(...skipping 20 matching lines...) Expand all Loading... |
31 use strict; | 31 use strict; |
32 | 32 |
33 use File::Path; | 33 use File::Path; |
34 use File::Basename; | 34 use File::Basename; |
35 use Getopt::Long; | 35 use Getopt::Long; |
36 use Text::ParseWords; | 36 use Text::ParseWords; |
37 use Cwd; | 37 use Cwd; |
38 | 38 |
39 use IDLParser; | 39 use IDLParser; |
40 use CodeGenerator; | 40 use CodeGenerator; |
| 41 use idltopath; |
41 | 42 |
42 my @idlDirectories; | 43 my @idlDirectories; |
43 my $outputDirectory; | 44 my $outputDirectory; |
44 my $outputHeadersDirectory; | 45 my $outputHeadersDirectory; |
45 my $defines; | 46 my $defines; |
46 my $filename; | 47 my $filename; |
47 my $preprocessor; | 48 my $preprocessor; |
48 my $verbose; | 49 my $verbose; |
49 my $supplementalDependencyFile; | 50 my $supplementalDependencyFile; |
| 51 my $idlToPathFile; |
50 my $additionalIdlFiles; | 52 my $additionalIdlFiles; |
51 my $idlAttributesFile; | 53 my $idlAttributesFile; |
52 | 54 |
53 GetOptions('include=s@' => \@idlDirectories, | 55 GetOptions('include=s@' => \@idlDirectories, |
54 'outputDir=s' => \$outputDirectory, | 56 'outputDir=s' => \$outputDirectory, |
55 'outputHeadersDir=s' => \$outputHeadersDirectory, | 57 'outputHeadersDir=s' => \$outputHeadersDirectory, |
56 'defines=s' => \$defines, | 58 'defines=s' => \$defines, |
57 'filename=s' => \$filename, | 59 'filename=s' => \$filename, |
58 'preprocessor=s' => \$preprocessor, | 60 'preprocessor=s' => \$preprocessor, |
59 'verbose' => \$verbose, | 61 'verbose' => \$verbose, |
60 'supplementalDependencyFile=s' => \$supplementalDependencyFile, | 62 'supplementalDependencyFile=s' => \$supplementalDependencyFile, |
| 63 'idlToPathFile=s' => \$idlToPathFile, |
61 'additionalIdlFiles=s' => \$additionalIdlFiles, | 64 'additionalIdlFiles=s' => \$additionalIdlFiles, |
62 'idlAttributesFile=s' => \$idlAttributesFile); | 65 'idlAttributesFile=s' => \$idlAttributesFile); |
63 | 66 |
64 my $targetIdlFile = $ARGV[0]; | 67 my $targetIdlFile = $ARGV[0]; |
65 | 68 |
66 die('Must specify input file.') unless defined($targetIdlFile); | 69 die('Must specify input file.') unless defined($targetIdlFile); |
67 die('Must specify output directory.') unless defined($outputDirectory); | 70 die('Must specify output directory.') unless defined($outputDirectory); |
| 71 die('Must specify idlToPathFile.') unless defined($idlToPathFile); |
| 72 |
| 73 initIdlToPath($idlToPathFile); |
| 74 |
68 $defines = "" unless defined($defines); | 75 $defines = "" unless defined($defines); |
69 | 76 |
70 if (!$outputHeadersDirectory) { | 77 if (!$outputHeadersDirectory) { |
71 $outputHeadersDirectory = $outputDirectory; | 78 $outputHeadersDirectory = $outputDirectory; |
72 } | 79 } |
73 $targetIdlFile = Cwd::realpath($targetIdlFile); | 80 $targetIdlFile = Cwd::realpath($targetIdlFile); |
74 if ($verbose) { | 81 if ($verbose) { |
75 print "$targetIdlFile\n"; | 82 print "$targetIdlFile\n"; |
76 } | 83 } |
77 my $targetInterfaceName = fileparse(basename($targetIdlFile), ".idl"); | 84 my $targetInterfaceName = fileparse(basename($targetIdlFile), ".idl"); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 last OUTER; | 293 last OUTER; |
287 } | 294 } |
288 } | 295 } |
289 } | 296 } |
290 if ($error) { | 297 if ($error) { |
291 die "IDL ATTRIBUTE CHECKER ERROR: $error | 298 die "IDL ATTRIBUTE CHECKER ERROR: $error |
292 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). | 299 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). |
293 "; | 300 "; |
294 } | 301 } |
295 } | 302 } |
OLD | NEW |