diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2013-11-21 12:47:51 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-11-21 12:47:51 -0800 |
commit | b36fa93e9a3b3f1e5f58842ba813073a8ecde127 (patch) | |
tree | 53bae6b1e49158757bf74ddbe81f2ec6f8c1903c /gr-utils/python/modtool/modtool_add.py | |
parent | e74d4810409c07236580038d6056e391f4ef63d7 (diff) | |
parent | 0cb397ce39dbdc22ab990cc860e35ef503a08fda (diff) |
Merge remote-tracking branch 'martin/hpd-modtool-fixes' into maint
Diffstat (limited to 'gr-utils/python/modtool/modtool_add.py')
-rw-r--r-- | gr-utils/python/modtool/modtool_add.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gr-utils/python/modtool/modtool_add.py b/gr-utils/python/modtool/modtool_add.py index 60748e3f1b..88b9068cda 100644 --- a/gr-utils/python/modtool/modtool_add.py +++ b/gr-utils/python/modtool/modtool_add.py @@ -126,6 +126,8 @@ class ModToolAdd(ModTool): return open('LICENSE').read() elif os.path.isfile('LICENCE'): return open('LICENCE').read() + elif self._info['is_component']: + return Templates['grlicense'] else: return Templates['defaultlicense'] @@ -221,8 +223,7 @@ class ModToolAdd(ModTool): self._write_tpl('block_cpp36', 'lib', fname_cc) if not self.options.skip_cmakefiles: ed = CMakeFileEditor(self._file['cmlib']) - cmake_list_var = self._info['modname'] + '_sources' - if self._info['is_component']: cmake_list_var = 'gr_' + cmake_list_var + cmake_list_var = '[a-z]*_?' + self._info['modname'] + '_sources' if not ed.append_value('list', fname_cc, to_ignore_start='APPEND ' + cmake_list_var): ed.append_value('add_library', fname_cc) ed.write() @@ -251,7 +252,7 @@ class ModToolAdd(ModTool): swig_block_magic_str = get_template('swig_block_magic', **self._info) open(self._file['swig'], 'a').write(swig_block_magic_str) include_str = '#include "%s%s%s.h"' % ( - self._info['modname'], + {True: 'gnuradio/' + self._info['modname'], False: self._info['modname']}[self._info['is_component']], mod_block_sep, self._info['blockname']) if re.search('#include', open(self._file['swig'], 'r').read()): |