diff options
author | Josh Blum | 2011-09-17 15:00:33 -0400 |
---|---|---|
committer | Josh Blum | 2011-09-17 15:00:33 -0400 |
commit | 6b4fb9612f5ea460c79e80facba01c504a3d5049 (patch) | |
tree | 9b41675f8ecade629447d2b850dd886c06636415 /volk/gen | |
parent | 8524736fe3c5812b5e8e0a85af45c4775a2d4ca2 (diff) | |
download | gnuradio-6b4fb9612f5ea460c79e80facba01c504a3d5049.tar.gz gnuradio-6b4fb9612f5ea460c79e80facba01c504a3d5049.tar.bz2 gnuradio-6b4fb9612f5ea460c79e80facba01c504a3d5049.zip |
volk: use glob rather than parsing makefile for kernels
Diffstat (limited to 'volk/gen')
-rw-r--r-- | volk/gen/volk_register.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/volk/gen/volk_register.py b/volk/gen/volk_register.py index f5854bbce..cd874e470 100644 --- a/volk/gen/volk_register.py +++ b/volk/gen/volk_register.py @@ -3,6 +3,7 @@ import sys import os import re +import glob import string from xml.dom import minidom from volk_regexp import * @@ -48,18 +49,13 @@ outfile_environment_h = open(os.path.join(gendir, "lib/volk_environment_init.h") outfile_makefile_am = open(os.path.join(gendir, "lib/Makefile.am"), "w") outfile_machines_h = open(os.path.join(gendir, "lib/volk_machines.h"), "w") outfile_machines_c = open(os.path.join(gendir, "lib/volk_machines.c"), "w") -infile = open(os.path.join(srcdir, "include/volk/Makefile.am"), "r") - - -mfile = infile.readlines(); +hdr_files = glob.glob(os.path.join(srcdir, "include/volk/*.h")) datatypes = []; functions = []; - - -for line in mfile: - subline = re.search(".*_(a|u)\.h.*", line); +for line in hdr_files: + subline = re.search(".*_(a|u)\.h.*", os.path.basename(line)) if subline: subsubline = re.search("(?<=volk_).*", subline.group(0)); if subsubline: @@ -71,7 +67,7 @@ for line in mfile: datatypes = set(datatypes); -for line in mfile: +for line in hdr_files: for dt in datatypes: if dt in line: subline = re.search("(volk_" + dt +"_.*(a|u).*\.h)", line); |