| OLD | NEW |
| 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
| 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
| 5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
| 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
| 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 use Cwd; | 113 use Cwd; |
| 114 use File::Basename; | 114 use File::Basename; |
| 115 use File::Find; | 115 use File::Find; |
| 116 use File::Spec; | 116 use File::Spec; |
| 117 | 117 |
| 118 my $idlDocument; | 118 my $idlDocument; |
| 119 my $idlDirectories; | 119 my $idlDirectories; |
| 120 my $preprocessor; | 120 my $preprocessor; |
| 121 my $defines; | 121 my $defines; |
| 122 my $verbose; | 122 my $verbose; |
| 123 my $dependentIdlFiles; | 123 my $interfaceIdlFiles; |
| 124 my $writeFileOnlyIfChanged; | 124 my $writeFileOnlyIfChanged; |
| 125 my $sourceRoot; | 125 my $sourceRoot; |
| 126 | 126 |
| 127 # Cache of IDL file pathnames. | 127 # Cache of IDL file pathnames. |
| 128 my $idlFiles; | 128 my $idlFiles; |
| 129 my $cachedInterfaces = {}; | 129 my $cachedInterfaces = {}; |
| 130 | 130 |
| 131 my %implIncludes = (); | 131 my %implIncludes = (); |
| 132 my %headerIncludes = (); | 132 my %headerIncludes = (); |
| 133 | 133 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 sub new | 256 sub new |
| 257 { | 257 { |
| 258 my $object = shift; | 258 my $object = shift; |
| 259 my $reference = { }; | 259 my $reference = { }; |
| 260 | 260 |
| 261 $idlDocument = shift; | 261 $idlDocument = shift; |
| 262 $idlDirectories = shift; | 262 $idlDirectories = shift; |
| 263 $preprocessor = shift; | 263 $preprocessor = shift; |
| 264 $defines = shift; | 264 $defines = shift; |
| 265 $verbose = shift; | 265 $verbose = shift; |
| 266 $dependentIdlFiles = shift; | 266 $interfaceIdlFiles = shift; |
| 267 $writeFileOnlyIfChanged = shift; | 267 $writeFileOnlyIfChanged = shift; |
| 268 | 268 |
| 269 $sourceRoot = getcwd(); | 269 $sourceRoot = getcwd(); |
| 270 | 270 |
| 271 bless($reference, $object); | 271 bless($reference, $object); |
| 272 return $reference; | 272 return $reference; |
| 273 } | 273 } |
| 274 | 274 |
| 275 | 275 |
| 276 sub IDLFileForInterface | 276 sub IDLFileForInterface |
| 277 { | 277 { |
| 278 my $interfaceName = shift; | 278 my $interfaceName = shift; |
| 279 | 279 |
| 280 unless ($idlFiles) { | 280 unless ($idlFiles) { |
| 281 my @directories = map { $_ = "$sourceRoot/$_" if -d "$sourceRoot/$_"; $_
} @$idlDirectories; | 281 my @directories = map { $_ = "$sourceRoot/$_" if -d "$sourceRoot/$_"; $_
} @$idlDirectories; |
| 282 push(@directories, "."); | 282 push(@directories, "."); |
| 283 | 283 |
| 284 $idlFiles = { }; | 284 $idlFiles = { }; |
| 285 foreach my $idlFile (@$dependentIdlFiles) { | 285 foreach my $idlFile (@$interfaceIdlFiles) { |
| 286 $idlFiles->{fileparse(basename($idlFile), ".idl")} = $idlFile; | 286 $idlFiles->{fileparse(basename($idlFile), ".idl")} = $idlFile; |
| 287 } | 287 } |
| 288 | 288 |
| 289 my $wanted = sub { | 289 my $wanted = sub { |
| 290 $idlFiles->{$1} = $File::Find::name if /^([A-Z].*)\.idl$/; | 290 $idlFiles->{$1} = $File::Find::name if /^([A-Z].*)\.idl$/; |
| 291 $File::Find::prune = 1 if /^\../; | 291 $File::Find::prune = 1 if /^\../; |
| 292 }; | 292 }; |
| 293 find($wanted, @directories); | 293 find($wanted, @directories); |
| 294 } | 294 } |
| 295 | 295 |
| (...skipping 5740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6036 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 6036 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
| 6037 $found = 1; | 6037 $found = 1; |
| 6038 } | 6038 } |
| 6039 return 1 if $found; | 6039 return 1 if $found; |
| 6040 }, 0); | 6040 }, 0); |
| 6041 | 6041 |
| 6042 return $found; | 6042 return $found; |
| 6043 } | 6043 } |
| 6044 | 6044 |
| 6045 1; | 6045 1; |
| OLD | NEW |