[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r4381 - in gnuradio/branches/developers/michaelld/t29/
From: |
michaelld |
Subject: |
[Commit-gnuradio] r4381 - in gnuradio/branches/developers/michaelld/t29/gr-trellis/src: lib python |
Date: |
Mon, 5 Feb 2007 09:20:48 -0700 (MST) |
Author: michaelld
Date: 2007-02-05 09:20:48 -0700 (Mon, 05 Feb 2007)
New Revision: 4381
Removed:
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/build_utils.py
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/build_utils_codes.py
Modified:
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/Makefile.am
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/generate_trellis.py
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/Makefile.am
Log:
Removed the "build_utils" PY code, since it's redundant with that
provided by gnuradio-core. Modified Makefile.am's with these changes.
Modified:
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/Makefile.am
2007-02-05 15:28:48 UTC (rev 4380)
+++ gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/Makefile.am
2007-02-05 16:20:48 UTC (rev 4381)
@@ -54,15 +54,22 @@
include Makefile.gen
$(GENERATED_H) $(GENERATED_I) $(GENERATED_CC): $(CODE_GENERATOR)
- PYTHONPATH=$(top_srcdir)/gr-trellis/src/python srcdir=$(srcdir) \
- $(PYTHON) $(srcdir)/generate_all.py
+ PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python \
+ srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py
+# These files are built by SWIG. The first is the C++ glue.
+# The second is the python wrapper that loads the _trellis shared library
+# and knows how to call our extensions.
+
+SWIG_BUILT_SOURCES = \
+ trellis.cc \
+ trellis.py
+
BUILT_SOURCES = \
$(GENERATED_H) \
$(GENERATED_I) \
$(GENERATED_CC) \
- trellis.cc \
- trellis.py
+ $(SWIG_BUILT_SOURCES)
ALL_IFILES = \
$(LOCAL_IFILES) \
@@ -77,14 +84,6 @@
EXTRA_DIST = \
$(CODE_GENERATOR)
-# These files are built by SWIG. The first is the C++ glue.
-# The second is the python wrapper that loads the _trellis shared library
-# and knows how to call our extensions.
-
-#BUILT_SOURCES = \
-# trellis.cc \
-# trellis.py
-
# This gets trellis.py installed in the right place
ourpython_PYTHON = \
trellis.py
@@ -146,5 +145,5 @@
# Don't distribute output of swig
dist-hook:
- @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
- @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
+ @for file in $(SWIG_BUILT_SOURCES); do echo $(RM) $(distdir)/$$file;
done
+ @for file in $(SWIG_BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
Modified:
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/generate_trellis.py
===================================================================
---
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/generate_trellis.py
2007-02-05 15:28:48 UTC (rev 4380)
+++
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/lib/generate_trellis.py
2007-02-05 16:20:48 UTC (rev 4381)
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from build_utils import expand_template, standard_dict
+from build_utils import expand_template, copyright, open_and_log_name
from build_utils_codes import *
import re
@@ -41,6 +41,61 @@
)
+def is_byte (code3):
+ if i_code (code3) == 'b' or o_code (code3) == 'b':
+ return '1'
+ else:
+ return '0'
+
+
+def is_short (code3):
+ if i_code (code3) == 's' or o_code (code3) == 's':
+ return '1'
+ else:
+ return '0'
+
+
+def is_int (code3):
+ if i_code (code3) == 'i' or o_code (code3) == 'i':
+ return '1'
+ else:
+ return '0'
+
+
+def is_float (code3):
+ if i_code (code3) == 'f' or o_code (code3) == 'f':
+ return '1'
+ else:
+ return '0'
+
+
+def is_complex (code3):
+ if i_code (code3) == 'c' or o_code (code3) == 'c':
+ return '1'
+ else:
+ return '0'
+
+
+def standard_dict (name, code3):
+ d = {}
+ d['NAME'] = name
+ d['GUARD_NAME'] = 'INCLUDED_%s_H' % name.upper ()
+ d['BASE_NAME'] = re.sub ('^trellis_', '', name)
+ d['SPTR_NAME'] = '%s_sptr' % name
+ d['WARNING'] = 'WARNING: this file is machine generated. Edits will be
over written'
+ d['COPYRIGHT'] = copyright
+ d['TYPE'] = i_type (code3)
+ d['I_TYPE'] = i_type (code3)
+ d['O_TYPE'] = o_type (code3)
+ d['TAP_TYPE'] = tap_type (code3)
+ d['IS_BYTE'] = is_byte (code3)
+ d['IS_SHORT'] = is_short (code3)
+ d['IS_INT'] = is_int (code3)
+ d['IS_FLOAT'] = is_float (code3)
+ d['IS_COMPLEX'] = is_complex (code3)
+ return d
+
+
def expand_h_cc_i (root, sig):
# root looks like 'gr_vector_sink_X'
name = re.sub ('X+', sig, root)
Modified:
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/Makefile.am
===================================================================
---
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/Makefile.am
2007-02-05 15:28:48 UTC (rev 4380)
+++
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/Makefile.am
2007-02-05 16:20:48 UTC (rev 4381)
@@ -21,10 +21,9 @@
include $(top_srcdir)/Makefile.common
-EXTRA_DIST = run_tests.in \
- awgn1o2_4.fsm \
- build_utils.py \
- build_utils_codes.py
+EXTRA_DIST = \
+ run_tests.in \
+ awgn1o2_4.fsm
TESTS = \
run_tests
Deleted:
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/build_utils.py
Deleted:
gnuradio/branches/developers/michaelld/t29/gr-trellis/src/python/build_utils_codes.py
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r4381 - in gnuradio/branches/developers/michaelld/t29/gr-trellis/src: lib python,
michaelld <=