summaryrefslogtreecommitdiff
path: root/volk/gen/volk_regexp.py
diff options
context:
space:
mode:
authorJosh Blum2011-04-26 21:55:48 -0700
committerJosh Blum2011-04-26 21:55:48 -0700
commita5e2d9e5baf869ae961fbb5820447290d6d9c7c8 (patch)
tree41ced4de13a41dd7b05a4e08d1a730cf0f079f7c /volk/gen/volk_regexp.py
parentd941ba31677804fe382d76fca17fc044d12777f5 (diff)
downloadgnuradio-a5e2d9e5baf869ae961fbb5820447290d6d9c7c8.tar.gz
gnuradio-a5e2d9e5baf869ae961fbb5820447290d6d9c7c8.tar.bz2
gnuradio-a5e2d9e5baf869ae961fbb5820447290d6d9c7c8.zip
volk: reorganization of generation sources and generated files
All generation sources have been moved to the gen/ subdirectory. Bootstrap and volk_register.py generate the files into to gen/ subdirectory in an effort to cleanly separate the static/generated parts of the build tree. Define top_gendir in Makefile.common, all generated sources listed in Makefile.ams are prefixed with $(top_gendir) to differentiate them from static in-tree sources.
Diffstat (limited to 'volk/gen/volk_regexp.py')
-rw-r--r--volk/gen/volk_regexp.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/volk/gen/volk_regexp.py b/volk/gen/volk_regexp.py
new file mode 100644
index 000000000..b83ce5206
--- /dev/null
+++ b/volk/gen/volk_regexp.py
@@ -0,0 +1,14 @@
+import re
+import string
+
+remove_after_underscore = re.compile("_.*");
+space_remove = re.compile(" ");
+leading_space_remove = re.compile("^ *");
+replace_arch = re.compile(", const char\* arch");
+replace_bracket = re.compile(" {");
+replace_volk = re.compile("volk");
+
+def strip_trailing(tostrip, stripstr):
+ lindex = tostrip.rfind(stripstr)
+ tostrip = tostrip[0:lindex] + string.replace(tostrip[lindex:len(tostrip)], stripstr, "");
+ return tostrip