From: Nathan West Date: Mon, 13 Mar 2017 16:25:35 +0000 (-0400) Subject: modtool: deconflict module include guards from main volk X-Git-Tag: archive/raspbian/1.3-2+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d90cce3c690b0decefa748e68042c04b7eb3a7d4;p=volk.git modtool: deconflict module include guards from main volk Gbp-Pq: Name 0009-modtool-deconflict-module-include-guards-from-main-v.patch --- diff --git a/python/volk_modtool/volk_modtool_generate.py b/python/volk_modtool/volk_modtool_generate.py index 83e0d26..6040a7d 100644 --- a/python/volk_modtool/volk_modtool_generate.py +++ b/python/volk_modtool/volk_modtool_generate.py @@ -98,6 +98,9 @@ class volk_modtool: os.makedirs(os.path.join(self.my_dict['destination'], 'volk_' + self.my_dict['name'], 'kernels/volk_' + self.my_dict['name'])) current_kernel_names = self.get_current_kernels() + need_ifdef_updates = ["constant.h", "volk_complex.h", "volk_malloc.h", "volk_prefs.h", + "volk_common.h", "volk_cpu.tmpl.h", "volk_config_fixed.tmpl.h", + "volk_typedefs.h", "volk.tmpl.h"] for root, dirnames, filenames in os.walk(self.my_dict['base']): for name in filenames: t_table = map(lambda a: re.search(a, name), current_kernel_names) @@ -107,10 +110,7 @@ class volk_modtool: instring = open(infile, 'r').read() outstring = re.sub(self.volk, 'volk_' + self.my_dict['name'], instring) # Update the header ifdef guards only where needed - if((name == "constants.h") or - (name == "volk_complex.h") or - (name == "volk_malloc.h") or - (name == "volk_prefs.h")): + if name in need_ifdef_updates: outstring = re.sub(self.volk_included, 'INCLUDED_VOLK_' + self.my_dict['name'].upper(), outstring) newname = re.sub(self.volk, 'volk_' + self.my_dict['name'], name) relpath = os.path.relpath(infile, self.my_dict['base'])