diff --git a/third_party/ffmpeg/chromium/scripts/generate_gyp.py b/chromium/scripts/generate_gyp.py index c3fd3c0..94c2aad 100755 --- a/third_party/ffmpeg/chromium/scripts/generate_gyp.py +++ b/third_party/ffmpeg/chromium/scripts/generate_gyp.py @@ -790,6 +790,9 @@ # Prefix added to renamed files as part of RENAME_PREFIX = 'autorename' +# Match an absolute path to a generated auotorename_ file. +RENAME_REGEX = re.compile('.*' + RENAME_PREFIX + '_.+'); + # Content for the rename file. #includes the original file to ensure the two # files stay in sync. RENAME_CONTENT = """// File automatically generated. See crbug.com/495833. @@ -1020,6 +1023,12 @@ for source in source_set.sources: GetIncludedSources(source, source_dir, sources_to_check) + # Remove autorename_ files now that we've grabbed their underlying includes. + # We generated autorename_ files above and should not consider them for + # licensing or credits. + sources_to_check = filter(lambda s: not RENAME_REGEX.search(s), + sources_to_check) + if not CheckLicensesForStaticLinking(sources_to_check, source_dir, options.print_licenses): exit('GENERATE FAILED: invalid licenses detected.')