[117181] trunk/dports/science/gnuradio
michaelld at macports.org
michaelld at macports.org
Tue Feb 18 10:21:51 PST 2014
Revision: 117181
https://trac.macports.org/changeset/117181
Author: michaelld at macports.org
Date: 2014-02-18 10:21:51 -0800 (Tue, 18 Feb 2014)
Log Message:
-----------
gnuradio:
+ update devel to cf8997cc and next to a41a1e1b, both 20140216;
+ rev-bump releaase and legacy for new UHD API;
+ make cmake-expand patch different for release and devel.
Modified Paths:
--------------
trunk/dports/science/gnuradio/Portfile
Added Paths:
-----------
trunk/dports/science/gnuradio/files/patch-cmake-expand.devel.diff
trunk/dports/science/gnuradio/files/patch-cmake-expand.release.diff
Removed Paths:
-------------
trunk/dports/science/gnuradio/files/patch-cmake-expand.diff
Modified: trunk/dports/science/gnuradio/Portfile
===================================================================
--- trunk/dports/science/gnuradio/Portfile 2014-02-18 18:19:49 UTC (rev 117180)
+++ trunk/dports/science/gnuradio/Portfile 2014-02-18 18:21:51 UTC (rev 117181)
@@ -23,7 +23,7 @@
if {${subport} eq ${name}} {
version 3.7.2.1
- revision 1
+ revision 2
long_description ${description}: \
This port is kept up with the GNU Radio release, currently ${version}, which is typically updated every few months.
@@ -38,6 +38,9 @@
rmd160 14a04753ce6185daa92ebcb6619df9c130a70757 \
sha256 8c6b7e1fda31e9228bdd62a137af901b28757d7e1b044de2e985b96e53c83c80
+ patchfiles-append \
+ patch-cmake-expand.release.diff
+
livecheck.url http://gnuradio.org/releases/gnuradio/?C=M&O=D
livecheck.regex >LATEST-IS-(\[^<\]*)<
@@ -46,7 +49,7 @@
subport gnuradio-legacy {
version 3.6.5.1
- revision 5
+ revision 6
long_description ${description}: \
This port is for GNU Radio ${version}, reflecting the final release in the 3.6 API series. It is for legacy purposes only\; please consider updating your code to the GNU Radio 3.7 API.
@@ -86,14 +89,16 @@
long_description ${description}: \
This port is kept up with the GNU Radio GIT 'master' branch, which is typically updated daily to weekly. This version of GNU Radio generally contains fixes to, and its API is compatible with, the current GNU Radio release, and will be incorporated in an upcoming release. This port may or not compile or function correctly, as it represents a work in progress. If it does not work, check back in a few days. Or try deactivating the currently active gnuradio port, cleaning any current builds, and trying again.
- version 3.7.3_20140211
+ version 3.7.3_20140216
conflicts gnuradio-legacy gnuradio gnuradio-next
fetch.type git
git.url http://git.gnuradio.org/git/gnuradio.git
- git.branch 295ba353abebfedf90ece523343bcfeea2c2149d
+ git.branch cf8997ccc1e9c543aa234e561e7f002a176e13dc
+ patchfiles-append patch-cmake-expand.devel.diff
+
livecheck.url http://gnuradio.org/cgit/cgit.cgi/gnuradio/log/?h=master
livecheck.version ${git.branch}
livecheck.regex id=(\[a-f0-9\]+).*>master<
@@ -105,13 +110,13 @@
long_description ${description}: \
This port is kept up with the GNU Radio GIT 'next' branch, which is typically updated daily to weekly. This version of GNU Radio represents the next major release of GNU Radio, and hence its API is likely to be different than that provided by either gnuradio or gnuradio-devel. This port may or not compile or function correctly, as it represents a work in progress. If it does not work, check back in a few days. Or try deactivating the currently active gnuradio port, cleaning any current builds, and trying again.
- version 3.8.0_20140211
+ version 3.8.0_20140216
conflicts gnuradio-legacy gnuradio gnuradio-devel
fetch.type git
git.url http://git.gnuradio.org/git/gnuradio.git
- git.branch 1e6a0dcdb925bd38cd6e67773e6c30c32e386fd3
+ git.branch a41a1e1b4f326ad12864142575418f9ed848656a
livecheck.url http://gnuradio.org/cgit/cgit.cgi/gnuradio/log/?h=next
livecheck.version ${git.branch}
@@ -138,9 +143,6 @@
configure.args-append -DENABLE_GR_CTRLPORT=OFF
}
-
- patchfiles-append patch-cmake-expand.diff
-
}
use_parallel_build yes
Copied: trunk/dports/science/gnuradio/files/patch-cmake-expand.devel.diff (from rev 117178, trunk/dports/science/gnuradio/files/patch-cmake-expand.diff)
===================================================================
--- trunk/dports/science/gnuradio/files/patch-cmake-expand.devel.diff (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-cmake-expand.devel.diff 2014-02-18 18:21:51 UTC (rev 117181)
@@ -0,0 +1,1154 @@
+--- cmake/Modules/GrMiscUtils.cmake.orig
++++ cmake/Modules/GrMiscUtils.cmake
+@@ -333,7 +333,7 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
+ } " HAVE_PTHREAD_SETSCHEDPARAM
+ )
+ GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM)
+-
++
+ CHECK_CXX_SOURCE_COMPILES("
+ #include <sched.h>
+ int main(){
+@@ -345,3 +345,210 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
+ GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
+ endmacro(GR_CHECK_LINUX_SCHED_AVAIL)
+
++########################################################################
++# Macros to generate source and header files from template
++########################################################################
++macro(GR_EXPAND_X_H component root)
++
++ include(GrPython)
++
++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++"#!${PYTHON_EXECUTABLE}
++
++import sys, os, re
++sys.path.append('${GR_RUNTIME_PYTHONPATH}')
++os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
++os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
++
++if __name__ == '__main__':
++ import build_utils
++ root, inp = sys.argv[1:3]
++ for sig in sys.argv[3:]:
++ name = re.sub ('X+', sig, root)
++ d = build_utils.standard_dict2(name, sig, '${component}')
++ build_utils.expand_template(d, inp)
++")
++
++ #make a list of all the generated headers
++ unset(expanded_files_h)
++ foreach(sig ${ARGN})
++ string(REGEX REPLACE "X+" ${sig} name ${root})
++ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
++ endforeach(sig)
++ unset(name)
++
++ #try to force generate the headers
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #create a command to generate the headers
++ add_custom_command(
++ OUTPUT ${expanded_files_h}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #install rules for the generated headers
++ list(APPEND generated_includes ${expanded_files_h})
++
++endmacro(GR_EXPAND_X_H)
++
++macro(GR_EXPAND_X_CC_H component root)
++
++ include(GrPython)
++
++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++"#!${PYTHON_EXECUTABLE}
++
++import sys, os, re
++sys.path.append('${GR_RUNTIME_PYTHONPATH}')
++os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
++os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
++
++if __name__ == '__main__':
++ import build_utils
++ root, inp = sys.argv[1:3]
++ for sig in sys.argv[3:]:
++ name = re.sub ('X+', sig, root)
++ d = build_utils.standard_impl_dict2(name, sig, '${component}')
++ build_utils.expand_template(d, inp)
++")
++
++ #make a list of all the generated files
++ unset(expanded_files_cc)
++ unset(expanded_files_h)
++ foreach(sig ${ARGN})
++ string(REGEX REPLACE "X+" ${sig} name ${root})
++ list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
++ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
++ endforeach(sig)
++ unset(name)
++
++ #try to force generate the source files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.cc.t ${ARGN}
++ )
++
++ #create a command to generate the source files
++ add_custom_command(
++ OUTPUT ${expanded_files_cc}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.cc.t ${ARGN}
++ )
++
++ #try to force generate the header files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #create a command to generate the header files
++ add_custom_command(
++ OUTPUT ${expanded_files_h}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #make source files depends on headers to force generation
++ set_source_files_properties(${expanded_files_cc}
++ PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
++ )
++
++ #install rules for the generated files
++ list(APPEND generated_sources ${expanded_files_cc})
++ list(APPEND generated_headers ${expanded_files_h})
++
++endmacro(GR_EXPAND_X_CC_H)
++
++macro(GR_EXPAND_X_CC_H_IMPL component root)
++
++ include(GrPython)
++
++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++"#!${PYTHON_EXECUTABLE}
++
++import sys, os, re
++sys.path.append('${GR_RUNTIME_PYTHONPATH}')
++os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
++os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
++
++if __name__ == '__main__':
++ import build_utils
++ root, inp = sys.argv[1:3]
++ for sig in sys.argv[3:]:
++ name = re.sub ('X+', sig, root)
++ d = build_utils.standard_dict(name, sig, '${component}')
++ build_utils.expand_template(d, inp, '_impl')
++")
++
++ #make a list of all the generated files
++ unset(expanded_files_cc_impl)
++ unset(expanded_files_h_impl)
++ unset(expanded_files_h)
++ foreach(sig ${ARGN})
++ string(REGEX REPLACE "X+" ${sig} name ${root})
++ list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
++ list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
++ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h)
++ endforeach(sig)
++ unset(name)
++
++ #try to force generate the _impl.cc files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.cc.t ${ARGN}
++ )
++
++ #create a command to generate the _impl.cc files
++ add_custom_command(
++ OUTPUT ${expanded_files_cc_impl}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.cc.t ${ARGN}
++ )
++
++ #try to force generate the _impl.h files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.h.t ${ARGN}
++ )
++
++ #create a command to generate the _impl.h files
++ add_custom_command(
++ OUTPUT ${expanded_files_h_impl}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.h.t ${ARGN}
++ )
++
++ #make _impl.cc source files depend on _impl.h to force generation
++ set_source_files_properties(${expanded_files_cc_impl}
++ PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
++ )
++
++ #make _impl.h source files depend on headers to force generation
++ set_source_files_properties(${expanded_files_h_impl}
++ PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
++ )
++
++ #install rules for the generated files
++ list(APPEND generated_sources ${expanded_files_cc_impl})
++ list(APPEND generated_headers ${expanded_files_h_impl})
++
++endmacro(GR_EXPAND_X_CC_H_IMPL)
+--- gr-analog/include/gnuradio/analog/CMakeLists.txt.orig
++++ gr-analog/include/gnuradio/analog/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-# Copyright 2012 Free Software Foundation, Inc.
++# Copyright 2012-2013 Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Radio
+ #
+@@ -18,55 +18,12 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'analog')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(noise_source_X s i f c)
+-expand_h(fastnoise_source_X s i f c)
+-expand_h(sig_source_X s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_H(analog noise_source_X s i f c)
++GR_EXPAND_X_H(analog fastnoise_source_X s i f c)
++GR_EXPAND_X_H(analog sig_source_X s i f c)
+
+ add_custom_target(analog_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-analog/lib/CMakeLists.txt.orig
++++ gr-analog/lib/CMakeLists.txt
+@@ -41,72 +41,12 @@ if(ENABLE_GR_CTRLPORT)
+ endif(ENABLE_GR_CTRLPORT)
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'analog')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_cc(noise_source_X_impl s i f c)
+-expand_cc(fastnoise_source_X_impl s i f c)
+-expand_cc(sig_source_X_impl s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(analog noise_source_X_impl s i f c)
++GR_EXPAND_X_CC_H(analog fastnoise_source_X_impl s i f c)
++GR_EXPAND_X_CC_H(analog sig_source_X_impl s i f c)
+
+ ########################################################################
+ # Setup library
+--- gr-blocks/include/gnuradio/blocks/CMakeLists.txt.orig
++++ gr-blocks/include/gnuradio/blocks/CMakeLists.txt
+@@ -18,79 +18,36 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict(name, sig, 'blocks')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_h(add_XX ss ii cc)
+-expand_h(add_const_XX bb ss ii ff cc)
+-expand_h(add_const_vXX bb ss ii ff cc)
+-expand_h(and_XX bb ss ii)
+-expand_h(and_const_XX bb ss ii)
+-expand_h(argmax_XX fs is ss)
+-expand_h(divide_XX ss ii ff cc)
+-expand_h(integrate_XX ss ii ff cc)
+-expand_h(max_XX ff ii ss)
+-expand_h(moving_average_XX ss ii ff cc)
+-expand_h(multiply_XX ss ii)
+-expand_h(multiply_const_XX ss ii)
+-expand_h(multiply_const_vXX ss ii ff cc)
+-expand_h(mute_XX ss ii ff cc)
+-expand_h(not_XX bb ss ii)
+-expand_h(or_XX bb ss ii)
+-expand_h(peak_detector_XX fb ib sb)
+-expand_h(probe_signal_X b s i f c)
+-expand_h(probe_signal_vX b s i f c)
+-expand_h(sample_and_hold_XX bb ss ii ff)
+-expand_h(sub_XX ss ii ff cc)
+-expand_h(xor_XX bb ss ii)
+-expand_h(packed_to_unpacked_XX bb ss ii)
+-expand_h(unpacked_to_packed_XX bb ss ii)
+-expand_h(vector_insert_X b s i f c)
+-expand_h(vector_sink_X b s i f c)
+-expand_h(vector_source_X b s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_H(blocks add_XX ss ii cc)
++GR_EXPAND_X_H(blocks add_const_XX bb ss ii ff cc)
++GR_EXPAND_X_H(blocks add_const_vXX bb ss ii ff cc)
++GR_EXPAND_X_H(blocks and_XX bb ss ii)
++GR_EXPAND_X_H(blocks and_const_XX bb ss ii)
++GR_EXPAND_X_H(blocks argmax_XX fs is ss)
++GR_EXPAND_X_H(blocks divide_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks integrate_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks max_XX ff ii ss)
++GR_EXPAND_X_H(blocks moving_average_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks multiply_XX ss ii)
++GR_EXPAND_X_H(blocks multiply_const_XX ss ii)
++GR_EXPAND_X_H(blocks multiply_const_vXX ss ii ff cc)
++GR_EXPAND_X_H(blocks mute_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks not_XX bb ss ii)
++GR_EXPAND_X_H(blocks or_XX bb ss ii)
++GR_EXPAND_X_H(blocks peak_detector_XX fb ib sb)
++GR_EXPAND_X_H(blocks probe_signal_X b s i f c)
++GR_EXPAND_X_H(blocks probe_signal_vX b s i f c)
++GR_EXPAND_X_H(blocks sample_and_hold_XX bb ss ii ff)
++GR_EXPAND_X_H(blocks sub_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks xor_XX bb ss ii)
++GR_EXPAND_X_H(blocks packed_to_unpacked_XX bb ss ii)
++GR_EXPAND_X_H(blocks unpacked_to_packed_XX bb ss ii)
++GR_EXPAND_X_H(blocks vector_insert_X b s i f c)
++GR_EXPAND_X_H(blocks vector_sink_X b s i f c)
++GR_EXPAND_X_H(blocks vector_source_X b s i f c)
+
+ add_custom_target(blocks_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-blocks/lib/CMakeLists.txt.orig
++++ gr-blocks/lib/CMakeLists.txt
+@@ -23,100 +23,36 @@
+ include(${CMAKE_CURRENT_SOURCE_DIR}/ConfigChecks.cmake)
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict(name, sig, 'blocks')
+- build_utils.expand_template(d, inp, '_impl')
+-")
+-
+-macro(expand_cc_h_impl root)
+- #make a list of all the generated files
+- unset(expanded_files_cc_impl)
+- unset(expanded_files_h_impl)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
+- list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the _impl.cc files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc_impl}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}_impl.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the _impl.h files
+- add_custom_command(
+- OUTPUT ${expanded_files_h_impl}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}_impl.h.t ${ARGN}
+- )
+-
+- #make _impl.cc source files depend on headers to force generation
+- set_source_files_properties(${expanded_files_cc_impl}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
+- )
+-
+- #make _impl.h source files depend on headers to force generation
+- set_source_files_properties(${expanded_files_h_impl}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc_impl})
+-endmacro(expand_cc_h_impl)
+-
+-########################################################################
+ # Invoke macro to generate various sources
+ ########################################################################
+-expand_cc_h_impl(add_XX ss ii cc)
+-expand_cc_h_impl(add_const_XX bb ss ii ff cc)
+-expand_cc_h_impl(add_const_vXX bb ss ii ff cc)
+-expand_cc_h_impl(and_XX bb ss ii)
+-expand_cc_h_impl(and_const_XX bb ss ii)
+-expand_cc_h_impl(argmax_XX fs is ss)
+-expand_cc_h_impl(divide_XX ss ii ff cc)
+-expand_cc_h_impl(integrate_XX ss ii ff cc)
+-expand_cc_h_impl(max_XX ff ii ss)
+-expand_cc_h_impl(moving_average_XX ss ii ff cc)
+-expand_cc_h_impl(multiply_XX ss ii)
+-expand_cc_h_impl(multiply_const_XX ss ii)
+-expand_cc_h_impl(multiply_const_vXX ss ii ff cc)
+-expand_cc_h_impl(mute_XX ss ii ff cc)
+-expand_cc_h_impl(not_XX bb ss ii)
+-expand_cc_h_impl(or_XX bb ss ii)
+-expand_cc_h_impl(peak_detector_XX fb ib sb)
+-expand_cc_h_impl(probe_signal_X b s i f c)
+-expand_cc_h_impl(probe_signal_vX b s i f c)
+-expand_cc_h_impl(sample_and_hold_XX bb ss ii ff)
+-expand_cc_h_impl(sub_XX ss ii ff cc)
+-expand_cc_h_impl(xor_XX bb ss ii)
+-expand_cc_h_impl(packed_to_unpacked_XX bb ss ii)
+-expand_cc_h_impl(unpacked_to_packed_XX bb ss ii)
+-expand_cc_h_impl(vector_insert_X b s i f c)
+-expand_cc_h_impl(vector_sink_X b s i f c)
+-expand_cc_h_impl(vector_source_X b s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H_IMPL(blocks add_XX ss ii cc)
++GR_EXPAND_X_CC_H_IMPL(blocks add_const_XX bb ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks add_const_vXX bb ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks and_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks and_const_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks argmax_XX fs is ss)
++GR_EXPAND_X_CC_H_IMPL(blocks divide_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks integrate_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks max_XX ff ii ss)
++GR_EXPAND_X_CC_H_IMPL(blocks moving_average_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks multiply_XX ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_XX ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_vXX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks mute_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks not_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks or_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks peak_detector_XX fb ib sb)
++GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_X b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_vX b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks sample_and_hold_XX bb ss ii ff)
++GR_EXPAND_X_CC_H_IMPL(blocks sub_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks xor_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks packed_to_unpacked_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks unpacked_to_packed_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks vector_insert_X b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks vector_sink_X b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks vector_source_X b s i f c)
+
+ ########################################################################
+ # Setup the include and linker paths
+--- gr-digital/include/gnuradio/digital/CMakeLists.txt.orig
++++ gr-digital/include/gnuradio/digital/CMakeLists.txt
+@@ -17,54 +17,12 @@
+ # the Free Software Foundation, Inc., 51 Franklin Street,
+ # Boston, MA 02110-1301, USA.
+
++#################################################################
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'digital')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(chunks_to_symbols_XX bf bc sf sc if ic)
++include(GrMiscUtils)
++GR_EXPAND_X_H(digital chunks_to_symbols_XX bf bc sf sc if ic)
+
+ add_custom_target(digital_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-digital/lib/CMakeLists.txt.orig
++++ gr-digital/lib/CMakeLists.txt
+@@ -42,70 +42,10 @@ if(ENABLE_GR_CTRLPORT)
+ endif(ENABLE_GR_CTRLPORT)
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'digital')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_cc(chunks_to_symbols_XX_impl bf bc sf sc if ic)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(digital chunks_to_symbols_XX_impl bf bc sf sc if ic)
+
+ ########################################################################
+ # Setup library
+@@ -198,7 +138,6 @@ list(APPEND digital_libs
+ ${LOG4CPP_LIBRARIES}
+ )
+
+-
+ add_library(gnuradio-digital SHARED ${digital_sources})
+ target_link_libraries(gnuradio-digital ${digital_libs})
+ GR_LIBRARY_FOO(gnuradio-digital RUNTIME_COMPONENT "digital_runtime" DEVEL_COMPONENT "digital_devel")
+--- gr-fec/include/gnuradio/fec/CMakeLists.txt.orig
++++ gr-fec/include/gnuradio/fec/CMakeLists.txt
+@@ -18,63 +18,9 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict(name, sig, 'fec')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-#expand_h(foo_XX ss ii cc)
+-
+-add_custom_target(fec_generated_includes DEPENDS
+- ${generated_includes}
+-)
+-
+-########################################################################
+ # Install header files
+ ########################################################################
+ install(FILES
+- ${generated_includes}
+ api.h
+ decode_ccsds_27_fb.h
+ encode_ccsds_27_bb.h
+--- gr-filter/include/gnuradio/filter/CMakeLists.txt.orig
++++ gr-filter/include/gnuradio/filter/CMakeLists.txt
+@@ -18,56 +18,13 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'filter')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(fir_filter_XXX ccc ccf fcc fff fsf scc)
+-expand_h(freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
+-expand_h(interp_fir_filter_XXX ccc ccf fcc fff fsf scc)
+-expand_h(rational_resampler_base_XXX ccc ccf fcc fff fsf scc)
++include(GrMiscUtils)
++GR_EXPAND_X_H(filter fir_filter_XXX ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_H(filter freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
++GR_EXPAND_X_H(filter interp_fir_filter_XXX ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_H(filter rational_resampler_base_XXX ccc ccf fcc fff fsf scc)
+
+ add_custom_target(filter_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-filter/lib/CMakeLists.txt.orig
++++ gr-filter/lib/CMakeLists.txt
+@@ -18,73 +18,13 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'filter')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_cc(fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
+-expand_cc(freq_xlating_fir_filter_XXX_impl ccc ccf fcc fcf scf scc)
+-expand_cc(interp_fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
+-expand_cc(rational_resampler_base_XXX_impl ccc ccf fcc fff fsf scc)
+-
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(filter fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_CC_H(filter freq_xlating_fir_filter_XXX_impl ccc ccf fcc fcf scf scc)
++GR_EXPAND_X_CC_H(filter interp_fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_CC_H(filter rational_resampler_base_XXX_impl ccc ccf fcc fff fsf scc)
+
+ ########################################################################
+ # Setup the include and linker paths
+--- gr-trellis/include/gnuradio/trellis/CMakeLists.txt.orig
++++ gr-trellis/include/gnuradio/trellis/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-# Copyright 2012 Free Software Foundation, Inc.
++# Copyright 2012-2013 Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Radio
+ #
+@@ -18,62 +18,19 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'trellis')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(encoder_XX bb bs bi ss si ii)
+-expand_h(sccc_encoder_XX bb bs bi ss si ii)
+-expand_h(pccc_encoder_XX bb bs bi ss si ii)
+-expand_h(metrics_X s i f c)
+-expand_h(viterbi_X b s i)
+-expand_h(viterbi_combined_XX sb ss si ib is ii fb fs fi cb cs ci)
+-expand_h(sccc_decoder_X b s i)
+-expand_h(sccc_decoder_combined_XX fb fs fi cb cs ci)
+-expand_h(pccc_decoder_X b s i)
+-expand_h(pccc_decoder_combined_XX fb fs fi cb cs ci)
++include(GrMiscUtils)
++GR_EXPAND_X_H(trellis encoder_XX bb bs bi ss si ii)
++GR_EXPAND_X_H(trellis sccc_encoder_XX bb bs bi ss si ii)
++GR_EXPAND_X_H(trellis pccc_encoder_XX bb bs bi ss si ii)
++GR_EXPAND_X_H(trellis metrics_X s i f c)
++GR_EXPAND_X_H(trellis viterbi_X b s i)
++GR_EXPAND_X_H(trellis viterbi_combined_XX sb ss si ib is ii fb fs fi cb cs ci)
++GR_EXPAND_X_H(trellis sccc_decoder_X b s i)
++GR_EXPAND_X_H(trellis sccc_decoder_combined_XX fb fs fi cb cs ci)
++GR_EXPAND_X_H(trellis pccc_decoder_X b s i)
++GR_EXPAND_X_H(trellis pccc_decoder_combined_XX fb fs fi cb cs ci)
+
+ add_custom_target(trellis_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-trellis/lib/CMakeLists.txt.orig
++++ gr-trellis/lib/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-# Copyright 2012 Free Software Foundation, Inc.
++# Copyright 2012-2013 Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Radio
+ #
+@@ -37,79 +37,20 @@ if(ENABLE_GR_CTRLPORT)
+ include_directories(${ICE_INCLUDE_DIR})
+ endif(ENABLE_GR_CTRLPORT)
+
+-#######################################################################
+-# generate the python helper script which calls into the build utils
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'trellis')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-expand_cc(encoder_XX_impl bb bs bi ss si ii)
+-expand_cc(sccc_encoder_XX_impl bb bs bi ss si ii)
+-expand_cc(pccc_encoder_XX_impl bb bs bi ss si ii)
+-expand_cc(metrics_X_impl s i f c)
+-expand_cc(viterbi_X_impl b s i)
+-expand_cc(viterbi_combined_XX_impl sb ss si ib is ii fb fs fi cb cs ci)
+-expand_cc(sccc_decoder_X_impl b s i)
+-expand_cc(sccc_decoder_combined_XX_impl fb fs fi cb cs ci)
+-expand_cc(pccc_decoder_X_impl b s i)
+-expand_cc(pccc_decoder_combined_XX_impl fb fs fi cb cs ci)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(trellis encoder_XX_impl bb bs bi ss si ii)
++GR_EXPAND_X_CC_H(trellis sccc_encoder_XX_impl bb bs bi ss si ii)
++GR_EXPAND_X_CC_H(trellis pccc_encoder_XX_impl bb bs bi ss si ii)
++GR_EXPAND_X_CC_H(trellis metrics_X_impl s i f c)
++GR_EXPAND_X_CC_H(trellis viterbi_X_impl b s i)
++GR_EXPAND_X_CC_H(trellis viterbi_combined_XX_impl sb ss si ib is ii fb fs fi cb cs ci)
++GR_EXPAND_X_CC_H(trellis sccc_decoder_X_impl b s i)
++GR_EXPAND_X_CC_H(trellis sccc_decoder_combined_XX_impl fb fs fi cb cs ci)
++GR_EXPAND_X_CC_H(trellis pccc_decoder_X_impl b s i)
++GR_EXPAND_X_CC_H(trellis pccc_decoder_combined_XX_impl fb fs fi cb cs ci)
+
+ ########################################################################
+ # Setup library
Deleted: trunk/dports/science/gnuradio/files/patch-cmake-expand.diff
===================================================================
--- trunk/dports/science/gnuradio/files/patch-cmake-expand.diff 2014-02-18 18:19:49 UTC (rev 117180)
+++ trunk/dports/science/gnuradio/files/patch-cmake-expand.diff 2014-02-18 18:21:51 UTC (rev 117181)
@@ -1,1154 +0,0 @@
---- cmake/Modules/GrMiscUtils.cmake.orig
-+++ cmake/Modules/GrMiscUtils.cmake
-@@ -333,7 +333,7 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
- } " HAVE_PTHREAD_SETSCHEDPARAM
- )
- GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM)
--
-+
- CHECK_CXX_SOURCE_COMPILES("
- #include <sched.h>
- int main(){
-@@ -345,3 +345,210 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
- GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
- endmacro(GR_CHECK_LINUX_SCHED_AVAIL)
-
-+########################################################################
-+# Macros to generate source and header files from template
-+########################################################################
-+macro(GR_EXPAND_X_H component root)
-+
-+ include(GrPython)
-+
-+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+"#!${PYTHON_EXECUTABLE}
-+
-+import sys, os, re
-+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-+
-+if __name__ == '__main__':
-+ import build_utils
-+ root, inp = sys.argv[1:3]
-+ for sig in sys.argv[3:]:
-+ name = re.sub ('X+', sig, root)
-+ d = build_utils.standard_dict2(name, sig, '${component}')
-+ build_utils.expand_template(d, inp)
-+")
-+
-+ #make a list of all the generated headers
-+ unset(expanded_files_h)
-+ foreach(sig ${ARGN})
-+ string(REGEX REPLACE "X+" ${sig} name ${root})
-+ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-+ endforeach(sig)
-+ unset(name)
-+
-+ #try to force generate the headers
-+ execute_process(
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}.h.t ${ARGN}
-+ )
-+
-+ #create a command to generate the headers
-+ add_custom_command(
-+ OUTPUT ${expanded_files_h}
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}.h.t ${ARGN}
-+ )
-+
-+ #install rules for the generated headers
-+ list(APPEND generated_includes ${expanded_files_h})
-+
-+endmacro(GR_EXPAND_X_H)
-+
-+macro(GR_EXPAND_X_CC_H component root)
-+
-+ include(GrPython)
-+
-+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+"#!${PYTHON_EXECUTABLE}
-+
-+import sys, os, re
-+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-+
-+if __name__ == '__main__':
-+ import build_utils
-+ root, inp = sys.argv[1:3]
-+ for sig in sys.argv[3:]:
-+ name = re.sub ('X+', sig, root)
-+ d = build_utils.standard_impl_dict2(name, sig, '${component}')
-+ build_utils.expand_template(d, inp)
-+")
-+
-+ #make a list of all the generated files
-+ unset(expanded_files_cc)
-+ unset(expanded_files_h)
-+ foreach(sig ${ARGN})
-+ string(REGEX REPLACE "X+" ${sig} name ${root})
-+ list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
-+ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-+ endforeach(sig)
-+ unset(name)
-+
-+ #try to force generate the source files
-+ execute_process(
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}.cc.t ${ARGN}
-+ )
-+
-+ #create a command to generate the source files
-+ add_custom_command(
-+ OUTPUT ${expanded_files_cc}
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}.cc.t ${ARGN}
-+ )
-+
-+ #try to force generate the header files
-+ execute_process(
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}.h.t ${ARGN}
-+ )
-+
-+ #create a command to generate the header files
-+ add_custom_command(
-+ OUTPUT ${expanded_files_h}
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}.h.t ${ARGN}
-+ )
-+
-+ #make source files depends on headers to force generation
-+ set_source_files_properties(${expanded_files_cc}
-+ PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-+ )
-+
-+ #install rules for the generated files
-+ list(APPEND generated_sources ${expanded_files_cc})
-+ list(APPEND generated_headers ${expanded_files_h})
-+
-+endmacro(GR_EXPAND_X_CC_H)
-+
-+macro(GR_EXPAND_X_CC_H_IMPL component root)
-+
-+ include(GrPython)
-+
-+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+"#!${PYTHON_EXECUTABLE}
-+
-+import sys, os, re
-+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-+
-+if __name__ == '__main__':
-+ import build_utils
-+ root, inp = sys.argv[1:3]
-+ for sig in sys.argv[3:]:
-+ name = re.sub ('X+', sig, root)
-+ d = build_utils.standard_dict(name, sig, '${component}')
-+ build_utils.expand_template(d, inp, '_impl')
-+")
-+
-+ #make a list of all the generated files
-+ unset(expanded_files_cc_impl)
-+ unset(expanded_files_h_impl)
-+ unset(expanded_files_h)
-+ foreach(sig ${ARGN})
-+ string(REGEX REPLACE "X+" ${sig} name ${root})
-+ list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
-+ list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
-+ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h)
-+ endforeach(sig)
-+ unset(name)
-+
-+ #try to force generate the _impl.cc files
-+ execute_process(
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}_impl.cc.t ${ARGN}
-+ )
-+
-+ #create a command to generate the _impl.cc files
-+ add_custom_command(
-+ OUTPUT ${expanded_files_cc_impl}
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}_impl.cc.t ${ARGN}
-+ )
-+
-+ #try to force generate the _impl.h files
-+ execute_process(
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}_impl.h.t ${ARGN}
-+ )
-+
-+ #create a command to generate the _impl.h files
-+ add_custom_command(
-+ OUTPUT ${expanded_files_h_impl}
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
-+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-+ ${root} ${root}_impl.h.t ${ARGN}
-+ )
-+
-+ #make _impl.cc source files depend on _impl.h to force generation
-+ set_source_files_properties(${expanded_files_cc_impl}
-+ PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
-+ )
-+
-+ #make _impl.h source files depend on headers to force generation
-+ set_source_files_properties(${expanded_files_h_impl}
-+ PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-+ )
-+
-+ #install rules for the generated files
-+ list(APPEND generated_sources ${expanded_files_cc_impl})
-+ list(APPEND generated_headers ${expanded_files_h_impl})
-+
-+endmacro(GR_EXPAND_X_CC_H_IMPL)
---- gr-analog/include/gnuradio/analog/CMakeLists.txt.orig
-+++ gr-analog/include/gnuradio/analog/CMakeLists.txt
-@@ -1,4 +1,4 @@
--# Copyright 2012 Free Software Foundation, Inc.
-+# Copyright 2012-2013 Free Software Foundation, Inc.
- #
- # This file is part of GNU Radio
- #
-@@ -18,55 +18,12 @@
- # Boston, MA 02110-1301, USA.
-
- ########################################################################
--# generate helper scripts to expand templated files
--########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_dict2(name, sig, 'analog')
-- build_utils.expand_template(d, inp)
--
--")
--
--macro(expand_h root)
-- #make a list of all the generated files
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the files
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #install rules for the generated h files
-- list(APPEND generated_includes ${expanded_files_h})
--endmacro(expand_h)
--
--########################################################################
--# Invoke macro to generate various sources
-+# Invoke macro to generate various headers
- #######################################################################
--expand_h(noise_source_X s i f c)
--expand_h(fastnoise_source_X s i f c)
--expand_h(sig_source_X s i f c)
-+include(GrMiscUtils)
-+GR_EXPAND_X_H(analog noise_source_X s i f c)
-+GR_EXPAND_X_H(analog fastnoise_source_X s i f c)
-+GR_EXPAND_X_H(analog sig_source_X s i f c)
-
- add_custom_target(analog_generated_includes DEPENDS
- ${generated_includes}
---- gr-analog/lib/CMakeLists.txt.orig
-+++ gr-analog/lib/CMakeLists.txt
-@@ -41,72 +41,12 @@ if(ENABLE_GR_CTRLPORT)
- endif(ENABLE_GR_CTRLPORT)
-
- ########################################################################
--# generate helper scripts to expand templated files
-+# Invoke macro to generate various sources and headers
- ########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_impl_dict2(name, sig, 'analog')
-- build_utils.expand_template(d, inp)
--")
--
--macro(expand_cc root)
-- #make a list of all the generated files
-- unset(expanded_files_cc)
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the source files
-- add_custom_command(
-- OUTPUT ${expanded_files_cc}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.cc.t ${ARGN}
-- )
--
-- #create a command to generate the header file
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #make source files depends on headers to force generation
-- set_source_files_properties(${expanded_files_cc}
-- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-- )
--
-- #install rules for the generated cc files
-- list(APPEND generated_sources ${expanded_files_cc})
-- list(APPEND generated_headers ${expanded_files_h})
--endmacro(expand_cc)
--
--
--########################################################################
--# Invoke macro to generate various sources
--########################################################################
--expand_cc(noise_source_X_impl s i f c)
--expand_cc(fastnoise_source_X_impl s i f c)
--expand_cc(sig_source_X_impl s i f c)
-+include(GrMiscUtils)
-+GR_EXPAND_X_CC_H(analog noise_source_X_impl s i f c)
-+GR_EXPAND_X_CC_H(analog fastnoise_source_X_impl s i f c)
-+GR_EXPAND_X_CC_H(analog sig_source_X_impl s i f c)
-
- ########################################################################
- # Setup library
---- gr-blocks/include/gnuradio/blocks/CMakeLists.txt.orig
-+++ gr-blocks/include/gnuradio/blocks/CMakeLists.txt
-@@ -18,79 +18,36 @@
- # Boston, MA 02110-1301, USA.
-
- ########################################################################
--# generate helper scripts to expand templated files
-+# Invoke macro to generate various headers
- ########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_dict(name, sig, 'blocks')
-- build_utils.expand_template(d, inp)
--
--")
--
--macro(expand_h root)
-- #make a list of all the generated files
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the files
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #install rules for the generated h files
-- list(APPEND generated_includes ${expanded_files_h})
--endmacro(expand_h)
--
--########################################################################
--# Invoke macro to generate various sources
--########################################################################
--expand_h(add_XX ss ii cc)
--expand_h(add_const_XX bb ss ii ff cc)
--expand_h(add_const_vXX bb ss ii ff cc)
--expand_h(and_XX bb ss ii)
--expand_h(and_const_XX bb ss ii)
--expand_h(argmax_XX fs is ss)
--expand_h(divide_XX ss ii ff cc)
--expand_h(integrate_XX ss ii ff cc)
--expand_h(max_XX ff ii ss)
--expand_h(moving_average_XX ss ii ff cc)
--expand_h(multiply_XX ss ii)
--expand_h(multiply_const_XX ss ii)
--expand_h(multiply_const_vXX ss ii ff cc)
--expand_h(mute_XX ss ii ff cc)
--expand_h(not_XX bb ss ii)
--expand_h(or_XX bb ss ii)
--expand_h(peak_detector_XX fb ib sb)
--expand_h(probe_signal_X b s i f c)
--expand_h(probe_signal_vX b s i f c)
--expand_h(sample_and_hold_XX bb ss ii ff)
--expand_h(sub_XX ss ii ff cc)
--expand_h(xor_XX bb ss ii)
--expand_h(packed_to_unpacked_XX bb ss ii)
--expand_h(unpacked_to_packed_XX bb ss ii)
--expand_h(vector_insert_X b s i f c)
--expand_h(vector_sink_X b s i f c)
--expand_h(vector_source_X b s i f c)
-+include(GrMiscUtils)
-+GR_EXPAND_X_H(blocks add_XX ss ii cc)
-+GR_EXPAND_X_H(blocks add_const_XX bb ss ii ff cc)
-+GR_EXPAND_X_H(blocks add_const_vXX bb ss ii ff cc)
-+GR_EXPAND_X_H(blocks and_XX bb ss ii)
-+GR_EXPAND_X_H(blocks and_const_XX bb ss ii)
-+GR_EXPAND_X_H(blocks argmax_XX fs is ss)
-+GR_EXPAND_X_H(blocks divide_XX ss ii ff cc)
-+GR_EXPAND_X_H(blocks integrate_XX ss ii ff cc)
-+GR_EXPAND_X_H(blocks max_XX ff ii ss)
-+GR_EXPAND_X_H(blocks moving_average_XX ss ii ff cc)
-+GR_EXPAND_X_H(blocks multiply_XX ss ii)
-+GR_EXPAND_X_H(blocks multiply_const_XX ss ii)
-+GR_EXPAND_X_H(blocks multiply_const_vXX ss ii ff cc)
-+GR_EXPAND_X_H(blocks mute_XX ss ii ff cc)
-+GR_EXPAND_X_H(blocks not_XX bb ss ii)
-+GR_EXPAND_X_H(blocks or_XX bb ss ii)
-+GR_EXPAND_X_H(blocks peak_detector_XX fb ib sb)
-+GR_EXPAND_X_H(blocks probe_signal_X b s i f c)
-+GR_EXPAND_X_H(blocks probe_signal_vX b s i f c)
-+GR_EXPAND_X_H(blocks sample_and_hold_XX bb ss ii ff)
-+GR_EXPAND_X_H(blocks sub_XX ss ii ff cc)
-+GR_EXPAND_X_H(blocks xor_XX bb ss ii)
-+GR_EXPAND_X_H(blocks packed_to_unpacked_XX bb ss ii)
-+GR_EXPAND_X_H(blocks unpacked_to_packed_XX bb ss ii)
-+GR_EXPAND_X_H(blocks vector_insert_X b s i f c)
-+GR_EXPAND_X_H(blocks vector_sink_X b s i f c)
-+GR_EXPAND_X_H(blocks vector_source_X b s i f c)
-
- add_custom_target(blocks_generated_includes DEPENDS
- ${generated_includes}
---- gr-blocks/lib/CMakeLists.txt.orig
-+++ gr-blocks/lib/CMakeLists.txt
-@@ -23,100 +23,36 @@
- include(${CMAKE_CURRENT_SOURCE_DIR}/ConfigChecks.cmake)
-
- ########################################################################
--# generate helper scripts to expand templated files
--########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_dict(name, sig, 'blocks')
-- build_utils.expand_template(d, inp, '_impl')
--")
--
--macro(expand_cc_h_impl root)
-- #make a list of all the generated files
-- unset(expanded_files_cc_impl)
-- unset(expanded_files_h_impl)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
-- list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the _impl.cc files
-- add_custom_command(
-- OUTPUT ${expanded_files_cc_impl}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}_impl.cc.t ${ARGN}
-- )
--
-- #create a command to generate the _impl.h files
-- add_custom_command(
-- OUTPUT ${expanded_files_h_impl}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}_impl.h.t ${ARGN}
-- )
--
-- #make _impl.cc source files depend on headers to force generation
-- set_source_files_properties(${expanded_files_cc_impl}
-- PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
-- )
--
-- #make _impl.h source files depend on headers to force generation
-- set_source_files_properties(${expanded_files_h_impl}
-- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-- )
--
-- #install rules for the generated cc files
-- list(APPEND generated_sources ${expanded_files_cc_impl})
--endmacro(expand_cc_h_impl)
--
--########################################################################
- # Invoke macro to generate various sources
- ########################################################################
--expand_cc_h_impl(add_XX ss ii cc)
--expand_cc_h_impl(add_const_XX bb ss ii ff cc)
--expand_cc_h_impl(add_const_vXX bb ss ii ff cc)
--expand_cc_h_impl(and_XX bb ss ii)
--expand_cc_h_impl(and_const_XX bb ss ii)
--expand_cc_h_impl(argmax_XX fs is ss)
--expand_cc_h_impl(divide_XX ss ii ff cc)
--expand_cc_h_impl(integrate_XX ss ii ff cc)
--expand_cc_h_impl(max_XX ff ii ss)
--expand_cc_h_impl(moving_average_XX ss ii ff cc)
--expand_cc_h_impl(multiply_XX ss ii)
--expand_cc_h_impl(multiply_const_XX ss ii)
--expand_cc_h_impl(multiply_const_vXX ss ii ff cc)
--expand_cc_h_impl(mute_XX ss ii ff cc)
--expand_cc_h_impl(not_XX bb ss ii)
--expand_cc_h_impl(or_XX bb ss ii)
--expand_cc_h_impl(peak_detector_XX fb ib sb)
--expand_cc_h_impl(probe_signal_X b s i f c)
--expand_cc_h_impl(probe_signal_vX b s i f c)
--expand_cc_h_impl(sample_and_hold_XX bb ss ii ff)
--expand_cc_h_impl(sub_XX ss ii ff cc)
--expand_cc_h_impl(xor_XX bb ss ii)
--expand_cc_h_impl(packed_to_unpacked_XX bb ss ii)
--expand_cc_h_impl(unpacked_to_packed_XX bb ss ii)
--expand_cc_h_impl(vector_insert_X b s i f c)
--expand_cc_h_impl(vector_sink_X b s i f c)
--expand_cc_h_impl(vector_source_X b s i f c)
-+include(GrMiscUtils)
-+GR_EXPAND_X_CC_H_IMPL(blocks add_XX ss ii cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks add_const_XX bb ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks add_const_vXX bb ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks and_XX bb ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks and_const_XX bb ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks argmax_XX fs is ss)
-+GR_EXPAND_X_CC_H_IMPL(blocks divide_XX ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks integrate_XX ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks max_XX ff ii ss)
-+GR_EXPAND_X_CC_H_IMPL(blocks moving_average_XX ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks multiply_XX ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_XX ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_vXX ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks mute_XX ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks not_XX bb ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks or_XX bb ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks peak_detector_XX fb ib sb)
-+GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_X b s i f c)
-+GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_vX b s i f c)
-+GR_EXPAND_X_CC_H_IMPL(blocks sample_and_hold_XX bb ss ii ff)
-+GR_EXPAND_X_CC_H_IMPL(blocks sub_XX ss ii ff cc)
-+GR_EXPAND_X_CC_H_IMPL(blocks xor_XX bb ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks packed_to_unpacked_XX bb ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks unpacked_to_packed_XX bb ss ii)
-+GR_EXPAND_X_CC_H_IMPL(blocks vector_insert_X b s i f c)
-+GR_EXPAND_X_CC_H_IMPL(blocks vector_sink_X b s i f c)
-+GR_EXPAND_X_CC_H_IMPL(blocks vector_source_X b s i f c)
-
- ########################################################################
- # Setup the include and linker paths
---- gr-digital/include/gnuradio/digital/CMakeLists.txt.orig
-+++ gr-digital/include/gnuradio/digital/CMakeLists.txt
-@@ -17,54 +17,12 @@
- # the Free Software Foundation, Inc., 51 Franklin Street,
- # Boston, MA 02110-1301, USA.
-
-+#################################################################
- ########################################################################
--# generate helper scripts to expand templated files
--########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_dict2(name, sig, 'digital')
-- build_utils.expand_template(d, inp)
--
--")
--
--macro(expand_h root)
-- #make a list of all the generated files
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the files
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #install rules for the generated h files
-- list(APPEND generated_includes ${expanded_files_h})
--endmacro(expand_h)
--
--########################################################################
--# Invoke macro to generate various sources
-+# Invoke macro to generate various headers
- #######################################################################
--expand_h(chunks_to_symbols_XX bf bc sf sc if ic)
-+include(GrMiscUtils)
-+GR_EXPAND_X_H(digital chunks_to_symbols_XX bf bc sf sc if ic)
-
- add_custom_target(digital_generated_includes DEPENDS
- ${generated_includes}
---- gr-digital/lib/CMakeLists.txt.orig
-+++ gr-digital/lib/CMakeLists.txt
-@@ -42,70 +42,10 @@ if(ENABLE_GR_CTRLPORT)
- endif(ENABLE_GR_CTRLPORT)
-
- ########################################################################
--# generate helper scripts to expand templated files
-+# Invoke macro to generate various sources and headers
- ########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_impl_dict2(name, sig, 'digital')
-- build_utils.expand_template(d, inp)
--")
--
--macro(expand_cc root)
-- #make a list of all the generated files
-- unset(expanded_files_cc)
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the source files
-- add_custom_command(
-- OUTPUT ${expanded_files_cc}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.cc.t ${ARGN}
-- )
--
-- #create a command to generate the header file
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #make source files depends on headers to force generation
-- set_source_files_properties(${expanded_files_cc}
-- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-- )
--
-- #install rules for the generated cc files
-- list(APPEND generated_sources ${expanded_files_cc})
-- list(APPEND generated_headers ${expanded_files_h})
--endmacro(expand_cc)
--
--
--########################################################################
--# Invoke macro to generate various sources
--########################################################################
--expand_cc(chunks_to_symbols_XX_impl bf bc sf sc if ic)
-+include(GrMiscUtils)
-+GR_EXPAND_X_CC_H(digital chunks_to_symbols_XX_impl bf bc sf sc if ic)
-
- ########################################################################
- # Setup library
-@@ -198,7 +138,6 @@ list(APPEND digital_libs
- ${LOG4CPP_LIBRARIES}
- )
-
--
- add_library(gnuradio-digital SHARED ${digital_sources})
- target_link_libraries(gnuradio-digital ${digital_libs})
- GR_LIBRARY_FOO(gnuradio-digital RUNTIME_COMPONENT "digital_runtime" DEVEL_COMPONENT "digital_devel")
---- gr-fec/include/gnuradio/fec/CMakeLists.txt.orig
-+++ gr-fec/include/gnuradio/fec/CMakeLists.txt
-@@ -18,63 +18,9 @@
- # Boston, MA 02110-1301, USA.
-
- ########################################################################
--# generate helper scripts to expand templated files
--########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_dict(name, sig, 'fec')
-- build_utils.expand_template(d, inp)
--
--")
--
--macro(expand_h root)
-- #make a list of all the generated files
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the files
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #install rules for the generated h files
-- list(APPEND generated_includes ${expanded_files_h})
--endmacro(expand_h)
--
--########################################################################
--# Invoke macro to generate various sources
--########################################################################
--#expand_h(foo_XX ss ii cc)
--
--add_custom_target(fec_generated_includes DEPENDS
-- ${generated_includes}
--)
--
--########################################################################
- # Install header files
- ########################################################################
- install(FILES
-- ${generated_includes}
- api.h
- decode_ccsds_27_fb.h
- encode_ccsds_27_bb.h
---- gr-filter/include/gnuradio/filter/CMakeLists.txt.orig
-+++ gr-filter/include/gnuradio/filter/CMakeLists.txt
-@@ -18,56 +18,13 @@
- # Boston, MA 02110-1301, USA.
-
- ########################################################################
--# generate helper scripts to expand templated files
--########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_dict2(name, sig, 'filter')
-- build_utils.expand_template(d, inp)
--
--")
--
--macro(expand_h root)
-- #make a list of all the generated files
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the files
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #install rules for the generated h files
-- list(APPEND generated_includes ${expanded_files_h})
--endmacro(expand_h)
--
--########################################################################
--# Invoke macro to generate various sources
-+# Invoke macro to generate various headers
- #######################################################################
--expand_h(fir_filter_XXX ccc ccf fcc fff fsf scc)
--expand_h(freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
--expand_h(interp_fir_filter_XXX ccc ccf fcc fff fsf scc)
--expand_h(rational_resampler_base_XXX ccc ccf fcc fff fsf scc)
-+include(GrMiscUtils)
-+GR_EXPAND_X_H(filter fir_filter_XXX ccc ccf fcc fff fsf scc)
-+GR_EXPAND_X_H(filter freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
-+GR_EXPAND_X_H(filter interp_fir_filter_XXX ccc ccf fcc fff fsf scc)
-+GR_EXPAND_X_H(filter rational_resampler_base_XXX ccc ccf fcc fff fsf scc)
-
- add_custom_target(filter_generated_includes DEPENDS
- ${generated_includes}
---- gr-filter/lib/CMakeLists.txt.orig
-+++ gr-filter/lib/CMakeLists.txt
-@@ -18,73 +18,13 @@
- # Boston, MA 02110-1301, USA.
-
- ########################################################################
--# generate helper scripts to expand templated files
-+# Invoke macro to generate various sources and headers
- ########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_impl_dict2(name, sig, 'filter')
-- build_utils.expand_template(d, inp)
--")
--
--macro(expand_cc root)
-- #make a list of all the generated files
-- unset(expanded_files_cc)
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the source files
-- add_custom_command(
-- OUTPUT ${expanded_files_cc}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.cc.t ${ARGN}
-- )
--
-- #create a command to generate the header file
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #make source files depends on headers to force generation
-- set_source_files_properties(${expanded_files_cc}
-- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-- )
--
-- #install rules for the generated cc files
-- list(APPEND generated_sources ${expanded_files_cc})
-- list(APPEND generated_headers ${expanded_files_h})
--endmacro(expand_cc)
--
--########################################################################
--# Invoke macro to generate various sources
--########################################################################
--expand_cc(fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
--expand_cc(freq_xlating_fir_filter_XXX_impl ccc ccf fcc fcf scf scc)
--expand_cc(interp_fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
--expand_cc(rational_resampler_base_XXX_impl ccc ccf fcc fff fsf scc)
--
-+include(GrMiscUtils)
-+GR_EXPAND_X_CC_H(filter fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
-+GR_EXPAND_X_CC_H(filter freq_xlating_fir_filter_XXX_impl ccc ccf fcc fcf scf scc)
-+GR_EXPAND_X_CC_H(filter interp_fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
-+GR_EXPAND_X_CC_H(filter rational_resampler_base_XXX_impl ccc ccf fcc fff fsf scc)
-
- ########################################################################
- # Setup the include and linker paths
---- gr-trellis/include/gnuradio/trellis/CMakeLists.txt.orig
-+++ gr-trellis/include/gnuradio/trellis/CMakeLists.txt
-@@ -1,4 +1,4 @@
--# Copyright 2012 Free Software Foundation, Inc.
-+# Copyright 2012-2013 Free Software Foundation, Inc.
- #
- # This file is part of GNU Radio
- #
-@@ -18,62 +18,19 @@
- # Boston, MA 02110-1301, USA.
-
- ########################################################################
--# generate helper scripts to expand templated files
--########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_dict2(name, sig, 'trellis')
-- build_utils.expand_template(d, inp)
--
--")
--
--macro(expand_h root)
-- #make a list of all the generated files
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the files
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #install rules for the generated h files
-- list(APPEND generated_includes ${expanded_files_h})
--endmacro(expand_h)
--
--########################################################################
--# Invoke macro to generate various sources
-+# Invoke macro to generate various headers
- #######################################################################
--expand_h(encoder_XX bb bs bi ss si ii)
--expand_h(sccc_encoder_XX bb bs bi ss si ii)
--expand_h(pccc_encoder_XX bb bs bi ss si ii)
--expand_h(metrics_X s i f c)
--expand_h(viterbi_X b s i)
--expand_h(viterbi_combined_XX sb ss si ib is ii fb fs fi cb cs ci)
--expand_h(sccc_decoder_X b s i)
--expand_h(sccc_decoder_combined_XX fb fs fi cb cs ci)
--expand_h(pccc_decoder_X b s i)
--expand_h(pccc_decoder_combined_XX fb fs fi cb cs ci)
-+include(GrMiscUtils)
-+GR_EXPAND_X_H(trellis encoder_XX bb bs bi ss si ii)
-+GR_EXPAND_X_H(trellis sccc_encoder_XX bb bs bi ss si ii)
-+GR_EXPAND_X_H(trellis pccc_encoder_XX bb bs bi ss si ii)
-+GR_EXPAND_X_H(trellis metrics_X s i f c)
-+GR_EXPAND_X_H(trellis viterbi_X b s i)
-+GR_EXPAND_X_H(trellis viterbi_combined_XX sb ss si ib is ii fb fs fi cb cs ci)
-+GR_EXPAND_X_H(trellis sccc_decoder_X b s i)
-+GR_EXPAND_X_H(trellis sccc_decoder_combined_XX fb fs fi cb cs ci)
-+GR_EXPAND_X_H(trellis pccc_decoder_X b s i)
-+GR_EXPAND_X_H(trellis pccc_decoder_combined_XX fb fs fi cb cs ci)
-
- add_custom_target(trellis_generated_includes DEPENDS
- ${generated_includes}
---- gr-trellis/lib/CMakeLists.txt.orig
-+++ gr-trellis/lib/CMakeLists.txt
-@@ -1,4 +1,4 @@
--# Copyright 2012 Free Software Foundation, Inc.
-+# Copyright 2012-2013 Free Software Foundation, Inc.
- #
- # This file is part of GNU Radio
- #
-@@ -37,79 +37,20 @@ if(ENABLE_GR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
- endif(ENABLE_GR_CTRLPORT)
-
--#######################################################################
--# generate the python helper script which calls into the build utils
- ########################################################################
--include(GrPython)
--
--file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
--#!${PYTHON_EXECUTABLE}
--
--import sys, os, re
--sys.path.append('${GR_RUNTIME_PYTHONPATH}')
--os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
--os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
--
--if __name__ == '__main__':
-- import build_utils
-- root, inp = sys.argv[1:3]
-- for sig in sys.argv[3:]:
-- name = re.sub ('X+', sig, root)
-- d = build_utils.standard_impl_dict2(name, sig, 'trellis')
-- build_utils.expand_template(d, inp)
--")
--
--macro(expand_cc root)
-- #make a list of all the generated files
-- unset(expanded_files_cc)
-- unset(expanded_files_h)
-- foreach(sig ${ARGN})
-- string(REGEX REPLACE "X+" ${sig} name ${root})
-- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
-- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-- endforeach(sig)
--
-- #create a command to generate the source files
-- add_custom_command(
-- OUTPUT ${expanded_files_cc}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.cc.t ${ARGN}
-- )
--
-- #create a command to generate the header file
-- add_custom_command(
-- OUTPUT ${expanded_files_h}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
-- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-- ${root} ${root}.h.t ${ARGN}
-- )
--
-- #make source files depends on headers to force generation
-- set_source_files_properties(${expanded_files_cc}
-- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-- )
--
-- #install rules for the generated cc files
-- list(APPEND generated_sources ${expanded_files_cc})
-- list(APPEND generated_headers ${expanded_files_h})
--endmacro(expand_cc)
--
--########################################################################
--# Invoke macro to generate various sources
-+# Invoke macro to generate various sources and headers
- ########################################################################
--expand_cc(encoder_XX_impl bb bs bi ss si ii)
--expand_cc(sccc_encoder_XX_impl bb bs bi ss si ii)
--expand_cc(pccc_encoder_XX_impl bb bs bi ss si ii)
--expand_cc(metrics_X_impl s i f c)
--expand_cc(viterbi_X_impl b s i)
--expand_cc(viterbi_combined_XX_impl sb ss si ib is ii fb fs fi cb cs ci)
--expand_cc(sccc_decoder_X_impl b s i)
--expand_cc(sccc_decoder_combined_XX_impl fb fs fi cb cs ci)
--expand_cc(pccc_decoder_X_impl b s i)
--expand_cc(pccc_decoder_combined_XX_impl fb fs fi cb cs ci)
-+include(GrMiscUtils)
-+GR_EXPAND_X_CC_H(trellis encoder_XX_impl bb bs bi ss si ii)
-+GR_EXPAND_X_CC_H(trellis sccc_encoder_XX_impl bb bs bi ss si ii)
-+GR_EXPAND_X_CC_H(trellis pccc_encoder_XX_impl bb bs bi ss si ii)
-+GR_EXPAND_X_CC_H(trellis metrics_X_impl s i f c)
-+GR_EXPAND_X_CC_H(trellis viterbi_X_impl b s i)
-+GR_EXPAND_X_CC_H(trellis viterbi_combined_XX_impl sb ss si ib is ii fb fs fi cb cs ci)
-+GR_EXPAND_X_CC_H(trellis sccc_decoder_X_impl b s i)
-+GR_EXPAND_X_CC_H(trellis sccc_decoder_combined_XX_impl fb fs fi cb cs ci)
-+GR_EXPAND_X_CC_H(trellis pccc_decoder_X_impl b s i)
-+GR_EXPAND_X_CC_H(trellis pccc_decoder_combined_XX_impl fb fs fi cb cs ci)
-
- ########################################################################
- # Setup library
Added: trunk/dports/science/gnuradio/files/patch-cmake-expand.release.diff
===================================================================
--- trunk/dports/science/gnuradio/files/patch-cmake-expand.release.diff (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-cmake-expand.release.diff 2014-02-18 18:21:51 UTC (rev 117181)
@@ -0,0 +1,1154 @@
+--- cmake/Modules/GrMiscUtils.cmake.orig
++++ cmake/Modules/GrMiscUtils.cmake
+@@ -333,7 +333,7 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
+ } " HAVE_PTHREAD_SETSCHEDPARAM
+ )
+ GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM)
+-
++
+ CHECK_CXX_SOURCE_COMPILES("
+ #include <sched.h>
+ int main(){
+@@ -345,3 +345,210 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
+ GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
+ endmacro(GR_CHECK_LINUX_SCHED_AVAIL)
+
++########################################################################
++# Macros to generate source and header files from template
++########################################################################
++macro(GR_EXPAND_X_H component root)
++
++ include(GrPython)
++
++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++"#!${PYTHON_EXECUTABLE}
++
++import sys, os, re
++sys.path.append('${GR_RUNTIME_PYTHONPATH}')
++os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
++os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
++
++if __name__ == '__main__':
++ import build_utils
++ root, inp = sys.argv[1:3]
++ for sig in sys.argv[3:]:
++ name = re.sub ('X+', sig, root)
++ d = build_utils.standard_dict2(name, sig, '${component}')
++ build_utils.expand_template(d, inp)
++")
++
++ #make a list of all the generated headers
++ unset(expanded_files_h)
++ foreach(sig ${ARGN})
++ string(REGEX REPLACE "X+" ${sig} name ${root})
++ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
++ endforeach(sig)
++ unset(name)
++
++ #try to force generate the headers
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #create a command to generate the headers
++ add_custom_command(
++ OUTPUT ${expanded_files_h}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #install rules for the generated headers
++ list(APPEND generated_includes ${expanded_files_h})
++
++endmacro(GR_EXPAND_X_H)
++
++macro(GR_EXPAND_X_CC_H component root)
++
++ include(GrPython)
++
++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++"#!${PYTHON_EXECUTABLE}
++
++import sys, os, re
++sys.path.append('${GR_RUNTIME_PYTHONPATH}')
++os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
++os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
++
++if __name__ == '__main__':
++ import build_utils
++ root, inp = sys.argv[1:3]
++ for sig in sys.argv[3:]:
++ name = re.sub ('X+', sig, root)
++ d = build_utils.standard_impl_dict2(name, sig, '${component}')
++ build_utils.expand_template(d, inp)
++")
++
++ #make a list of all the generated files
++ unset(expanded_files_cc)
++ unset(expanded_files_h)
++ foreach(sig ${ARGN})
++ string(REGEX REPLACE "X+" ${sig} name ${root})
++ list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
++ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
++ endforeach(sig)
++ unset(name)
++
++ #try to force generate the source files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.cc.t ${ARGN}
++ )
++
++ #create a command to generate the source files
++ add_custom_command(
++ OUTPUT ${expanded_files_cc}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.cc.t ${ARGN}
++ )
++
++ #try to force generate the header files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #create a command to generate the header files
++ add_custom_command(
++ OUTPUT ${expanded_files_h}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}.h.t ${ARGN}
++ )
++
++ #make source files depends on headers to force generation
++ set_source_files_properties(${expanded_files_cc}
++ PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
++ )
++
++ #install rules for the generated files
++ list(APPEND generated_sources ${expanded_files_cc})
++ list(APPEND generated_headers ${expanded_files_h})
++
++endmacro(GR_EXPAND_X_CC_H)
++
++macro(GR_EXPAND_X_CC_H_IMPL component root)
++
++ include(GrPython)
++
++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++"#!${PYTHON_EXECUTABLE}
++
++import sys, os, re
++sys.path.append('${GR_RUNTIME_PYTHONPATH}')
++os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
++os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
++
++if __name__ == '__main__':
++ import build_utils
++ root, inp = sys.argv[1:3]
++ for sig in sys.argv[3:]:
++ name = re.sub ('X+', sig, root)
++ d = build_utils.standard_dict(name, sig, '${component}')
++ build_utils.expand_template(d, inp, '_impl')
++")
++
++ #make a list of all the generated files
++ unset(expanded_files_cc_impl)
++ unset(expanded_files_h_impl)
++ unset(expanded_files_h)
++ foreach(sig ${ARGN})
++ string(REGEX REPLACE "X+" ${sig} name ${root})
++ list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
++ list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
++ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h)
++ endforeach(sig)
++ unset(name)
++
++ #try to force generate the _impl.cc files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.cc.t ${ARGN}
++ )
++
++ #create a command to generate the _impl.cc files
++ add_custom_command(
++ OUTPUT ${expanded_files_cc_impl}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.cc.t ${ARGN}
++ )
++
++ #try to force generate the _impl.h files
++ execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.h.t ${ARGN}
++ )
++
++ #create a command to generate the _impl.h files
++ add_custom_command(
++ OUTPUT ${expanded_files_h_impl}
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
++ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
++ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
++ ${root} ${root}_impl.h.t ${ARGN}
++ )
++
++ #make _impl.cc source files depend on _impl.h to force generation
++ set_source_files_properties(${expanded_files_cc_impl}
++ PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
++ )
++
++ #make _impl.h source files depend on headers to force generation
++ set_source_files_properties(${expanded_files_h_impl}
++ PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
++ )
++
++ #install rules for the generated files
++ list(APPEND generated_sources ${expanded_files_cc_impl})
++ list(APPEND generated_headers ${expanded_files_h_impl})
++
++endmacro(GR_EXPAND_X_CC_H_IMPL)
+--- gr-analog/include/gnuradio/analog/CMakeLists.txt.orig
++++ gr-analog/include/gnuradio/analog/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-# Copyright 2012 Free Software Foundation, Inc.
++# Copyright 2012-2013 Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Radio
+ #
+@@ -18,55 +18,12 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'analog')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(noise_source_X s i f c)
+-expand_h(fastnoise_source_X s i f c)
+-expand_h(sig_source_X s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_H(analog noise_source_X s i f c)
++GR_EXPAND_X_H(analog fastnoise_source_X s i f c)
++GR_EXPAND_X_H(analog sig_source_X s i f c)
+
+ add_custom_target(analog_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-analog/lib/CMakeLists.txt.orig
++++ gr-analog/lib/CMakeLists.txt
+@@ -41,72 +41,12 @@ if(ENABLE_GR_CTRLPORT)
+ endif(ENABLE_GR_CTRLPORT)
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'analog')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_cc(noise_source_X_impl s i f c)
+-expand_cc(fastnoise_source_X_impl s i f c)
+-expand_cc(sig_source_X_impl s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(analog noise_source_X_impl s i f c)
++GR_EXPAND_X_CC_H(analog fastnoise_source_X_impl s i f c)
++GR_EXPAND_X_CC_H(analog sig_source_X_impl s i f c)
+
+ ########################################################################
+ # Setup library
+--- gr-blocks/include/gnuradio/blocks/CMakeLists.txt.orig
++++ gr-blocks/include/gnuradio/blocks/CMakeLists.txt
+@@ -18,79 +18,36 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict(name, sig, 'blocks')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_h(add_XX ss ii cc)
+-expand_h(add_const_XX bb ss ii ff cc)
+-expand_h(add_const_vXX bb ss ii ff cc)
+-expand_h(and_XX bb ss ii)
+-expand_h(and_const_XX bb ss ii)
+-expand_h(argmax_XX fs is ss)
+-expand_h(divide_XX ss ii ff cc)
+-expand_h(integrate_XX ss ii ff cc)
+-expand_h(max_XX ff ii ss)
+-expand_h(moving_average_XX ss ii ff cc)
+-expand_h(multiply_XX ss ii)
+-expand_h(multiply_const_XX ss ii)
+-expand_h(multiply_const_vXX ss ii ff cc)
+-expand_h(mute_XX ss ii ff cc)
+-expand_h(not_XX bb ss ii)
+-expand_h(or_XX bb ss ii)
+-expand_h(peak_detector_XX fb ib sb)
+-expand_h(probe_signal_X b s i f c)
+-expand_h(probe_signal_vX b s i f c)
+-expand_h(sample_and_hold_XX bb ss ii ff)
+-expand_h(sub_XX ss ii ff cc)
+-expand_h(xor_XX bb ss ii)
+-expand_h(packed_to_unpacked_XX bb ss ii)
+-expand_h(unpacked_to_packed_XX bb ss ii)
+-expand_h(vector_insert_X b s i f c)
+-expand_h(vector_sink_X b s i f c)
+-expand_h(vector_source_X b s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_H(blocks add_XX ss ii cc)
++GR_EXPAND_X_H(blocks add_const_XX bb ss ii ff cc)
++GR_EXPAND_X_H(blocks add_const_vXX bb ss ii ff cc)
++GR_EXPAND_X_H(blocks and_XX bb ss ii)
++GR_EXPAND_X_H(blocks and_const_XX bb ss ii)
++GR_EXPAND_X_H(blocks argmax_XX fs is ss)
++GR_EXPAND_X_H(blocks divide_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks integrate_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks max_XX ff ii ss)
++GR_EXPAND_X_H(blocks moving_average_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks multiply_XX ss ii)
++GR_EXPAND_X_H(blocks multiply_const_XX ss ii)
++GR_EXPAND_X_H(blocks multiply_const_vXX ss ii ff cc)
++GR_EXPAND_X_H(blocks mute_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks not_XX bb ss ii)
++GR_EXPAND_X_H(blocks or_XX bb ss ii)
++GR_EXPAND_X_H(blocks peak_detector_XX fb ib sb)
++GR_EXPAND_X_H(blocks probe_signal_X b s i f c)
++GR_EXPAND_X_H(blocks probe_signal_vX b s i f c)
++GR_EXPAND_X_H(blocks sample_and_hold_XX bb ss ii ff)
++GR_EXPAND_X_H(blocks sub_XX ss ii ff cc)
++GR_EXPAND_X_H(blocks xor_XX bb ss ii)
++GR_EXPAND_X_H(blocks packed_to_unpacked_XX bb ss ii)
++GR_EXPAND_X_H(blocks unpacked_to_packed_XX bb ss ii)
++GR_EXPAND_X_H(blocks vector_insert_X b s i f c)
++GR_EXPAND_X_H(blocks vector_sink_X b s i f c)
++GR_EXPAND_X_H(blocks vector_source_X b s i f c)
+
+ add_custom_target(blocks_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-blocks/lib/CMakeLists.txt.orig
++++ gr-blocks/lib/CMakeLists.txt
+@@ -23,100 +23,36 @@
+ include(${CMAKE_CURRENT_SOURCE_DIR}/ConfigChecks.cmake)
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict(name, sig, 'blocks')
+- build_utils.expand_template(d, inp, '_impl')
+-")
+-
+-macro(expand_cc_h_impl root)
+- #make a list of all the generated files
+- unset(expanded_files_cc_impl)
+- unset(expanded_files_h_impl)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
+- list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the _impl.cc files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc_impl}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}_impl.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the _impl.h files
+- add_custom_command(
+- OUTPUT ${expanded_files_h_impl}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}_impl.h.t ${ARGN}
+- )
+-
+- #make _impl.cc source files depend on headers to force generation
+- set_source_files_properties(${expanded_files_cc_impl}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
+- )
+-
+- #make _impl.h source files depend on headers to force generation
+- set_source_files_properties(${expanded_files_h_impl}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc_impl})
+-endmacro(expand_cc_h_impl)
+-
+-########################################################################
+ # Invoke macro to generate various sources
+ ########################################################################
+-expand_cc_h_impl(add_XX ss ii cc)
+-expand_cc_h_impl(add_const_XX bb ss ii ff cc)
+-expand_cc_h_impl(add_const_vXX bb ss ii ff cc)
+-expand_cc_h_impl(and_XX bb ss ii)
+-expand_cc_h_impl(and_const_XX bb ss ii)
+-expand_cc_h_impl(argmax_XX fs is ss)
+-expand_cc_h_impl(divide_XX ss ii ff cc)
+-expand_cc_h_impl(integrate_XX ss ii ff cc)
+-expand_cc_h_impl(max_XX ff ii ss)
+-expand_cc_h_impl(moving_average_XX ss ii ff cc)
+-expand_cc_h_impl(multiply_XX ss ii)
+-expand_cc_h_impl(multiply_const_XX ss ii)
+-expand_cc_h_impl(multiply_const_vXX ss ii ff cc)
+-expand_cc_h_impl(mute_XX ss ii ff cc)
+-expand_cc_h_impl(not_XX bb ss ii)
+-expand_cc_h_impl(or_XX bb ss ii)
+-expand_cc_h_impl(peak_detector_XX fb ib sb)
+-expand_cc_h_impl(probe_signal_X b s i f c)
+-expand_cc_h_impl(probe_signal_vX b s i f c)
+-expand_cc_h_impl(sample_and_hold_XX bb ss ii ff)
+-expand_cc_h_impl(sub_XX ss ii ff cc)
+-expand_cc_h_impl(xor_XX bb ss ii)
+-expand_cc_h_impl(packed_to_unpacked_XX bb ss ii)
+-expand_cc_h_impl(unpacked_to_packed_XX bb ss ii)
+-expand_cc_h_impl(vector_insert_X b s i f c)
+-expand_cc_h_impl(vector_sink_X b s i f c)
+-expand_cc_h_impl(vector_source_X b s i f c)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H_IMPL(blocks add_XX ss ii cc)
++GR_EXPAND_X_CC_H_IMPL(blocks add_const_XX bb ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks add_const_vXX bb ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks and_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks and_const_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks argmax_XX fs is ss)
++GR_EXPAND_X_CC_H_IMPL(blocks divide_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks integrate_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks max_XX ff ii ss)
++GR_EXPAND_X_CC_H_IMPL(blocks moving_average_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks multiply_XX ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_XX ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_vXX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks mute_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks not_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks or_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks peak_detector_XX fb ib sb)
++GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_X b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_vX b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks sample_and_hold_XX bb ss ii ff)
++GR_EXPAND_X_CC_H_IMPL(blocks sub_XX ss ii ff cc)
++GR_EXPAND_X_CC_H_IMPL(blocks xor_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks packed_to_unpacked_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks unpacked_to_packed_XX bb ss ii)
++GR_EXPAND_X_CC_H_IMPL(blocks vector_insert_X b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks vector_sink_X b s i f c)
++GR_EXPAND_X_CC_H_IMPL(blocks vector_source_X b s i f c)
+
+ ########################################################################
+ # Setup the include and linker paths
+--- gr-digital/include/gnuradio/digital/CMakeLists.txt.orig
++++ gr-digital/include/gnuradio/digital/CMakeLists.txt
+@@ -17,54 +17,12 @@
+ # the Free Software Foundation, Inc., 51 Franklin Street,
+ # Boston, MA 02110-1301, USA.
+
++#################################################################
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'digital')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(chunks_to_symbols_XX bf bc sf sc if ic)
++include(GrMiscUtils)
++GR_EXPAND_X_H(digital chunks_to_symbols_XX bf bc sf sc if ic)
+
+ add_custom_target(digital_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-digital/lib/CMakeLists.txt.orig
++++ gr-digital/lib/CMakeLists.txt
+@@ -42,70 +42,10 @@ if(ENABLE_GR_CTRLPORT)
+ endif(ENABLE_GR_CTRLPORT)
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'digital')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_cc(chunks_to_symbols_XX_impl bf bc sf sc if ic)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(digital chunks_to_symbols_XX_impl bf bc sf sc if ic)
+
+ ########################################################################
+ # Setup library
+@@ -198,7 +138,6 @@ list(APPEND digital_libs
+ ${LOG4CPP_LIBRARIES}
+ )
+
+-
+ add_library(gnuradio-digital SHARED ${digital_sources})
+ target_link_libraries(gnuradio-digital ${digital_libs})
+ GR_LIBRARY_FOO(gnuradio-digital RUNTIME_COMPONENT "digital_runtime" DEVEL_COMPONENT "digital_devel")
+--- gr-fec/include/gnuradio/fec/CMakeLists.txt.orig
++++ gr-fec/include/gnuradio/fec/CMakeLists.txt
+@@ -18,63 +18,9 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict(name, sig, 'fec')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-#expand_h(foo_XX ss ii cc)
+-
+-add_custom_target(fec_generated_includes DEPENDS
+- ${generated_includes}
+-)
+-
+-########################################################################
+ # Install header files
+ ########################################################################
+ install(FILES
+- ${generated_includes}
+ api.h
+ decode_ccsds_27_fb.h
+ encode_ccsds_27_bb.h
+--- gr-filter/include/gnuradio/filter/CMakeLists.txt.orig
++++ gr-filter/include/gnuradio/filter/CMakeLists.txt
+@@ -18,56 +18,13 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'filter')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(fir_filter_XXX ccc ccf fcc fff fsf scc)
+-expand_h(freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
+-expand_h(interp_fir_filter_XXX ccc ccf fcc fff fsf scc)
+-expand_h(rational_resampler_base_XXX ccc ccf fcc fff fsf scc)
++include(GrMiscUtils)
++GR_EXPAND_X_H(filter fir_filter_XXX ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_H(filter freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
++GR_EXPAND_X_H(filter interp_fir_filter_XXX ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_H(filter rational_resampler_base_XXX ccc ccf fcc fff fsf scc)
+
+ add_custom_target(filter_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-filter/lib/CMakeLists.txt.orig
++++ gr-filter/lib/CMakeLists.txt
+@@ -18,73 +18,13 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'filter')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-########################################################################
+-# Invoke macro to generate various sources
+-########################################################################
+-expand_cc(fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
+-expand_cc(freq_xlating_fir_filter_XXX_impl ccc ccf fcc fcf scf scc)
+-expand_cc(interp_fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
+-expand_cc(rational_resampler_base_XXX_impl ccc ccf fcc fff fsf scc)
+-
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(filter fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_CC_H(filter freq_xlating_fir_filter_XXX_impl ccc ccf fcc fcf scf scc)
++GR_EXPAND_X_CC_H(filter interp_fir_filter_XXX_impl ccc ccf fcc fff fsf scc)
++GR_EXPAND_X_CC_H(filter rational_resampler_base_XXX_impl ccc ccf fcc fff fsf scc)
+
+ ########################################################################
+ # Setup the include and linker paths
+--- gr-trellis/include/gnuradio/trellis/CMakeLists.txt.orig
++++ gr-trellis/include/gnuradio/trellis/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-# Copyright 2012 Free Software Foundation, Inc.
++# Copyright 2012-2013 Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Radio
+ #
+@@ -18,62 +18,19 @@
+ # Boston, MA 02110-1301, USA.
+
+ ########################################################################
+-# generate helper scripts to expand templated files
+-########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_dict2(name, sig, 'trellis')
+- build_utils.expand_template(d, inp)
+-
+-")
+-
+-macro(expand_h root)
+- #make a list of all the generated files
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the files
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #install rules for the generated h files
+- list(APPEND generated_includes ${expanded_files_h})
+-endmacro(expand_h)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various headers
+ #######################################################################
+-expand_h(encoder_XX bb bs bi ss si ii)
+-expand_h(sccc_encoder_XX bb bs bi ss si ii)
+-expand_h(pccc_encoder_XX bb bs bi ss si ii)
+-expand_h(metrics_X s i f c)
+-expand_h(viterbi_X b s i)
+-expand_h(viterbi_combined_XX sb ss si ib is ii fb fs fi cb cs ci)
+-expand_h(sccc_decoder_X b s i)
+-expand_h(sccc_decoder_combined_XX fb fs fi cb cs ci)
+-expand_h(pccc_decoder_X b s i)
+-expand_h(pccc_decoder_combined_XX fb fs fi cb cs ci)
++include(GrMiscUtils)
++GR_EXPAND_X_H(trellis encoder_XX bb bs bi ss si ii)
++GR_EXPAND_X_H(trellis sccc_encoder_XX bb bs bi ss si ii)
++GR_EXPAND_X_H(trellis pccc_encoder_XX bb bs bi ss si ii)
++GR_EXPAND_X_H(trellis metrics_X s i f c)
++GR_EXPAND_X_H(trellis viterbi_X b s i)
++GR_EXPAND_X_H(trellis viterbi_combined_XX sb ss si ib is ii fb fs fi cb cs ci)
++GR_EXPAND_X_H(trellis sccc_decoder_X b s i)
++GR_EXPAND_X_H(trellis sccc_decoder_combined_XX fb fs fi cb cs ci)
++GR_EXPAND_X_H(trellis pccc_decoder_X b s i)
++GR_EXPAND_X_H(trellis pccc_decoder_combined_XX fb fs fi cb cs ci)
+
+ add_custom_target(trellis_generated_includes DEPENDS
+ ${generated_includes}
+--- gr-trellis/lib/CMakeLists.txt.orig
++++ gr-trellis/lib/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-# Copyright 2012 Free Software Foundation, Inc.
++# Copyright 2012-2013 Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Radio
+ #
+@@ -37,79 +37,20 @@ if(ENABLE_GR_CTRLPORT)
+ include_directories(${ICE_INCLUDE_DIR})
+ endif(ENABLE_GR_CTRLPORT)
+
+-#######################################################################
+-# generate the python helper script which calls into the build utils
+ ########################################################################
+-include(GrPython)
+-
+-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+-#!${PYTHON_EXECUTABLE}
+-
+-import sys, os, re
+-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+-
+-if __name__ == '__main__':
+- import build_utils
+- root, inp = sys.argv[1:3]
+- for sig in sys.argv[3:]:
+- name = re.sub ('X+', sig, root)
+- d = build_utils.standard_impl_dict2(name, sig, 'trellis')
+- build_utils.expand_template(d, inp)
+-")
+-
+-macro(expand_cc root)
+- #make a list of all the generated files
+- unset(expanded_files_cc)
+- unset(expanded_files_h)
+- foreach(sig ${ARGN})
+- string(REGEX REPLACE "X+" ${sig} name ${root})
+- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+- endforeach(sig)
+-
+- #create a command to generate the source files
+- add_custom_command(
+- OUTPUT ${expanded_files_cc}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.cc.t ${ARGN}
+- )
+-
+- #create a command to generate the header file
+- add_custom_command(
+- OUTPUT ${expanded_files_h}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+- ${root} ${root}.h.t ${ARGN}
+- )
+-
+- #make source files depends on headers to force generation
+- set_source_files_properties(${expanded_files_cc}
+- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+- )
+-
+- #install rules for the generated cc files
+- list(APPEND generated_sources ${expanded_files_cc})
+- list(APPEND generated_headers ${expanded_files_h})
+-endmacro(expand_cc)
+-
+-########################################################################
+-# Invoke macro to generate various sources
++# Invoke macro to generate various sources and headers
+ ########################################################################
+-expand_cc(encoder_XX_impl bb bs bi ss si ii)
+-expand_cc(sccc_encoder_XX_impl bb bs bi ss si ii)
+-expand_cc(pccc_encoder_XX_impl bb bs bi ss si ii)
+-expand_cc(metrics_X_impl s i f c)
+-expand_cc(viterbi_X_impl b s i)
+-expand_cc(viterbi_combined_XX_impl sb ss si ib is ii fb fs fi cb cs ci)
+-expand_cc(sccc_decoder_X_impl b s i)
+-expand_cc(sccc_decoder_combined_XX_impl fb fs fi cb cs ci)
+-expand_cc(pccc_decoder_X_impl b s i)
+-expand_cc(pccc_decoder_combined_XX_impl fb fs fi cb cs ci)
++include(GrMiscUtils)
++GR_EXPAND_X_CC_H(trellis encoder_XX_impl bb bs bi ss si ii)
++GR_EXPAND_X_CC_H(trellis sccc_encoder_XX_impl bb bs bi ss si ii)
++GR_EXPAND_X_CC_H(trellis pccc_encoder_XX_impl bb bs bi ss si ii)
++GR_EXPAND_X_CC_H(trellis metrics_X_impl s i f c)
++GR_EXPAND_X_CC_H(trellis viterbi_X_impl b s i)
++GR_EXPAND_X_CC_H(trellis viterbi_combined_XX_impl sb ss si ib is ii fb fs fi cb cs ci)
++GR_EXPAND_X_CC_H(trellis sccc_decoder_X_impl b s i)
++GR_EXPAND_X_CC_H(trellis sccc_decoder_combined_XX_impl fb fs fi cb cs ci)
++GR_EXPAND_X_CC_H(trellis pccc_decoder_X_impl b s i)
++GR_EXPAND_X_CC_H(trellis pccc_decoder_combined_XX_impl fb fs fi cb cs ci)
+
+ ########################################################################
+ # Setup library
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140218/b9838d1f/attachment-0001.html>
More information about the macports-changes
mailing list