Skip to content

Commit

Permalink
Fix bug setting template for gnome.mkenums.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Aug 27, 2016
1 parent 58607ba commit 0830a38
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mesonbuild/modules/gnome.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,20 @@ def mkenums(self, state, args, kwargs):
'vhead', 'vprod', 'vtail']
known_custom_target_kwargs = ['install', 'install_dir', 'build_always',
'depends', 'depend_files']
add_template = False
for arg, value in kwargs.items():
if arg == 'template':
cmd += ['--template', '@INPUT0@']
sources.insert(0, value)
add_template = True
sources = [value] + sources
elif arg in known_kwargs:
cmd += ['--' + arg, value]
elif arg not in known_custom_target_kwargs:
raise MesonException(
'Mkenums does not take a %s keyword argument.' % (arg, ))
cmd += ['@INPUT@']
if add_template:
cmd += ['--template', '@INPUT@']
else:
cmd += ['@INPUT@']

custom_kwargs = {
'input': sources,
Expand Down

0 comments on commit 0830a38

Please sign in to comment.