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 29 matching lines...) Expand all Loading... | |
40 use CodeGenerator; | 40 use CodeGenerator; |
41 | 41 |
42 my @idlDirectories; | 42 my @idlDirectories; |
43 my $outputDirectory; | 43 my $outputDirectory; |
44 my $outputHeadersDirectory; | 44 my $outputHeadersDirectory; |
45 my $defines; | 45 my $defines; |
46 my $filename; | 46 my $filename; |
47 my $preprocessor; | 47 my $preprocessor; |
48 my $verbose; | 48 my $verbose; |
49 my $supplementalDependencyFile; | 49 my $supplementalDependencyFile; |
50 my $idlToPathFile; | |
50 my $additionalIdlFiles; | 51 my $additionalIdlFiles; |
51 my $idlAttributesFile; | 52 my $idlAttributesFile; |
52 | 53 |
53 GetOptions('include=s@' => \@idlDirectories, | 54 GetOptions('include=s@' => \@idlDirectories, |
54 'outputDir=s' => \$outputDirectory, | 55 'outputDir=s' => \$outputDirectory, |
55 'outputHeadersDir=s' => \$outputHeadersDirectory, | 56 'outputHeadersDir=s' => \$outputHeadersDirectory, |
56 'defines=s' => \$defines, | 57 'defines=s' => \$defines, |
57 'filename=s' => \$filename, | 58 'filename=s' => \$filename, |
58 'preprocessor=s' => \$preprocessor, | 59 'preprocessor=s' => \$preprocessor, |
59 'verbose' => \$verbose, | 60 'verbose' => \$verbose, |
60 'supplementalDependencyFile=s' => \$supplementalDependencyFile, | 61 'supplementalDependencyFile=s' => \$supplementalDependencyFile, |
62 'idlToPathFile=s' => \$idlToPathFile, | |
61 'additionalIdlFiles=s' => \$additionalIdlFiles, | 63 'additionalIdlFiles=s' => \$additionalIdlFiles, |
62 'idlAttributesFile=s' => \$idlAttributesFile); | 64 'idlAttributesFile=s' => \$idlAttributesFile); |
63 | 65 |
64 my $targetIdlFile = $ARGV[0]; | 66 my $targetIdlFile = $ARGV[0]; |
65 | 67 |
66 die('Must specify input file.') unless defined($targetIdlFile); | 68 die('Must specify input file.') unless defined($targetIdlFile); |
67 die('Must specify output directory.') unless defined($outputDirectory); | 69 die('Must specify output directory.') unless defined($outputDirectory); |
70 die('Must specify idlToPathFile.') unless defined($idlToPathFile); | |
71 | |
72 # Pass some information to a low level function the ugly way. | |
73 $ENV{"IDLTOPATHFILE"} = $idlToPathFile; | |
abarth-chromium
2013/04/25 14:14:24
We should find a way to avoid messing with the env
Daniel Bratell
2013/04/25 21:24:26
This is the part where I just couldn't find a good
Daniel Bratell
2013/04/25 21:26:40
I did change it to use an explicit init function.
| |
68 $defines = "" unless defined($defines); | 74 $defines = "" unless defined($defines); |
69 | 75 |
70 if (!$outputHeadersDirectory) { | 76 if (!$outputHeadersDirectory) { |
71 $outputHeadersDirectory = $outputDirectory; | 77 $outputHeadersDirectory = $outputDirectory; |
72 } | 78 } |
73 $targetIdlFile = Cwd::realpath($targetIdlFile); | 79 $targetIdlFile = Cwd::realpath($targetIdlFile); |
74 if ($verbose) { | 80 if ($verbose) { |
75 print "$targetIdlFile\n"; | 81 print "$targetIdlFile\n"; |
76 } | 82 } |
77 my $targetInterfaceName = fileparse(basename($targetIdlFile), ".idl"); | 83 my $targetInterfaceName = fileparse(basename($targetIdlFile), ".idl"); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 last OUTER; | 294 last OUTER; |
289 } | 295 } |
290 } | 296 } |
291 } | 297 } |
292 if ($error) { | 298 if ($error) { |
293 die "IDL ATTRIBUTE CHECKER ERROR: $error | 299 die "IDL ATTRIBUTE CHECKER ERROR: $error |
294 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). | 300 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). |
295 "; | 301 "; |
296 } | 302 } |
297 } | 303 } |
OLD | NEW |