summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
authorTom Rondeau2010-12-13 12:21:35 -0500
committerTom Rondeau2010-12-13 12:21:35 -0500
commit1047775464c1bb8a86e727487551e2b14abd476e (patch)
treef249a5eb1825c3af3895b2ce34c498a49ccd6f95 /gr-uhd
parenta151e3e1ba2409b44fd2af8ba1f9bfbf3f0dbf25 (diff)
downloadgnuradio-1047775464c1bb8a86e727487551e2b14abd476e.tar.gz
gnuradio-1047775464c1bb8a86e727487551e2b14abd476e.tar.bz2
gnuradio-1047775464c1bb8a86e727487551e2b14abd476e.zip
gr_uhd: Quick fix for make distcheck failures if UHD is not installed.
Diffstat (limited to 'gr-uhd')
-rw-r--r--gr-uhd/swig/Makefile.swig.gen10
-rw-r--r--gr-uhd/swig/uhd_swig.i7
2 files changed, 16 insertions, 1 deletions
diff --git a/gr-uhd/swig/Makefile.swig.gen b/gr-uhd/swig/Makefile.swig.gen
index 3804461a4..f764332f2 100644
--- a/gr-uhd/swig/Makefile.swig.gen
+++ b/gr-uhd/swig/Makefile.swig.gen
@@ -200,7 +200,15 @@ $(DEPDIR)/uhd_swig-generate-stamp:
## Call SWIG to generate the various output files; special
## post-processing on 'mingw32' host OS for the dependency file.
##
- if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(uhd_swig_swig_args) \
+
+## If UHD was installed, defined GR_HAVE_UHD for swigging headers
+if GR_DEFINE_HAVE_UHD
+ MY_SWIG_PYTHON_ARGS = $(STD_SWIG_PYTHON_ARGS) -DGR_HAVE_UHD
+else
+ MY_SWIG_PYTHON_ARGS = $(STD_SWIG_PYTHON_ARGS)
+endif
+
+ if $(SWIG) $(MY_SWIG_PYTHON_ARGS) $(uhd_swig_swig_args) \
-MD -MF $(DEPDIR)/uhd_swig.Std \
-module uhd_swig -o uhd_swig.cc $(WHAT); then \
if test $(host_os) = mingw32; then \
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index 695cf1cd2..4acf2dc83 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -20,6 +20,10 @@
* Boston, MA 02110-1301, USA.
*/
+// Defined during configure; avoids trying to locate
+// header files if UHD was not installed.
+#ifdef GR_HAVE_UHD
+
////////////////////////////////////////////////////////////////////////
// Language independent exception handler
////////////////////////////////////////////////////////////////////////
@@ -104,3 +108,6 @@ GR_SWIG_BLOCK_MAGIC(uhd,single_usrp_sink)
static const size_t ALL_MBOARDS = uhd::usrp::multi_usrp::ALL_MBOARDS;
%}
static const size_t ALL_MBOARDS;
+
+#endif
+