Skip to content
Snippets Groups Projects
Commit 705e1537 authored by Nathan Froyd's avatar Nathan Froyd
Browse files

Bug 1604557 - use GeneratedFile template in media/libdav1d/; r=padenot

The template is slightly nicer and involves a little less repetition.

Differential Revision: https://phabricator.services.mozilla.com/D57490

--HG--
extra : moz-landing-system : lando
parent 80b40a0e
No related branches found
No related tags found
No related merge requests found
......@@ -137,29 +137,28 @@ bitdepth_basenames = [
'recon_tmpl.c'
]
GENERATED_FILES += [
'16bd_%s' % p for p in bitdepth_basenames
]
for f in bitdepth_basenames:
a = GENERATED_FILES['16bd_%s' % f]
a.script = 'generate_source.py:add_define'
a.inputs = [relative_path + f]
a.flags = ['BITDEPTH', '16']
GENERATED_FILES += [
'8bd_%s' % p for p in bitdepth_basenames
]
generated_files = []
for f in bitdepth_basenames:
a = GENERATED_FILES['8bd_%s' % f]
a.script = 'generate_source.py:add_define'
a.inputs = [relative_path + f]
a.flags = ['BITDEPTH', '8']
SOURCES += [
'!%s' % p for p in GENERATED_FILES if p.endswith('.c')
]
file_bd16 = '16bd_%s' % f
file_bd8 = '8bd_%s' % f
GeneratedFile(file_bd16,
script='generate_source.py',
entry_point='add_define',
inputs=[relative_path + f],
flags=['BITDEPTH', '16'])
GeneratedFile(file_bd8,
script='generate_source.py',
entry_point='add_define',
inputs=[relative_path + f],
flags=['BITDEPTH', '8'])
generated_files += [file_bd16, file_bd8]
for p in generated_files:
if p.endswith('.c'):
SOURCES += ['!%s' % p]
EXPORTS.dav1d.src += [
'../../third_party/dav1d/src/cdef.h',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment