Merge pull request #4168 from theotherjimmy/gnuarmeclipse-more-templates

Generate GNU ARM Eclipse .mbedignore file with jinja2
pull/2203/merge
Sam Grove 2017-04-19 02:18:17 -05:00 committed by GitHub
commit de6cce77be
2 changed files with 4 additions and 10 deletions

View File

@ -273,22 +273,13 @@ class GNUARMEclipse(Exporter):
'u': u,
}
# TODO: it would be good to have jinja stop if one of the
# expected context values is not defined.
self.gen_file('gnuarmeclipse/.project.tmpl', jinja_ctx,
'.project', trim_blocks=True, lstrip_blocks=True)
self.gen_file('gnuarmeclipse/.cproject.tmpl', jinja_ctx,
'.cproject', trim_blocks=True, lstrip_blocks=True)
self.gen_file('gnuarmeclipse/makefile.targets.tmpl', jinja_ctx,
'makefile.targets', trim_blocks=True, lstrip_blocks=True)
if not exists('.mbedignore'):
print
print 'Create .mbedignore'
with open('.mbedignore', 'w') as f:
for bf in build_folders:
print bf + '/'
f.write(bf + '/\n')
self.gen_file('gnuarmeclipse/mbedignore.tmpl', jinja_ctx, '.mbedignore')
print
print 'Done. Import the \'{0}\' project in Eclipse.'.format(self.project_name)

View File

@ -0,0 +1,3 @@
{%- for config in options.values() -%}
{{config.name}}/*
{% endfor -%}