From 5d69a524f81f234b3fbc41d49ba18d6f6886baba Mon Sep 17 00:00:00 2001 From: jcorgan Date: Thu, 3 Aug 2006 04:51:51 +0000 Subject: Houston, we have a trunk. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3122 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 91 +++++++++++++++ gr-comedi/src/comedi.i | 76 +++++++++++++ gr-comedi/src/comedi_sink_s.cc | 233 +++++++++++++++++++++++++++++++++++++++ gr-comedi/src/comedi_sink_s.h | 89 +++++++++++++++ gr-comedi/src/comedi_source_s.cc | 229 ++++++++++++++++++++++++++++++++++++++ gr-comedi/src/comedi_source_s.h | 90 +++++++++++++++ gr-comedi/src/gri_comedi.cc | 30 +++++ gr-comedi/src/gri_comedi.h | 28 +++++ gr-comedi/src/qa_comedi.py | 40 +++++++ gr-comedi/src/run_tests.in | 47 ++++++++ 10 files changed, 953 insertions(+) create mode 100644 gr-comedi/src/Makefile.am create mode 100644 gr-comedi/src/comedi.i create mode 100644 gr-comedi/src/comedi_sink_s.cc create mode 100644 gr-comedi/src/comedi_sink_s.h create mode 100644 gr-comedi/src/comedi_source_s.cc create mode 100644 gr-comedi/src/comedi_source_s.h create mode 100644 gr-comedi/src/gri_comedi.cc create mode 100644 gr-comedi/src/gri_comedi.h create mode 100755 gr-comedi/src/qa_comedi.py create mode 100644 gr-comedi/src/run_tests.in (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am new file mode 100644 index 000000000..3311cd569 --- /dev/null +++ b/gr-comedi/src/Makefile.am @@ -0,0 +1,91 @@ +# +# Copyright 2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +include $(top_srcdir)/Makefile.common + +# Install this stuff so that it ends up as the gnuradio.comedi module +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio + +ourpythondir = $(grpythondir) +ourlibdir = $(grpyexecdir) + +EXTRA_DIST = run_tests.in + +TESTS = run_tests + +LOCAL_IFILES = \ + comedi.i + +NON_LOCAL_IFILES = \ + $(top_srcdir)/gnuradio-core/src/lib/swig/gnuradio.i + +ALL_IFILES = \ + $(LOCAL_IFILES) \ + $(NON_LOCAL_IFILES) + +BUILT_SOURCES = \ + comedi.cc \ + comedi.py + +ourpython_PYTHON = \ + comedi.py + +INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) + +SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES) +# -I$(swigincludedir) $(S-I$(grincludedir) -I$(comediincludedir) + +ourlib_LTLIBRARIES = _comedi.la + +_comedi_la_SOURCES = \ + comedi.cc \ + comedi_sink_s.cc \ + comedi_source_s.cc \ + gri_comedi.cc + +grinclude_HEADERS = \ + comedi_sink_s.h \ + comedi_source_s.h + +noinst_HEADERS = \ + gri_comedi.h + + +swiginclude_HEADERS = \ + $(LOCAL_IFILES) + +_comedi_la_LIBADD = \ + $(PYTHON_LDFLAGS) \ + $(GNURADIO_CORE_LIBS) \ + -lstdc++ + +_comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version + +comedi.cc comedi.py: comedi.i + $(SWIG) $(SWIGCPPPYTHONARGS) -module comedi -o comedi.cc $< + + +noinst_PYTHON = \ + qa_comedi.py + +MOSTLYCLEANFILES = \ + $(BUILT_SOURCES) *~ *.pyc diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i new file mode 100644 index 000000000..18f4f441f --- /dev/null +++ b/gr-comedi/src/comedi.i @@ -0,0 +1,76 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +%feature("autodoc","1"); + +%include "exception.i" +%import "gnuradio.i" // the common stuff + +%{ +#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix +#include "comedi_sink_s.h" +#include "comedi_source_s.h" +#include +%} + +// ---------------------------------------------------------------- + +GR_SWIG_BLOCK_MAGIC(comedi,source_s) + +comedi_source_s_sptr +comedi_make_source_s (int sampling_freq, + const std::string dev = "" + ) throw (std::runtime_error); + +class comedi_source_s : public gr_sync_block { + + protected: + comedi_source_s (int sampling_freq, + const std::string device_name + ) throw (std::runtime_error); + + public: + ~comedi_source_s (); + + bool start(); + bool stop(); +}; + +// ---------------------------------------------------------------- + +GR_SWIG_BLOCK_MAGIC(comedi,sink_s) + +comedi_sink_s_sptr +comedi_make_sink_s (int sampling_freq, + const std::string dev = "" + ) throw (std::runtime_error); + +class comedi_sink_s : public gr_sync_block { + + protected: + comedi_sink_s (int sampling_freq, + const std::string device_name + ) throw (std::runtime_error); + + public: + ~comedi_sink_s (); +}; diff --git a/gr-comedi/src/comedi_sink_s.cc b/gr-comedi/src/comedi_sink_s.cc new file mode 100644 index 000000000..2c1ffb7de --- /dev/null +++ b/gr-comedi/src/comedi_sink_s.cc @@ -0,0 +1,233 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + + +/* + * comedi_sink_s is untested because I don't own appropriate hardware. + * Feedback is welcome! --SF + */ + +static std::string +default_device_name () +{ + return "/dev/comedi0"; +} + + +// ---------------------------------------------------------------- + +comedi_sink_s_sptr +comedi_make_sink_s (int sampling_freq, const std::string dev) +{ + return comedi_sink_s_sptr (new comedi_sink_s (sampling_freq, dev)); +} + +comedi_sink_s::comedi_sink_s (int sampling_freq, + const std::string device_name) + : gr_sync_block ("comedi_sink_s", + gr_make_io_signature (0, 0, 0), + gr_make_io_signature (0, 0, 0)), + d_sampling_freq (sampling_freq), + d_device_name (device_name.empty() ? default_device_name() : device_name), + d_dev (0), + d_subdevice (COMEDI_SUBD_AO), + d_n_chan (1), // number of input channels + d_map (0), + d_buffer_size (0), + d_buf_front (0), + d_buf_back (0) +{ + int aref=AREF_GROUND; + int range=0; + + d_dev = comedi_open(d_device_name.c_str()); + if (d_dev == 0){ + comedi_perror(d_device_name.c_str()); + throw std::runtime_error ("comedi_sink_s"); + } + + unsigned int chanlist[256]; + + for(int i=0; i d_n_chan) + throw std::runtime_error ("comedi_sink_s"); + + return true; +} + +comedi_sink_s::~comedi_sink_s () +{ + if (d_map) { + munmap(d_map, d_buffer_size); + d_map = 0; + } + + comedi_close(d_dev); +} + +int +comedi_sink_s::work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + int ret; + + int work_left = noutput_items * sizeof(sampl_t) * d_n_chan; + sampl_t *pbuf = (sampl_t*)d_map; + + do { + + do { + ret = comedi_get_buffer_contents(d_dev,d_subdevice); + if (ret < 0) + bail ("comedi_get_buffer_contents", comedi_errno()); + + assert(ret % sizeof(sampl_t) == 0); + assert(work_left % sizeof(sampl_t) == 0); + + ret = std::min(ret, work_left); + d_buf_front += ret; + + assert(d_buffer_size%d_n_chan == 0); + if (d_buf_front-d_buf_back > (unsigned)d_buffer_size) { + d_buf_front+=d_buffer_size; + d_buf_back +=d_buffer_size; + } + + if(d_buf_front==d_buf_back){ + usleep(1000000*std::min(work_left,d_buffer_size/2)/(d_sampling_freq*sizeof(sampl_t)*d_n_chan)); + continue; + } + } while (d_buf_front==d_buf_back); + + for(unsigned i=d_buf_back/sizeof(sampl_t);i0); + + return noutput_items; +} + + +void +comedi_sink_s::output_error_msg (const char *msg, int err) +{ + fprintf (stderr, "comedi_sink_s[%s]: %s: %s\n", + d_device_name.c_str(), msg, comedi_strerror(err)); +} + +void +comedi_sink_s::bail (const char *msg, int err) throw (std::runtime_error) +{ + output_error_msg (msg, err); + throw std::runtime_error ("comedi_sink_s"); +} diff --git a/gr-comedi/src/comedi_sink_s.h b/gr-comedi/src/comedi_sink_s.h new file mode 100644 index 000000000..08fce2515 --- /dev/null +++ b/gr-comedi/src/comedi_sink_s.h @@ -0,0 +1,89 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef INCLUDED_COMEDI_SINK_H +#define INCLUDED_COMEDI_SINK_H + +#include +#include +#include +#include + +class comedi_sink_s; +typedef boost::shared_ptr comedi_sink_s_sptr; + +/*! + * \brief make an COMEDI sink. + * + * \param sampling_freq sampling rate in Hz + * \param dev COMEDI device name, e.g., "/dev/comedi0" + */ +comedi_sink_s_sptr +comedi_make_sink_s (int sampling_freq, + const std::string dev = "/dev/comedi0"); + +/*! + * \brief sink using COMEDI + * + * The sink has one input stream of signed short integers. + * + * Input samples must be in the range [-32768,32767]. + */ +class comedi_sink_s : public gr_sync_block { + friend comedi_sink_s_sptr + comedi_make_sink_s (int sampling_freq, const std::string device_name); + + // typedef for pointer to class work method + typedef int (comedi_sink_s::*work_t)(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + + unsigned int d_sampling_freq; + std::string d_device_name; + + comedi_t *d_dev; + int d_subdevice; + int d_n_chan; + void *d_map; + int d_buffer_size; + unsigned d_buf_front; + unsigned d_buf_back; + + // random stats + int d_nunderuns; // count of underruns + + void output_error_msg (const char *msg, int err); + void bail (const char *msg, int err) throw (std::runtime_error); + + protected: + comedi_sink_s (int sampling_freq, const std::string device_name); + + public: + ~comedi_sink_s (); + + bool check_topology (int ninputs, int noutputs); + + int work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif /* INCLUDED_COMEDI_SINK_H */ diff --git a/gr-comedi/src/comedi_source_s.cc b/gr-comedi/src/comedi_source_s.cc new file mode 100644 index 000000000..5041c9c30 --- /dev/null +++ b/gr-comedi/src/comedi_source_s.cc @@ -0,0 +1,229 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + + +// FIXME these should query some kind of user preference + + +static std::string +default_device_name () +{ + return "/dev/comedi0"; +} + +// ---------------------------------------------------------------- + +comedi_source_s_sptr +comedi_make_source_s (int sampling_freq, const std::string dev) +{ + return comedi_source_s_sptr (new comedi_source_s (sampling_freq, dev)); +} + +comedi_source_s::comedi_source_s (int sampling_freq, + const std::string device_name) + : gr_sync_block ("comedi_source_s", + gr_make_io_signature (0, 0, 0), + gr_make_io_signature (0, 0, 0)), + d_sampling_freq (sampling_freq), + d_device_name (device_name.empty() ? default_device_name() : device_name), + d_dev (0), + d_subdevice (0/*COMEDI_SUBD_AI*/), + d_n_chan (1), // number of input channels + d_map (0), + d_buffer_size (0), + d_buf_front (0), + d_buf_back (0) +{ + int aref=AREF_GROUND; + int range=0; + + d_dev = comedi_open(d_device_name.c_str()); + if (d_dev == 0){ + comedi_perror(d_device_name.c_str()); + throw std::runtime_error ("comedi_source_s"); + } + + unsigned int chanlist[256]; + + for(int i=0; i d_n_chan) + throw std::runtime_error ("comedi_source_s"); + + return true; +} + +comedi_source_s::~comedi_source_s () +{ + if (d_map) { + munmap(d_map, d_buffer_size); + d_map = 0; + } + + comedi_close(d_dev); +} + +int +comedi_source_s::work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + int ret; + + int work_left = noutput_items * sizeof(sampl_t) * d_n_chan; + sampl_t *pbuf = (sampl_t*)d_map; + + do { + + do { + ret = comedi_get_buffer_contents(d_dev,d_subdevice); + if (ret < 0) + bail ("comedi_get_buffer_contents", comedi_errno()); + + assert(ret % sizeof(sampl_t) == 0); + assert(work_left % sizeof(sampl_t) == 0); + + ret = std::min(ret, work_left); + d_buf_front += ret; + + assert(d_buffer_size%d_n_chan == 0); + if (d_buf_front-d_buf_back > (unsigned)d_buffer_size) { + d_buf_front+=d_buffer_size; + d_buf_back +=d_buffer_size; + } + + if(d_buf_front==d_buf_back){ + usleep(1000000*std::min(work_left,d_buffer_size/2)/(d_sampling_freq*sizeof(sampl_t)*d_n_chan)); + continue; + } + } while (d_buf_front==d_buf_back); + + for(unsigned i=d_buf_back/sizeof(sampl_t);i0); + + return noutput_items; +} + +void +comedi_source_s::output_error_msg (const char *msg, int err) +{ + fprintf (stderr, "comedi_source_s[%s]: %s: %s\n", + d_device_name.c_str(), msg, comedi_strerror(err)); +} + +void +comedi_source_s::bail (const char *msg, int err) throw (std::runtime_error) +{ + output_error_msg (msg, err); + throw std::runtime_error ("comedi_source_s"); +} diff --git a/gr-comedi/src/comedi_source_s.h b/gr-comedi/src/comedi_source_s.h new file mode 100644 index 000000000..e759c43a3 --- /dev/null +++ b/gr-comedi/src/comedi_source_s.h @@ -0,0 +1,90 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef INCLUDED_COMEDI_SOURCE_S_H +#define INCLUDED_COMEDI_SOURCE_S_H + +#include +#include +#include +#include + +class comedi_source_s; +typedef boost::shared_ptr comedi_source_s_sptr; + +/*! + * \brief make a COMEDI source. + * + * \param sampling_freq sampling rate in Hz + * \param dev COMEDI device name, e.g., "/dev/comedi0" + */ +comedi_source_s_sptr +comedi_make_source_s (int sampling_freq, + const std::string dev = "/dev/comedi0"); + +/*! + * \brief source using COMEDI + * + * The source has one to many input stream of signed short integers. + * + * Output samples will be in the range [-32768,32767]. + */ +class comedi_source_s : public gr_sync_block { + friend comedi_source_s_sptr + comedi_make_source_s (int sampling_freq, const std::string device_name); + + // typedef for pointer to class work method + typedef int (comedi_source_s::*work_t)(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + + unsigned int d_sampling_freq; + std::string d_device_name; + + comedi_t *d_dev; + int d_subdevice; + int d_n_chan; + void *d_map; + int d_buffer_size; + unsigned d_buf_front; + unsigned d_buf_back; + + // random stats + int d_noverruns; // count of overruns + + void output_error_msg (const char *msg, int err); + void bail (const char *msg, int err) throw (std::runtime_error); + + + protected: + comedi_source_s (int sampling_freq, const std::string device_name); + + public: + ~comedi_source_s (); + + bool check_topology (int ninputs, int noutputs); + + int work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif /* INCLUDED_COMEDI_SOURCE_S_H */ diff --git a/gr-comedi/src/gri_comedi.cc b/gr-comedi/src/gri_comedi.cc new file mode 100644 index 000000000..e45626293 --- /dev/null +++ b/gr-comedi/src/gri_comedi.cc @@ -0,0 +1,30 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + + diff --git a/gr-comedi/src/gri_comedi.h b/gr-comedi/src/gri_comedi.h new file mode 100644 index 000000000..5e1f00e93 --- /dev/null +++ b/gr-comedi/src/gri_comedi.h @@ -0,0 +1,28 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef INCLUDED_GRI_COMEDI_H +#define INCLUDED_GRI_COMEDI_H + +#include + +#endif /* INCLUDED_GRI_COMEDI_H */ diff --git a/gr-comedi/src/qa_comedi.py b/gr-comedi/src/qa_comedi.py new file mode 100755 index 000000000..98b2f9189 --- /dev/null +++ b/gr-comedi/src/qa_comedi.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# +# Copyright 2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +from gnuradio import gr, gr_unittest +import comedi + +class qa_comedi (gr_unittest.TestCase): + + def setUp (self): + self.fg = gr.flow_graph () + + def tearDown (self): + self.fg = None + + def test_000_nop (self): + """Just see if we can import the module... + They may not have COMEDI library, etc. Don't try to run anything""" + pass + +if __name__ == '__main__': + gr_unittest.main () diff --git a/gr-comedi/src/run_tests.in b/gr-comedi/src/run_tests.in new file mode 100644 index 000000000..6c0ba9d18 --- /dev/null +++ b/gr-comedi/src/run_tests.in @@ -0,0 +1,47 @@ +#!/bin/sh + +# All this strange PYTHONPATH manipulation is required to run our +# tests using our just built shared library and swig-generated python +# code prior to installation. + +# build tree == src tree unless you're doing a VPATH build. +# If you don't know what a VPATH build is, you're not doing one. Relax... + +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +# Where to look in the build tree for our shared library +libbld=@abs_top_builddir@/gr-comedi/src +# Where to look in the src tree for swig generated python code +libsrc=@abs_top_srcdir@/gr-comedi/src +# Where to look in the src tree for hand written python code +py=@abs_top_srcdir@/gr-comedi/src + +# Where to look for GNU Radio python modules in current build tree +# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core +# where it put its python files. +grpythonbld=@abs_top_builddir@/gnuradio-core/src/python/:@abs_top_builddir@/gnuradio-core/src/lib/swig/:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs + +PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" +export PYTHONPATH + +# +# This is the simple part... +# Run everything that matches qa_*.py and return the final result. +# + +ok=yes +for file in @srcdir@/qa_*.py +do + if ! $file + then + ok=no + fi +done + +if [ $ok = yes ] +then + exit 0 +else + exit 1 +fi -- cgit From e27ba9aebfddf88cd245636d2f652a4ee4e289ec Mon Sep 17 00:00:00 2001 From: jcorgan Date: Mon, 7 Aug 2006 15:41:19 +0000 Subject: Fixes for ticket:10, ticket:18, and ticket:19. Merged r3194:3215 from /gnuradio/branches/developers/jcorgan/ticket-10. 'make distcheck' now successfully completes on a machine that has never had gnuradio installed before. In addition, several cleanups and refactoring of build system code have been applied. NOTE: gr-audio-portaudio, gr-audio-osx, and gr-audio-windows have not been fully tested and will need verification by the maintainers of these components. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3216 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 3 ++- gr-comedi/src/run_tests.in | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 3311cd569..b14a7361d 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -36,7 +36,7 @@ LOCAL_IFILES = \ comedi.i NON_LOCAL_IFILES = \ - $(top_srcdir)/gnuradio-core/src/lib/swig/gnuradio.i + $(GNURADIO_I) ALL_IFILES = \ $(LOCAL_IFILES) \ @@ -76,6 +76,7 @@ swiginclude_HEADERS = \ _comedi_la_LIBADD = \ $(PYTHON_LDFLAGS) \ $(GNURADIO_CORE_LIBS) \ + $(COMEDI_LIBS) \ -lstdc++ _comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version diff --git a/gr-comedi/src/run_tests.in b/gr-comedi/src/run_tests.in index 6c0ba9d18..facf62add 100644 --- a/gr-comedi/src/run_tests.in +++ b/gr-comedi/src/run_tests.in @@ -20,7 +20,9 @@ py=@abs_top_srcdir@/gr-comedi/src # Where to look for GNU Radio python modules in current build tree # FIXME this is wrong on a distcheck. We really need to ask gnuradio-core # where it put its python files. -grpythonbld=@abs_top_builddir@/gnuradio-core/src/python/:@abs_top_builddir@/gnuradio-core/src/lib/swig/:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs +grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python +grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig +grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" export PYTHONPATH -- cgit From 0741656006d3d480b3e58d42916649a82e8f766a Mon Sep 17 00:00:00 2001 From: jcorgan Date: Wed, 16 Aug 2006 03:29:20 +0000 Subject: More fixes for ticket:35, which was reopened. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3291 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index b14a7361d..b33a95728 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -33,7 +33,7 @@ EXTRA_DIST = run_tests.in TESTS = run_tests LOCAL_IFILES = \ - comedi.i + $(top_srcdir)/gr-comedi/src/comedi.i NON_LOCAL_IFILES = \ $(GNURADIO_I) @@ -81,8 +81,8 @@ _comedi_la_LIBADD = \ _comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version -comedi.cc comedi.py: comedi.i - $(SWIG) $(SWIGCPPPYTHONARGS) -module comedi -o comedi.cc $< +comedi.cc comedi.py: $(LOCAL_IFILES) + $(SWIG) $(SWIGCPPPYTHONARGS) -module comedi -o comedi.cc $(LOCAL_IFILES) noinst_PYTHON = \ -- cgit From 6b5a0200e260382d61e31dbf016719644163f73b Mon Sep 17 00:00:00 2001 From: jcorgan Date: Sun, 27 Aug 2006 18:51:43 +0000 Subject: Implements ticket:3 and fixes ticket:42. The common functionality of run_tests.in for Python QA has been extracted into run_tests.sh in the top-level and the individual run_tests just invoke that with the right path parameters. Also fixed Cygwin 'make check' bug by adding fix by Don Ward. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3440 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/run_tests.in | 55 +++++++--------------------------------------- 1 file changed, 8 insertions(+), 47 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/run_tests.in b/gr-comedi/src/run_tests.in index facf62add..84fefbaca 100644 --- a/gr-comedi/src/run_tests.in +++ b/gr-comedi/src/run_tests.in @@ -1,49 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-comedi/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-comedi/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-comedi/src - -# Where to look for GNU Radio python modules in current build tree -# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core -# where it put its python files. -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-comedi \ + @abs_top_builddir@/gr-comedi \ + @srcdir@ -- cgit From 86f5c92427b3f4bb30536d76cf63c3fca388fb2f Mon Sep 17 00:00:00 2001 From: eb Date: Wed, 13 Sep 2006 21:30:04 +0000 Subject: Updated FSF address in all files. Fixes ticket:51 git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3534 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 4 ++-- gr-comedi/src/comedi.i | 4 ++-- gr-comedi/src/comedi_sink_s.cc | 4 ++-- gr-comedi/src/comedi_sink_s.h | 4 ++-- gr-comedi/src/comedi_source_s.cc | 4 ++-- gr-comedi/src/comedi_source_s.h | 4 ++-- gr-comedi/src/gri_comedi.cc | 4 ++-- gr-comedi/src/gri_comedi.h | 4 ++-- gr-comedi/src/qa_comedi.py | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index b33a95728..2560e8989 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -15,8 +15,8 @@ # # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. # include $(top_srcdir)/Makefile.common diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index 18f4f441f..90e886262 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. */ %feature("autodoc","1"); diff --git a/gr-comedi/src/comedi_sink_s.cc b/gr-comedi/src/comedi_sink_s.cc index 2c1ffb7de..68514a54b 100644 --- a/gr-comedi/src/comedi_sink_s.cc +++ b/gr-comedi/src/comedi_sink_s.cc @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff --git a/gr-comedi/src/comedi_sink_s.h b/gr-comedi/src/comedi_sink_s.h index 08fce2515..779dd9e87 100644 --- a/gr-comedi/src/comedi_sink_s.h +++ b/gr-comedi/src/comedi_sink_s.h @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. */ #ifndef INCLUDED_COMEDI_SINK_H #define INCLUDED_COMEDI_SINK_H diff --git a/gr-comedi/src/comedi_source_s.cc b/gr-comedi/src/comedi_source_s.cc index 5041c9c30..f41f8ca39 100644 --- a/gr-comedi/src/comedi_source_s.cc +++ b/gr-comedi/src/comedi_source_s.cc @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff --git a/gr-comedi/src/comedi_source_s.h b/gr-comedi/src/comedi_source_s.h index e759c43a3..c0f98e2fa 100644 --- a/gr-comedi/src/comedi_source_s.h +++ b/gr-comedi/src/comedi_source_s.h @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. */ #ifndef INCLUDED_COMEDI_SOURCE_S_H #define INCLUDED_COMEDI_SOURCE_S_H diff --git a/gr-comedi/src/gri_comedi.cc b/gr-comedi/src/gri_comedi.cc index e45626293..b9627dc89 100644 --- a/gr-comedi/src/gri_comedi.cc +++ b/gr-comedi/src/gri_comedi.cc @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff --git a/gr-comedi/src/gri_comedi.h b/gr-comedi/src/gri_comedi.h index 5e1f00e93..379b38190 100644 --- a/gr-comedi/src/gri_comedi.h +++ b/gr-comedi/src/gri_comedi.h @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. */ #ifndef INCLUDED_GRI_COMEDI_H diff --git a/gr-comedi/src/qa_comedi.py b/gr-comedi/src/qa_comedi.py index 98b2f9189..bc63c6c37 100755 --- a/gr-comedi/src/qa_comedi.py +++ b/gr-comedi/src/qa_comedi.py @@ -16,8 +16,8 @@ # # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. # from gnuradio import gr, gr_unittest -- cgit From eceb00eba3d3076e6de1118844df45473b095a35 Mon Sep 17 00:00:00 2001 From: jcorgan Date: Thu, 28 Sep 2006 06:28:26 +0000 Subject: Fixes ticket:76. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3678 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 2560e8989..b0a537ced 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -88,5 +88,11 @@ comedi.cc comedi.py: $(LOCAL_IFILES) noinst_PYTHON = \ qa_comedi.py +# Don't distribute output of swig +dist-hook: + @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done + @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done + MOSTLYCLEANFILES = \ $(BUILT_SOURCES) *~ *.pyc + -- cgit From 63d05d64826fd1b3eef89e5a8a14a73b318464ac Mon Sep 17 00:00:00 2001 From: jcorgan Date: Mon, 26 Feb 2007 21:26:10 +0000 Subject: Merged r4632:4645 on jcorgan/linking into trunk. Cleans up linking issues with libtool and already installed libraries. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4646 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index b0a537ced..00d008674 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -75,7 +75,7 @@ swiginclude_HEADERS = \ _comedi_la_LIBADD = \ $(PYTHON_LDFLAGS) \ - $(GNURADIO_CORE_LIBS) \ + $(GNURADIO_CORE_LA) \ $(COMEDI_LIBS) \ -lstdc++ -- cgit From 937b719d2e57d0497293d603da10cac2532346f6 Mon Sep 17 00:00:00 2001 From: eb Date: Sat, 21 Jul 2007 03:44:38 +0000 Subject: Updated license from GPL version 2 or later to GPL version 3 or later. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6044 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 2 +- gr-comedi/src/comedi.i | 2 +- gr-comedi/src/comedi_sink_s.cc | 2 +- gr-comedi/src/comedi_sink_s.h | 2 +- gr-comedi/src/comedi_source_s.cc | 2 +- gr-comedi/src/comedi_source_s.h | 2 +- gr-comedi/src/gri_comedi.cc | 2 +- gr-comedi/src/gri_comedi.h | 2 +- gr-comedi/src/qa_comedi.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 00d008674..b647f92fa 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -5,7 +5,7 @@ # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index 90e886262..ac0c0a3ed 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/comedi_sink_s.cc b/gr-comedi/src/comedi_sink_s.cc index 68514a54b..7f4c6d6aa 100644 --- a/gr-comedi/src/comedi_sink_s.cc +++ b/gr-comedi/src/comedi_sink_s.cc @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/comedi_sink_s.h b/gr-comedi/src/comedi_sink_s.h index 779dd9e87..41ddea361 100644 --- a/gr-comedi/src/comedi_sink_s.h +++ b/gr-comedi/src/comedi_sink_s.h @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/comedi_source_s.cc b/gr-comedi/src/comedi_source_s.cc index f41f8ca39..4e3980e76 100644 --- a/gr-comedi/src/comedi_source_s.cc +++ b/gr-comedi/src/comedi_source_s.cc @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/comedi_source_s.h b/gr-comedi/src/comedi_source_s.h index c0f98e2fa..a4809d1f1 100644 --- a/gr-comedi/src/comedi_source_s.h +++ b/gr-comedi/src/comedi_source_s.h @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/gri_comedi.cc b/gr-comedi/src/gri_comedi.cc index b9627dc89..15caac4d4 100644 --- a/gr-comedi/src/gri_comedi.cc +++ b/gr-comedi/src/gri_comedi.cc @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/gri_comedi.h b/gr-comedi/src/gri_comedi.h index 379b38190..410db842d 100644 --- a/gr-comedi/src/gri_comedi.h +++ b/gr-comedi/src/gri_comedi.h @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, diff --git a/gr-comedi/src/qa_comedi.py b/gr-comedi/src/qa_comedi.py index bc63c6c37..9f62eb47a 100755 --- a/gr-comedi/src/qa_comedi.py +++ b/gr-comedi/src/qa_comedi.py @@ -6,7 +6,7 @@ # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio is distributed in the hope that it will be useful, -- cgit From f845cd62f4bc202dc3c23a916a6699a1afb2f40d Mon Sep 17 00:00:00 2001 From: jcorgan Date: Tue, 27 Nov 2007 20:06:08 +0000 Subject: Implements ticket:208 git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7045 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/qa_comedi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/qa_comedi.py b/gr-comedi/src/qa_comedi.py index 9f62eb47a..e690dfa19 100755 --- a/gr-comedi/src/qa_comedi.py +++ b/gr-comedi/src/qa_comedi.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005 Free Software Foundation, Inc. +# Copyright 2005,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -26,10 +26,10 @@ import comedi class qa_comedi (gr_unittest.TestCase): def setUp (self): - self.fg = gr.flow_graph () + self.tb = gr.top_block () def tearDown (self): - self.fg = None + self.tb = None def test_000_nop (self): """Just see if we can import the module... -- cgit From 42d9c6f495503d3d9d2db47a9979036c9233f976 Mon Sep 17 00:00:00 2001 From: jcorgan Date: Fri, 8 Feb 2008 23:32:10 +0000 Subject: Merged r7478:7608 from michaelld/t186 into trunk. Adds ability to compile GNU Radio modules individually, using already installed dependent libraries and include files. New functionality is enabled using --with-* on configure command line; existing build options should remain unchanged. Nice work by Michael Dickens, still needs documentation update on wiki. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7617 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index b647f92fa..c09ec8b87 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2005 Free Software Foundation, Inc. +# Copyright 2005,2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -49,9 +49,10 @@ BUILT_SOURCES = \ ourpython_PYTHON = \ comedi.py -INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) +INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) -SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES) +SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) \ + $(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) # -I$(swigincludedir) $(S-I$(grincludedir) -I$(comediincludedir) ourlib_LTLIBRARIES = _comedi.la -- cgit From b836d1ca494e0303f49d847982f198bb1037f800 Mon Sep 17 00:00:00 2001 From: michaelld Date: Mon, 11 Feb 2008 15:57:38 +0000 Subject: Fix for gr-comedi when using --with-gnuradio-core in configure. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7632 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index c09ec8b87..05c3780b4 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -52,7 +52,7 @@ ourpython_PYTHON = \ INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) \ - $(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) + $(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES) # -I$(swigincludedir) $(S-I$(grincludedir) -I$(comediincludedir) ourlib_LTLIBRARIES = _comedi.la -- cgit From 776da31eb84e146a8adf1e3ca7e017c1d9992ce3 Mon Sep 17 00:00:00 2001 From: michaelld Date: Thu, 21 Feb 2008 19:16:45 +0000 Subject: Merged build_config branch into trunk: 1) Modified top-level run_tests.sh script: a) to execute code for setting or changing the library search path in Darwin (DYLD_LIBRARY_PATH) or Windows (PATH) on those host OSs only, not on other host OSs. b) Added local (to the component making check) library paths to those same search paths, since libtool doesn't do it (unlike in Linux). 2) In all AM Makefiles -except those dealing with USRP firmware-, changes INCLUDES to AM_CPPFLAGS since the former is deprecated. 3) Changed AM_CPPFLAGS to FW_INCLUDES for commands .c.rel in USRP firmware. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7769 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 05c3780b4..00e14c77c 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -49,7 +49,7 @@ BUILT_SOURCES = \ ourpython_PYTHON = \ comedi.py -INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) +AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) \ $(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES) -- cgit From 34af4364456b9005efee3c3986ea0f4dce87c99e Mon Sep 17 00:00:00 2001 From: jcorgan Date: Sun, 24 Aug 2008 17:41:07 +0000 Subject: Fix compiler warnings across the tree. Adds --enable-warnings-as-errors configure option. Currently compiles with no warnings with GCC 4.2.3 on Ubuntu 8.04. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9396 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 00e14c77c..6fc028998 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -82,6 +82,8 @@ _comedi_la_LIBADD = \ _comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_comedi_la_CXXFLAGS = @swig_CXXFLAGS@ + comedi.cc comedi.py: $(LOCAL_IFILES) $(SWIG) $(SWIGCPPPYTHONARGS) -module comedi -o comedi.cc $(LOCAL_IFILES) -- cgit From 8193fd8a044a18471a6091249195d15ae6d814be Mon Sep 17 00:00:00 2001 From: jcorgan Date: Mon, 2 Feb 2009 14:27:28 +0000 Subject: Merged r10288:10370 from michaelld/swigpythonargs into trunk. Passes distcheck. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10371 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 6fc028998..c276629e4 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2005,2008 Free Software Foundation, Inc. +# Copyright 2005,2008,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -33,7 +33,7 @@ EXTRA_DIST = run_tests.in TESTS = run_tests LOCAL_IFILES = \ - $(top_srcdir)/gr-comedi/src/comedi.i + $(srcdir)/comedi.i NON_LOCAL_IFILES = \ $(GNURADIO_I) @@ -51,10 +51,6 @@ ourpython_PYTHON = \ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) -SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) \ - $(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES) -# -I$(swigincludedir) $(S-I$(grincludedir) -I$(comediincludedir) - ourlib_LTLIBRARIES = _comedi.la _comedi_la_SOURCES = \ @@ -84,9 +80,9 @@ _comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version _comedi_la_CXXFLAGS = @swig_CXXFLAGS@ -comedi.cc comedi.py: $(LOCAL_IFILES) - $(SWIG) $(SWIGCPPPYTHONARGS) -module comedi -o comedi.cc $(LOCAL_IFILES) - +comedi.cc comedi.py: $(ALL_IFILES) + $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module comedi \ + -o comedi.cc $(LOCAL_IFILES) noinst_PYTHON = \ qa_comedi.py -- cgit From 7783dc88c6acf839b59c7c3358094f85e0012ada Mon Sep 17 00:00:00 2001 From: jcorgan Date: Tue, 10 Feb 2009 04:53:37 +0000 Subject: Merged r10385:10413 from michaelld/swig_tweaks into trunk. Passes distcheck. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10414 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/comedi.i | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index ac0c0a3ed..cdb77aee0 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2005,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "comedi_sink_s.h" #include "comedi_source_s.h" -#include %} // ---------------------------------------------------------------- -- cgit From c3f962a1f0a4132ad643c58774bb69b190dccc49 Mon Sep 17 00:00:00 2001 From: jcorgan Date: Sat, 14 Mar 2009 02:28:41 +0000 Subject: Merged r10554:10595 from michaelld/am_swig_4 into trunk. Major overhaul of SWIG usage in build system, also fixes ticket:130. Trunk passes distcheck. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10596 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 86 +++++-------- gr-comedi/src/Makefile.swig.gen | 259 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 290 insertions(+), 55 deletions(-) create mode 100644 gr-comedi/src/Makefile.swig.gen (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index c276629e4..bd26e6952 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -21,77 +21,53 @@ include $(top_srcdir)/Makefile.common -# Install this stuff so that it ends up as the gnuradio.comedi module -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio - -ourpythondir = $(grpythondir) -ourlibdir = $(grpyexecdir) - EXTRA_DIST = run_tests.in TESTS = run_tests -LOCAL_IFILES = \ - $(srcdir)/comedi.i - -NON_LOCAL_IFILES = \ - $(GNURADIO_I) - -ALL_IFILES = \ - $(LOCAL_IFILES) \ - $(NON_LOCAL_IFILES) - -BUILT_SOURCES = \ - comedi.cc \ - comedi.py - -ourpython_PYTHON = \ - comedi.py +DISTCLEANFILES = run_tests AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) -ourlib_LTLIBRARIES = _comedi.la - -_comedi_la_SOURCES = \ - comedi.cc \ - comedi_sink_s.cc \ - comedi_source_s.cc \ - gri_comedi.cc - +# C/C++ headers get installed in ${prefix}/include/gnuradio grinclude_HEADERS = \ comedi_sink_s.h \ - comedi_source_s.h + comedi_source_s.h -noinst_HEADERS = \ - gri_comedi.h +noinst_HEADERS = \ + gri_comedi.h +noinst_PYTHON = \ + qa_comedi.py -swiginclude_HEADERS = \ - $(LOCAL_IFILES) - -_comedi_la_LIBADD = \ - $(PYTHON_LDFLAGS) \ - $(GNURADIO_CORE_LA) \ - $(COMEDI_LIBS) \ - -lstdc++ +################################### +# SWIG Python interface and library -_comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +TOP_SWIG_IFILES = \ + comedi.i -_comedi_la_CXXFLAGS = @swig_CXXFLAGS@ +# Install so that they end up available as: +# import gnuradio.comedi +# This ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio +comedi_pythondir_category = \ + gnuradio -comedi.cc comedi.py: $(ALL_IFILES) - $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module comedi \ - -o comedi.cc $(LOCAL_IFILES) +# additional sources for the SWIG-generated library +comedi_la_swig_sources = \ + comedi_sink_s.cc \ + comedi_source_s.cc \ + gri_comedi.cc -noinst_PYTHON = \ - qa_comedi.py +# additional libraries for linking with the SWIG-generated library +comedi_la_swig_libadd = \ + $(GNURADIO_CORE_LA) \ + $(COMEDI_LIBS) -# Don't distribute output of swig -dist-hook: - @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done - @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done +include $(top_srcdir)/Makefile.swig -MOSTLYCLEANFILES = \ - $(BUILT_SOURCES) *~ *.pyc +# add some of the variables generated inside the Makefile.swig.gen +BUILT_SOURCES = $(swig_built_sources) +# Do not distribute the output of SWIG +no_dist_files = $(swig_built_sources) diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen new file mode 100644 index 000000000..dd2c235c3 --- /dev/null +++ b/gr-comedi/src/Makefile.swig.gen @@ -0,0 +1,259 @@ +# -*- Makefile -*- +# +# Copyright 2009 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +# Makefile.swig.gen for comedi.i + +## Default install locations for these files: +## +## Default location for the Python directory is: +## ${prefix}/lib/python${python_version}/site-packages/[category]/comedi +## Default location for the Python exec directory is: +## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/comedi +## +## The following can be overloaded to change the install location, but +## this has to be done in the including Makefile.am -before- +## Makefile.swig is included. + +comedi_pythondir_category ?= gnuradio/comedi +comedi_pylibdir_category ?= $(comedi_pythondir_category) +comedi_pythondir = $(pythondir)/$(comedi_pythondir_category) +comedi_pylibdir = $(pyexecdir)/$(comedi_pylibdir_category) + +## SWIG headers are always installed into the same directory. + +comedi_swigincludedir = $(swigincludedir) + +## This is a template file for a "generated" Makefile addition (in +## this case, "Makefile.swig.gen"). By including the top-level +## Makefile.swig, this file will be used to generate the SWIG +## dependencies. Assign the variable TOP_SWIG_FILES to be the list of +## SWIG .i files to generated wrappings for; there can be more than 1 +## so long as the names are unique (no sorting is done on the +## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i +## file will generate .cc, .py, and possibly .h files -- meaning that +## all of these files will have the same base name (that provided for +## the SWIG .i file). +## +## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the +## right thing. For more info, see < +## http://sources.redhat.com/automake/automake.html#Multiple-Outputs > + +## Stamps used to ensure parallel make does the right thing. These +## are removed by "make clean", but otherwise unused except during the +## parallel built. These will not be included in a tarball, because +## the SWIG-generated files will be removed from the distribution. + +STAMPS += $(DEPDIR)/comedi-generate-* + +## Other cleaned files: dependency files generated by SWIG or this Makefile + +MOSTLYCLEANFILES += $(DEPDIR)/*.S* + +## Add the .py and .cc files to the list of SWIG built sources. The +## .h file is sometimes built, but not always ... so that one has to +## be added manually by the including Makefile.am . + +swig_built_sources += comedi.py comedi.cc + +## Various SWIG variables. These can be overloaded in the including +## Makefile.am by setting the variable value there, then including +## Makefile.swig . + +comedi_swiginclude_HEADERS = \ + comedi.i \ + $(comedi_swiginclude_headers) + +comedi_pylib_LTLIBRARIES = \ + _comedi.la + +_comedi_la_SOURCES = \ + comedi.cc \ + $(comedi_la_swig_sources) + +_comedi_la_LIBADD = \ + $(STD_SWIG_LA_LIB_ADD) \ + $(comedi_la_swig_libadd) + +_comedi_la_LDFLAGS = \ + $(STD_SWIG_LA_LD_FLAGS) \ + $(comedi_la_swig_ldflags) + +_comedi_la_CXXFLAGS = \ + $(STD_SWIG_CXX_FLAGS) \ + $(comedi_la_swig_cxxflags) + +comedi_python_PYTHON = \ + comedi.py \ + $(comedi_python) + +## Entry rule for running SWIG + +comedi.h comedi.py comedi.cc: comedi.i +## This rule will get called only when MAKE decides that one of the +## targets needs to be created or re-created, because: +## +## * The .i file is newer than any or all of the generated files; +## +## * Any or all of the .cc, .h, or .py files does not exist and is +## needed (in the case this file is not needed, the rule for it is +## ignored); or +## +## * Some SWIG-based dependecy of the .cc file isn't met and hence the +## .cc file needs be be regenerated. Explanation: Because MAKE +## knows how to handle dependencies for .cc files (regardless of +## their name or extension), then the .cc file is used as a target +## instead of the .i file -- but with the dependencies of the .i +## file. It is this last reason why the line: +## +## if test -f $@; then :; else +## +## cannot be used in this case: If a .i file dependecy is not met, +## then the .cc file needs to be rebuilt. But if the stamp is newer +## than the .cc file, and the .cc file exists, then in the original +## version (with the 'test' above) the internal MAKE call will not +## be issued and hence the .cc file will not be rebuilt. +## +## Once execution gets to here, it should always proceed no matter the +## state of a stamp (as discussed in link above). The +## $(DEPDIR)/comedi-generate stuff is used to allow for parallel +## builds to "do the right thing". The stamp has no relationship with +## either the target files or dependency file; it is used solely for +## the protection of multiple builds during a given call to MAKE. +## +## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM +## (15). At a caught signal, the quoted command will be issued before +## exiting. In this case, remove any stamp, whether temporary of not. +## The trap is valid until the process exits; the process includes all +## commands appended via "\"s. +## + trap 'rm -rf $(DEPDIR)/comedi-generate-*' 1 2 13 15; \ +## +## Create a temporary directory, which acts as a lock. The first +## process to create the directory will succeed and issue the MAKE +## command to do the actual work, while all subsequent processes will +## fail -- leading them to wait for the first process to finish. +## + if mkdir $(DEPDIR)/comedi-generate-lock 2>/dev/null; then \ +## +## This code is being executed by the first process to succeed in +## creating the directory lock. +## +## Remove the stamp associated with this filename. +## + rm -f $(DEPDIR)/comedi-generate-stamp; \ +## +## Tell MAKE to run the rule for creating this stamp. +## + $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/comedi-generate-stamp WHAT=$<; \ +## +## Now that the .cc, .h, and .py files have been (re)created from the +## .i file, future checking of this rule during the same MAKE +## execution will come back that the rule doesn't need to be executed +## because none of the conditions mentioned at the start of this rule +## will be positive. Remove the the directory lock, which frees up +## any waiting process(es) to continue. +## + rmdir $(DEPDIR)/comedi-generate-lock; \ + else \ +## +## This code is being executed by any follower processes while the +## directory lock is in place. +## +## Wait until the first process is done, testing once per second. +## + while test -d $(DEPDIR)/comedi-generate-lock; do \ + sleep 1; \ + done; \ +## +## Succeed if and only if the first process succeeded; exit this +## process returning the status of the generated stamp. +## + test -f $(DEPDIR)/comedi-generate-stamp; \ + exit $$?; \ + fi; + +$(DEPDIR)/comedi-generate-stamp: +## This rule will be called only by the first process issuing the +## above rule to succeed in creating the lock directory, after +## removing the actual stamp file in order to guarantee that MAKE will +## execute this rule. +## +## 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) $(comedi_swig_args) \ + -MD -MF $(DEPDIR)/comedi.Std \ + -module comedi -o comedi.cc $(WHAT); then \ + if test $(host_os) = mingw32; then \ + $(RM) $(DEPDIR)/comedi.Sd; \ + $(SED) 's,\\\\,/,g' < $(DEPDIR)/comedi.Std \ + > $(DEPDIR)/comedi.Sd; \ + $(RM) $(DEPDIR)/comedi.Std; \ + $(MV) $(DEPDIR)/comedi.Sd $(DEPDIR)/comedi.Std; \ + fi; \ + else \ + $(RM) $(DEPDIR)/comedi.S*; exit 1; \ + fi; +## +## Mess with the SWIG output .Std dependency file, to create a +## dependecy file valid for the input .i file: Basically, simulate the +## dependency file created for libraries by GNU's libtool for C++, +## where all of the dependencies for the target are first listed, then +## each individual dependency is listed as a target with no further +## dependencies. +## +## (1) remove the current dependency file +## + $(RM) $(DEPDIR)/comedi.d +## +## (2) Copy the whole SWIG file: +## + cp $(DEPDIR)/comedi.Std $(DEPDIR)/comedi.d +## +## (3) all a carriage return to the end of the dependency file. +## + echo "" >> $(DEPDIR)/comedi.d +## +## (4) from the SWIG file, remove the first line (the target); remove +## trailing " \" and " " from each line. Append ":" to each line, +## followed by 2 carriage returns, then append this to the end of +## the dependency file. +## + $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/comedi.Std | \ + awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/comedi.d +## +## (5) remove the SWIG-generated file +## + $(RM) $(DEPDIR)/comedi.Std +## +## Create the stamp for this filename generation, to signal success in +## executing this rule; allows other threads waiting on this process +## to continue. +## + touch $(DEPDIR)/comedi-generate-stamp + +# KLUDGE: Force runtime include of a SWIG dependency file. This is +# not guaranteed to be portable, but will probably work. If it works, +# we have accurate dependencies for our swig stuff, which is good. + +@am__include@ @am__quote@./$(DEPDIR)/comedi.d@am__quote@ + -- cgit From 5a4b9ba9af590b2a269cb3e5872c85faa7c284d1 Mon Sep 17 00:00:00 2001 From: eb Date: Fri, 22 May 2009 21:22:22 +0000 Subject: Doc fixes. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11088 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/comedi_sink_s.h | 2 +- gr-comedi/src/comedi_source_s.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/comedi_sink_s.h b/gr-comedi/src/comedi_sink_s.h index 41ddea361..22f0428d4 100644 --- a/gr-comedi/src/comedi_sink_s.h +++ b/gr-comedi/src/comedi_sink_s.h @@ -49,7 +49,7 @@ comedi_make_sink_s (int sampling_freq, */ class comedi_sink_s : public gr_sync_block { friend comedi_sink_s_sptr - comedi_make_sink_s (int sampling_freq, const std::string device_name); + comedi_make_sink_s (int sampling_freq, const std::string dev); // typedef for pointer to class work method typedef int (comedi_sink_s::*work_t)(int noutput_items, diff --git a/gr-comedi/src/comedi_source_s.h b/gr-comedi/src/comedi_source_s.h index a4809d1f1..c406f274b 100644 --- a/gr-comedi/src/comedi_source_s.h +++ b/gr-comedi/src/comedi_source_s.h @@ -49,7 +49,7 @@ comedi_make_source_s (int sampling_freq, */ class comedi_source_s : public gr_sync_block { friend comedi_source_s_sptr - comedi_make_source_s (int sampling_freq, const std::string device_name); + comedi_make_source_s (int sampling_freq, const std::string dev); // typedef for pointer to class work method typedef int (comedi_source_s::*work_t)(int noutput_items, -- cgit From 40b8a57d69b4b85f207fb0408347c210e23202cc Mon Sep 17 00:00:00 2001 From: jcorgan Date: Wed, 27 May 2009 01:54:41 +0000 Subject: Merged r11123:11148 from jcorgan/np into trunk. Adds --enable-python option to configure (defaults to yes). Using --disable-python or --enable-python=no will cause only C++ API targets to be created and installed. Several new shared libraries are now created. Where in the past, the C++ objects of the actual gnuradio blocks that were in a component were hidden inside their corresponding Python extension modules, these are now split out into a libgnuradio-foo.so library, and the _foo.so Python module is linked to that. This has been the way several top- level components have operated for some time, such as gr-audio-alsa and gr-usrp and gr-usrp2. This changeset applies that pattern to all components. C++ API users can use pkg-config to discover the cflags and libs parameters needed to include and link against these libraries. These components have not been tested: gr-comedi gr-audio-osx gr-audio-windows Passes distcheck. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11150 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index bd26e6952..974b108ab 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -23,10 +23,6 @@ include $(top_srcdir)/Makefile.common EXTRA_DIST = run_tests.in -TESTS = run_tests - -DISTCLEANFILES = run_tests - AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) # C/C++ headers get installed in ${prefix}/include/gnuradio @@ -40,8 +36,25 @@ noinst_HEADERS = \ noinst_PYTHON = \ qa_comedi.py +lib_LTLIBRARIES = libgnuradio-comedi.la + +libgnuradio_comedi_la_SOURCES = \ + comedi_sink.cc \ + comedi_source.cc \ + gri_comedi.cc + +libgnuradio_comedi_la_LIBADD = \ + $(GNURADIO_CORE_LA) \ + $(COMEDI_LIBS) + +libgnuradio_comedi_la_LDFLAGS = \ + $(NO_UNDEFINED) + +if PYTHON ################################### # SWIG Python interface and library +TESTS = run_tests +DISTCLEANFILES = run_tests TOP_SWIG_IFILES = \ comedi.i @@ -53,16 +66,9 @@ TOP_SWIG_IFILES = \ comedi_pythondir_category = \ gnuradio -# additional sources for the SWIG-generated library -comedi_la_swig_sources = \ - comedi_sink_s.cc \ - comedi_source_s.cc \ - gri_comedi.cc - # additional libraries for linking with the SWIG-generated library comedi_la_swig_libadd = \ - $(GNURADIO_CORE_LA) \ - $(COMEDI_LIBS) + libgnuradio-comedi.la include $(top_srcdir)/Makefile.swig @@ -71,3 +77,4 @@ BUILT_SOURCES = $(swig_built_sources) # Do not distribute the output of SWIG no_dist_files = $(swig_built_sources) +endif -- cgit From 3d66656fe786156d8037fc3be86c1e294718f21a Mon Sep 17 00:00:00 2001 From: michaelld Date: Wed, 27 May 2009 14:35:34 +0000 Subject: Typo fix; passes distcheck on OSX. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11154 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 974b108ab..462c50ad5 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -39,8 +39,8 @@ noinst_PYTHON = \ lib_LTLIBRARIES = libgnuradio-comedi.la libgnuradio_comedi_la_SOURCES = \ - comedi_sink.cc \ - comedi_source.cc \ + comedi_sink_s.cc \ + comedi_source_s.cc \ gri_comedi.cc libgnuradio_comedi_la_LIBADD = \ -- cgit From 253018c6cdb114f5662a2d7ba8ed748c6e68e3a7 Mon Sep 17 00:00:00 2001 From: git Date: Fri, 14 Aug 2009 18:10:11 +0000 Subject: Added git ignore files auto created from svn:ignore properties. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11592 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-comedi/src/.gitignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 gr-comedi/src/.gitignore (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/.gitignore b/gr-comedi/src/.gitignore new file mode 100644 index 000000000..d95b6dc4f --- /dev/null +++ b/gr-comedi/src/.gitignore @@ -0,0 +1,12 @@ +/Makefile +/Makefile.in +/.la +/.lo +/.deps +/.libs +/*.la +/*.lo +/comedi.cc +/*.pyc +/comedi.py +/run_tests -- cgit From ad13c00ae8cba6327851652a7d0c94a6d6316916 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Fri, 28 May 2010 20:02:38 -0700 Subject: Make C++ shared libraries versioned --- gr-comedi/src/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 462c50ad5..a55bd175b 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -47,8 +47,7 @@ libgnuradio_comedi_la_LIBADD = \ $(GNURADIO_CORE_LA) \ $(COMEDI_LIBS) -libgnuradio_comedi_la_LDFLAGS = \ - $(NO_UNDEFINED) +libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) if PYTHON ################################### -- cgit From 0a9b999b5cce596f4de05828005f698047e14ce9 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Tue, 3 Aug 2010 13:36:18 -0700 Subject: Modify all block factories to use gnuradio::get_initial_sptr. --- gr-comedi/src/comedi_sink_s.cc | 4 ++-- gr-comedi/src/comedi_source_s.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/comedi_sink_s.cc b/gr-comedi/src/comedi_sink_s.cc index 7f4c6d6aa..d4a668758 100644 --- a/gr-comedi/src/comedi_sink_s.cc +++ b/gr-comedi/src/comedi_sink_s.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2005,2010 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -52,7 +52,7 @@ default_device_name () comedi_sink_s_sptr comedi_make_sink_s (int sampling_freq, const std::string dev) { - return comedi_sink_s_sptr (new comedi_sink_s (sampling_freq, dev)); + return gnuradio::get_initial_sptr(new comedi_sink_s (sampling_freq, dev)); } comedi_sink_s::comedi_sink_s (int sampling_freq, diff --git a/gr-comedi/src/comedi_source_s.cc b/gr-comedi/src/comedi_source_s.cc index 4e3980e76..a52d04e2a 100644 --- a/gr-comedi/src/comedi_source_s.cc +++ b/gr-comedi/src/comedi_source_s.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2005,2010 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -49,7 +49,7 @@ default_device_name () comedi_source_s_sptr comedi_make_source_s (int sampling_freq, const std::string dev) { - return comedi_source_s_sptr (new comedi_source_s (sampling_freq, dev)); + return gnuradio::get_initial_sptr(new comedi_source_s (sampling_freq, dev)); } comedi_source_s::comedi_source_s (int sampling_freq, -- cgit From ed4094208c501e91838ccc333059e4731e8ae908 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Thu, 14 Oct 2010 12:34:08 -0600 Subject: regenerated after changes to the template --- gr-comedi/src/Makefile.swig.gen | 59 +++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 14 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index dd2c235c3..66edf9ce9 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -72,7 +72,7 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += comedi.py comedi.cc +swig_built_sources += comedi.py comedi_python.cc ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including @@ -83,21 +83,21 @@ comedi_swiginclude_HEADERS = \ $(comedi_swiginclude_headers) comedi_pylib_LTLIBRARIES = \ - _comedi.la + _comedi_python.la -_comedi_la_SOURCES = \ - comedi.cc \ +_comedi_python_la_SOURCES = \ + comedi_python.cc \ $(comedi_la_swig_sources) -_comedi_la_LIBADD = \ +_comedi_python_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(comedi_la_swig_libadd) -_comedi_la_LDFLAGS = \ +_comedi_python_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(comedi_la_swig_ldflags) -_comedi_la_CXXFLAGS = \ +_comedi_python_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ $(comedi_la_swig_cxxflags) @@ -105,9 +105,23 @@ comedi_python_PYTHON = \ comedi.py \ $(comedi_python) +if GUILE +comedi_pylib_LTLIBRARIES += _comedi_guile.la + +_comedi_guile_la_SOURCES = \ + comedi_guile.cc \ + $(comedi_la_swig_sources) + +# Guile can use the same flags as python does +_comedi_guile_la_LIBADD = $(_comedi_python_la_LIBADD) +_comedi_guile_la_LDFLAGS = $(_comedi_python_la_LDFLAGS) +_comedi_guile_la_CXXFLAGS = $(_comedi_python_la_CXXFLAGS) + +endif # end of GUILE + ## Entry rule for running SWIG -comedi.h comedi.py comedi.cc: comedi.i +comedi.h comedi.py comedi_python.cc: comedi.i ## This rule will get called only when MAKE decides that one of the ## targets needs to be created or re-created, because: ## @@ -159,11 +173,12 @@ comedi.h comedi.py comedi.cc: comedi.i ## ## Remove the stamp associated with this filename. ## - rm -f $(DEPDIR)/comedi-generate-stamp; \ + rm -f $(DEPDIR)/comedi-generate-*stamp; \ ## ## Tell MAKE to run the rule for creating this stamp. ## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/comedi-generate-stamp WHAT=$<; \ + $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/comedi-generate-python-stamp WHAT=$<; \ + $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/comedi-generate-guile-stamp WHAT=$<; \ ## ## Now that the .cc, .h, and .py files have been (re)created from the ## .i file, future checking of this rule during the same MAKE @@ -187,11 +202,27 @@ comedi.h comedi.py comedi.cc: comedi.i ## Succeed if and only if the first process succeeded; exit this ## process returning the status of the generated stamp. ## - test -f $(DEPDIR)/comedi-generate-stamp; \ + test -f $(DEPDIR)/comedi-generate-python-stamp; \ exit $$?; \ fi; -$(DEPDIR)/comedi-generate-stamp: +$(DEPDIR)/comedi-generate-guile-stamp: + if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(comedi_swig_args) \ + -MD -MF $(DEPDIR)/comedi.Std \ + -module comedi -o comedi_guile.cc $(WHAT); then \ + if test $(host_os) = mingw32; then \ + $(RM) $(DEPDIR)/comedi.Sd; \ + $(SED) 's,\\\\,/,g' < $(DEPDIR)/comedi.Std \ + > $(DEPDIR)/comedi.Sd; \ + $(RM) $(DEPDIR)/comedi.Std; \ + $(MV) $(DEPDIR)/comedi.Sd $(DEPDIR)/comedi.Std; \ + fi; \ + else \ + $(RM) $(DEPDIR)/comedi.S*; exit 1; \ + fi; + touch $(DEPDIR)/comedi-generate-guile-stamp + +$(DEPDIR)/comedi-generate-python-stamp: ## This rule will be called only by the first process issuing the ## above rule to succeed in creating the lock directory, after ## removing the actual stamp file in order to guarantee that MAKE will @@ -202,7 +233,7 @@ $(DEPDIR)/comedi-generate-stamp: ## if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(comedi_swig_args) \ -MD -MF $(DEPDIR)/comedi.Std \ - -module comedi -o comedi.cc $(WHAT); then \ + -module comedi -o comedi_python.cc $(WHAT); then \ if test $(host_os) = mingw32; then \ $(RM) $(DEPDIR)/comedi.Sd; \ $(SED) 's,\\\\,/,g' < $(DEPDIR)/comedi.Std \ @@ -249,7 +280,7 @@ $(DEPDIR)/comedi-generate-stamp: ## executing this rule; allows other threads waiting on this process ## to continue. ## - touch $(DEPDIR)/comedi-generate-stamp + touch $(DEPDIR)/comedi-generate-python-stamp # KLUDGE: Force runtime include of a SWIG dependency file. This is # not guaranteed to be portable, but will probably work. If it works, -- cgit From 4f67bf0a435f9eb62d66c6b2b19a096cbde412d7 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Thu, 21 Oct 2010 13:16:22 -0600 Subject: regenerated --- gr-comedi/src/Makefile.swig.gen | 221 +++++++--------------------------------- 1 file changed, 39 insertions(+), 182 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 66edf9ce9..380c93366 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -38,6 +38,16 @@ comedi_pylibdir_category ?= $(comedi_pythondir_category) comedi_pythondir = $(pythondir)/$(comedi_pythondir_category) comedi_pylibdir = $(pyexecdir)/$(comedi_pylibdir_category) +# The .so libraries for the guile modules get installed whereever guile +# is installed, usually /usr/lib/guile/gnuradio/ +# FIXME: determince whether these should be installed with gnuradio. +comedi_scmlibdir = @GUILE_PKLIBDIR@/gnuradio + +# The scm files for the guile modules get installed where ever guile +# is installed, usually /usr/share/guile/site/comedi +# FIXME: determince whether these should be installed with gnuradio. +comedi_scmdir = @GUILE_PKDATADIR@/gnuradio + ## SWIG headers are always installed into the same directory. comedi_swigincludedir = $(swigincludedir) @@ -72,7 +82,12 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += comedi.py comedi_python.cc +# generating the py or scm file also generates the .cc or .h files, +# but dependencies work better without the .cc ort .h files listed. +swig_built_sources += comedi.py +if GUILE +swig_built_sources += comedi.scm +endif ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including @@ -83,208 +98,50 @@ comedi_swiginclude_HEADERS = \ $(comedi_swiginclude_headers) comedi_pylib_LTLIBRARIES = \ - _comedi_python.la + _comedi.la -_comedi_python_la_SOURCES = \ - comedi_python.cc \ +_comedi_la_SOURCES = \ + python/comedi.cc \ $(comedi_la_swig_sources) -_comedi_python_la_LIBADD = \ +_comedi_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(comedi_la_swig_libadd) -_comedi_python_la_LDFLAGS = \ +# _comedi_la_DEPENDENCIES = python/comedi.lo + +_comedi_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(comedi_la_swig_ldflags) -_comedi_python_la_CXXFLAGS = \ +_comedi_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ $(comedi_la_swig_cxxflags) comedi_python_PYTHON = \ comedi.py \ - $(comedi_python) + $(comedi) if GUILE -comedi_pylib_LTLIBRARIES += _comedi_guile.la - -_comedi_guile_la_SOURCES = \ - comedi_guile.cc \ +comedi_scmlib_LTLIBRARIES = comedi_guile.la +comedi_guile_la_SOURCES = \ + guile/comedi.cc \ $(comedi_la_swig_sources) +comedi_scm_DATA = comedi.scm # Guile can use the same flags as python does -_comedi_guile_la_LIBADD = $(_comedi_python_la_LIBADD) -_comedi_guile_la_LDFLAGS = $(_comedi_python_la_LDFLAGS) -_comedi_guile_la_CXXFLAGS = $(_comedi_python_la_CXXFLAGS) - -endif # end of GUILE +comedi_guile_la_LIBADD = $(_comedi_la_LIBADD) +comedi_guile_la_LDFLAGS = $(_comedi_la_LDFLAGS) +comedi_guile_la_CXXFLAGS = $(_comedi_la_CXXFLAGS) -## Entry rule for running SWIG +guile/comedi.lo: comedi.lo +comedi.scm: comedi.i -comedi.h comedi.py comedi_python.cc: comedi.i -## This rule will get called only when MAKE decides that one of the -## targets needs to be created or re-created, because: -## -## * The .i file is newer than any or all of the generated files; -## -## * Any or all of the .cc, .h, or .py files does not exist and is -## needed (in the case this file is not needed, the rule for it is -## ignored); or -## -## * Some SWIG-based dependecy of the .cc file isn't met and hence the -## .cc file needs be be regenerated. Explanation: Because MAKE -## knows how to handle dependencies for .cc files (regardless of -## their name or extension), then the .cc file is used as a target -## instead of the .i file -- but with the dependencies of the .i -## file. It is this last reason why the line: -## -## if test -f $@; then :; else -## -## cannot be used in this case: If a .i file dependecy is not met, -## then the .cc file needs to be rebuilt. But if the stamp is newer -## than the .cc file, and the .cc file exists, then in the original -## version (with the 'test' above) the internal MAKE call will not -## be issued and hence the .cc file will not be rebuilt. -## -## Once execution gets to here, it should always proceed no matter the -## state of a stamp (as discussed in link above). The -## $(DEPDIR)/comedi-generate stuff is used to allow for parallel -## builds to "do the right thing". The stamp has no relationship with -## either the target files or dependency file; it is used solely for -## the protection of multiple builds during a given call to MAKE. -## -## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM -## (15). At a caught signal, the quoted command will be issued before -## exiting. In this case, remove any stamp, whether temporary of not. -## The trap is valid until the process exits; the process includes all -## commands appended via "\"s. -## - trap 'rm -rf $(DEPDIR)/comedi-generate-*' 1 2 13 15; \ -## -## Create a temporary directory, which acts as a lock. The first -## process to create the directory will succeed and issue the MAKE -## command to do the actual work, while all subsequent processes will -## fail -- leading them to wait for the first process to finish. -## - if mkdir $(DEPDIR)/comedi-generate-lock 2>/dev/null; then \ -## -## This code is being executed by the first process to succeed in -## creating the directory lock. -## -## Remove the stamp associated with this filename. -## - rm -f $(DEPDIR)/comedi-generate-*stamp; \ -## -## Tell MAKE to run the rule for creating this stamp. -## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/comedi-generate-python-stamp WHAT=$<; \ - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/comedi-generate-guile-stamp WHAT=$<; \ -## -## Now that the .cc, .h, and .py files have been (re)created from the -## .i file, future checking of this rule during the same MAKE -## execution will come back that the rule doesn't need to be executed -## because none of the conditions mentioned at the start of this rule -## will be positive. Remove the the directory lock, which frees up -## any waiting process(es) to continue. -## - rmdir $(DEPDIR)/comedi-generate-lock; \ - else \ -## -## This code is being executed by any follower processes while the -## directory lock is in place. -## -## Wait until the first process is done, testing once per second. -## - while test -d $(DEPDIR)/comedi-generate-lock; do \ - sleep 1; \ - done; \ -## -## Succeed if and only if the first process succeeded; exit this -## process returning the status of the generated stamp. -## - test -f $(DEPDIR)/comedi-generate-python-stamp; \ - exit $$?; \ - fi; - -$(DEPDIR)/comedi-generate-guile-stamp: - if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(comedi_swig_args) \ - -MD -MF $(DEPDIR)/comedi.Std \ - -module comedi -o comedi_guile.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/comedi.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/comedi.Std \ - > $(DEPDIR)/comedi.Sd; \ - $(RM) $(DEPDIR)/comedi.Std; \ - $(MV) $(DEPDIR)/comedi.Sd $(DEPDIR)/comedi.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/comedi.S*; exit 1; \ - fi; - touch $(DEPDIR)/comedi-generate-guile-stamp - -$(DEPDIR)/comedi-generate-python-stamp: -## This rule will be called only by the first process issuing the -## above rule to succeed in creating the lock directory, after -## removing the actual stamp file in order to guarantee that MAKE will -## execute this rule. -## -## 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) $(comedi_swig_args) \ - -MD -MF $(DEPDIR)/comedi.Std \ - -module comedi -o comedi_python.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/comedi.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/comedi.Std \ - > $(DEPDIR)/comedi.Sd; \ - $(RM) $(DEPDIR)/comedi.Std; \ - $(MV) $(DEPDIR)/comedi.Sd $(DEPDIR)/comedi.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/comedi.S*; exit 1; \ - fi; -## -## Mess with the SWIG output .Std dependency file, to create a -## dependecy file valid for the input .i file: Basically, simulate the -## dependency file created for libraries by GNU's libtool for C++, -## where all of the dependencies for the target are first listed, then -## each individual dependency is listed as a target with no further -## dependencies. -## -## (1) remove the current dependency file -## - $(RM) $(DEPDIR)/comedi.d -## -## (2) Copy the whole SWIG file: -## - cp $(DEPDIR)/comedi.Std $(DEPDIR)/comedi.d -## -## (3) all a carriage return to the end of the dependency file. -## - echo "" >> $(DEPDIR)/comedi.d -## -## (4) from the SWIG file, remove the first line (the target); remove -## trailing " \" and " " from each line. Append ":" to each line, -## followed by 2 carriage returns, then append this to the end of -## the dependency file. -## - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/comedi.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/comedi.d -## -## (5) remove the SWIG-generated file -## - $(RM) $(DEPDIR)/comedi.Std -## -## Create the stamp for this filename generation, to signal success in -## executing this rule; allows other threads waiting on this process -## to continue. -## - touch $(DEPDIR)/comedi-generate-python-stamp +endif # end of GUILE -# KLUDGE: Force runtime include of a SWIG dependency file. This is -# not guaranteed to be portable, but will probably work. If it works, -# we have accurate dependencies for our swig stuff, which is good. +python/comedi.lo: +comedi.lo: comedi.py comedi.scm +comedi.py: comedi.i -@am__include@ @am__quote@./$(DEPDIR)/comedi.d@am__quote@ -- cgit From 1e34972f4433cbfef3500fc73a285c7c436cfd6b Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 22 Oct 2010 22:00:09 -0700 Subject: Rengenerate Makefile.swig.gen's --- gr-comedi/src/Makefile.swig.gen | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 380c93366..841f51805 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -41,12 +41,12 @@ comedi_pylibdir = $(pyexecdir)/$(comedi_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -comedi_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +comedi_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/comedi # FIXME: determince whether these should be installed with gnuradio. -comedi_scmdir = @GUILE_PKDATADIR@/gnuradio +comedi_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/comedi.lo: comedi.lo: comedi.py comedi.scm comedi.py: comedi.i +-include python/comedi.d -- cgit From 6421d47062f4bf5abbdf26142616a5965f1edfa0 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 22 Oct 2010 23:28:06 -0700 Subject: regenerate --- gr-comedi/src/Makefile.swig.gen | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 841f51805..4bda07800 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -41,7 +41,7 @@ comedi_pylibdir = $(pyexecdir)/$(comedi_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -comedi_scmlibdir = $(libdir)/guile/gnuradio +comedi_scmlibdir = $(libdir) # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/comedi @@ -124,16 +124,16 @@ comedi_python_PYTHON = \ $(comedi) if GUILE -comedi_scmlib_LTLIBRARIES = comedi_guile.la -comedi_guile_la_SOURCES = \ +comedi_scmlib_LTLIBRARIES = libguile-comedi.la +libguile_comedi_la_SOURCES = \ guile/comedi.cc \ $(comedi_la_swig_sources) comedi_scm_DATA = comedi.scm # Guile can use the same flags as python does -comedi_guile_la_LIBADD = $(_comedi_la_LIBADD) -comedi_guile_la_LDFLAGS = $(_comedi_la_LDFLAGS) -comedi_guile_la_CXXFLAGS = $(_comedi_la_CXXFLAGS) +libguile_comedi_la_LIBADD = $(_comedi_la_LIBADD) +libguile_comedi_la_LDFLAGS = $(_comedi_la_LDFLAGS) +libguile_comedi_la_CXXFLAGS = $(_comedi_la_CXXFLAGS) guile/comedi.lo: comedi.lo comedi.scm: comedi.i -- cgit From d94769a975612072dc03fa378bc79856c07cd66b Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sat, 30 Oct 2010 12:14:41 -0600 Subject: add load-extension support --- gr-comedi/src/comedi.i | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index cdb77aee0..499ccc598 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -69,3 +69,13 @@ class comedi_sink_s : public gr_sync_block { public: ~comedi_sink_s (); }; + +#if SWIGGUILE +%scheme %{ +(load-extension "libguile-comedi" "scm_init_gnuradio_comedi_module") +%} + +%goops %{ +(use-modules (gnuradio gnuradio_core_runtime)) +%} +#endif -- cgit From 8c80b814bcdc00e0e71a1d4174c747a0f221fa20 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Sun, 31 Oct 2010 13:23:26 -0700 Subject: regenerated --- gr-comedi/src/Makefile.swig.gen | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 4bda07800..06be4769e 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -46,7 +46,7 @@ comedi_scmlibdir = $(libdir) # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/comedi # FIXME: determince whether these should be installed with gnuradio. -comedi_scmdir = $(guiledir)/gnuradio +comedi_scmdir = $(guiledir) ## SWIG headers are always installed into the same directory. @@ -128,7 +128,7 @@ comedi_scmlib_LTLIBRARIES = libguile-comedi.la libguile_comedi_la_SOURCES = \ guile/comedi.cc \ $(comedi_la_swig_sources) -comedi_scm_DATA = comedi.scm +nobase_comedi_scm_DATA = gnuradio/comedi.scm gnuradio/comedi-primitive.scm # Guile can use the same flags as python does libguile_comedi_la_LIBADD = $(_comedi_la_LIBADD) @@ -137,6 +137,9 @@ libguile_comedi_la_CXXFLAGS = $(_comedi_la_CXXFLAGS) guile/comedi.lo: comedi.lo comedi.scm: comedi.i +gnuradio/comedi-primitive.scm: comedi.scm + +-include guile/comedi.d endif # end of GUILE -- cgit From bc8fd41b84219cd08f057c524fe0b90ffef6f8aa Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Mon, 1 Nov 2010 16:28:14 -0700 Subject: regenerated --- gr-comedi/src/Makefile.swig.gen | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 06be4769e..8fab4212b 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -84,10 +84,10 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* # generating the py or scm file also generates the .cc or .h files, # but dependencies work better without the .cc ort .h files listed. -swig_built_sources += comedi.py -if GUILE -swig_built_sources += comedi.scm -endif +# swig_built_sources += comedi.py +# if GUILE +# swig_built_sources += gnuradio/comedi.scm +# endif ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including @@ -135,15 +135,14 @@ libguile_comedi_la_LIBADD = $(_comedi_la_LIBADD) libguile_comedi_la_LDFLAGS = $(_comedi_la_LDFLAGS) libguile_comedi_la_CXXFLAGS = $(_comedi_la_CXXFLAGS) -guile/comedi.lo: comedi.lo -comedi.scm: comedi.i -gnuradio/comedi-primitive.scm: comedi.scm +guile/comedi.cc: gnuradio/comedi.scm +gnuradio/comedi.scm: comedi.i +gnuradio/comedi-primitive.scm: gnuradio/comedi.scm -include guile/comedi.d endif # end of GUILE -python/comedi.lo: comedi.lo: comedi.py comedi.scm comedi.py: comedi.i -- cgit From df92b7c6315c567e58e0d9c293d7c9c2699023d3 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 10 Nov 2010 13:01:38 -0800 Subject: regenerated --- gr-comedi/src/Makefile.swig.gen | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 8fab4212b..f52a9a25c 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -67,28 +67,10 @@ comedi_swigincludedir = $(swigincludedir) ## right thing. For more info, see < ## http://sources.redhat.com/automake/automake.html#Multiple-Outputs > -## Stamps used to ensure parallel make does the right thing. These -## are removed by "make clean", but otherwise unused except during the -## parallel built. These will not be included in a tarball, because -## the SWIG-generated files will be removed from the distribution. - -STAMPS += $(DEPDIR)/comedi-generate-* - ## Other cleaned files: dependency files generated by SWIG or this Makefile MOSTLYCLEANFILES += $(DEPDIR)/*.S* -## Add the .py and .cc files to the list of SWIG built sources. The -## .h file is sometimes built, but not always ... so that one has to -## be added manually by the including Makefile.am . - -# generating the py or scm file also generates the .cc or .h files, -# but dependencies work better without the .cc ort .h files listed. -# swig_built_sources += comedi.py -# if GUILE -# swig_built_sources += gnuradio/comedi.scm -# endif - ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including ## Makefile.swig . @@ -108,8 +90,6 @@ _comedi_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(comedi_la_swig_libadd) -# _comedi_la_DEPENDENCIES = python/comedi.lo - _comedi_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(comedi_la_swig_ldflags) @@ -123,14 +103,20 @@ comedi_python_PYTHON = \ comedi.py \ $(comedi) +python/comedi.cc: comedi.py +comedi.py: comedi.i + +# Include the python dependencies for this file +-include python/comedi.d +# end of PYTHON + if GUILE comedi_scmlib_LTLIBRARIES = libguile-comedi.la -libguile_comedi_la_SOURCES = \ +libguile_comedi_la_SOURCES = \ guile/comedi.cc \ $(comedi_la_swig_sources) nobase_comedi_scm_DATA = gnuradio/comedi.scm gnuradio/comedi-primitive.scm -# Guile can use the same flags as python does libguile_comedi_la_LIBADD = $(_comedi_la_LIBADD) libguile_comedi_la_LDFLAGS = $(_comedi_la_LDFLAGS) libguile_comedi_la_CXXFLAGS = $(_comedi_la_CXXFLAGS) @@ -139,12 +125,9 @@ guile/comedi.cc: gnuradio/comedi.scm gnuradio/comedi.scm: comedi.i gnuradio/comedi-primitive.scm: gnuradio/comedi.scm +# Include the guile dependencies for this file -include guile/comedi.d endif # end of GUILE -comedi.lo: comedi.py comedi.scm -comedi.py: comedi.i - --include python/comedi.d -- cgit From 8180bb1d7020e07c9b0a217820c68d07f0d98a74 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Tue, 16 Nov 2010 21:33:50 -0800 Subject: regenerated --- gr-comedi/src/Makefile.swig.gen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index f52a9a25c..6007d1216 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -101,7 +101,7 @@ _comedi_la_CXXFLAGS = \ comedi_python_PYTHON = \ comedi.py \ - $(comedi) + $(comedi_python) python/comedi.cc: comedi.py comedi.py: comedi.i -- cgit From ff877cabe2384dc2155ef5af92ee8b959fd29806 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Fri, 19 Nov 2010 08:07:52 -0700 Subject: regenerated --- gr-comedi/src/Makefile.swig.gen | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 6007d1216..9b34dacce 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -79,6 +79,7 @@ comedi_swiginclude_HEADERS = \ comedi.i \ $(comedi_swiginclude_headers) +if PYTHON comedi_pylib_LTLIBRARIES = \ _comedi.la @@ -86,6 +87,10 @@ _comedi_la_SOURCES = \ python/comedi.cc \ $(comedi_la_swig_sources) +comedi_python_PYTHON = \ + comedi.py \ + $(comedi_python) + _comedi_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(comedi_la_swig_libadd) @@ -99,27 +104,34 @@ _comedi_la_CXXFLAGS = \ -I$(top_builddir) \ $(comedi_la_swig_cxxflags) -comedi_python_PYTHON = \ - comedi.py \ - $(comedi_python) - python/comedi.cc: comedi.py comedi.py: comedi.i # Include the python dependencies for this file -include python/comedi.d -# end of PYTHON + +endif # end of if python if GUILE -comedi_scmlib_LTLIBRARIES = libguile-comedi.la + +comedi_scmlib_LTLIBRARIES = \ + libguile-comedi.la libguile_comedi_la_SOURCES = \ guile/comedi.cc \ $(comedi_la_swig_sources) -nobase_comedi_scm_DATA = gnuradio/comedi.scm gnuradio/comedi-primitive.scm - -libguile_comedi_la_LIBADD = $(_comedi_la_LIBADD) -libguile_comedi_la_LDFLAGS = $(_comedi_la_LDFLAGS) -libguile_comedi_la_CXXFLAGS = $(_comedi_la_CXXFLAGS) +nobase_comedi_scm_DATA = \ + gnuradio/comedi.scm \ + gnuradio/comedi-primitive.scm +libguile_comedi_la_LIBADD = \ + $(STD_SWIG_LA_LIB_ADD) \ + $(comedi_la_swig_libadd) +libguile_comedi_la_LDFLAGS = \ + $(STD_SWIG_LA_LD_FLAGS) \ + $(comedi_la_swig_ldflags) +libguile_comedi_la_CXXFLAGS = \ + $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ + $(comedi_la_swig_cxxflags) guile/comedi.cc: gnuradio/comedi.scm gnuradio/comedi.scm: comedi.i -- cgit From 99dc38c8f81fe388b13bf46e3f53cc272765249e Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 24 Nov 2010 13:49:59 -0800 Subject: Consistently use TESTS += in conditionals --- gr-comedi/src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index a55bd175b..dd759d8a0 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -21,6 +21,7 @@ include $(top_srcdir)/Makefile.common +TESTS = EXTRA_DIST = run_tests.in AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) @@ -52,7 +53,7 @@ libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) if PYTHON ################################### # SWIG Python interface and library -TESTS = run_tests +TESTS += run_tests DISTCLEANFILES = run_tests TOP_SWIG_IFILES = \ -- cgit From d692a41f98e7b888c745efbb9fcbbb0400f39025 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 24 Nov 2010 17:29:11 -0800 Subject: Major Makefile.am housecleaning. Passes distcheck. Move all occurrences of swig_built_sources out of Makefile.am's. Move all SWIG related use of BUILT_SOURCES out of Makefile.am's. Clean up 'if PYTHON' conditionalization in gr-* Still left to do: fix Makefile.swig CLEANFILES and no_dist_files such that they remove exactly the generated files. --- gr-comedi/src/Makefile.am | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index dd759d8a0..47f689adb 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2005,2008,2009 Free Software Foundation, Inc. +# Copyright 2005,2008,2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -20,9 +20,12 @@ # include $(top_srcdir)/Makefile.common +include $(top_srcdir)/Makefile.swig TESTS = -EXTRA_DIST = run_tests.in +EXTRA_DIST += run_tests.in +DISTCLEANFILES += run_tests + AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) @@ -50,11 +53,8 @@ libgnuradio_comedi_la_LIBADD = \ libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) -if PYTHON ################################### -# SWIG Python interface and library -TESTS += run_tests -DISTCLEANFILES = run_tests +# SWIG interfaces and libraries TOP_SWIG_IFILES = \ comedi.i @@ -70,11 +70,6 @@ comedi_pythondir_category = \ comedi_la_swig_libadd = \ libgnuradio-comedi.la -include $(top_srcdir)/Makefile.swig - -# add some of the variables generated inside the Makefile.swig.gen -BUILT_SOURCES = $(swig_built_sources) - -# Do not distribute the output of SWIG -no_dist_files = $(swig_built_sources) +if PYTHON +TESTS += run_tests endif -- cgit From b005e7d9f481ed39591d97ef697621368e6505c0 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 24 Nov 2010 19:08:21 -0800 Subject: Update .gitignore's --- gr-comedi/src/.gitignore | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/.gitignore b/gr-comedi/src/.gitignore index d95b6dc4f..c43df1bab 100644 --- a/gr-comedi/src/.gitignore +++ b/gr-comedi/src/.gitignore @@ -10,3 +10,6 @@ /*.pyc /comedi.py /run_tests +/gnuradio +/guile +/python -- cgit From 0b5f66113f43d2ba94a1ca741b5ce65e1f9f2c02 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 3 Dec 2010 23:30:54 -0800 Subject: Rename libguile- to libguile-gnuradio- to match guile library naming convention. The stuff in gnuradio-core ends up with funky names, but that could be fixed by renaming gnuradio_core_filter.i -> core_filter.i etc. --- gr-comedi/src/comedi.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index 499ccc598..dadb57e90 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -72,7 +72,7 @@ class comedi_sink_s : public gr_sync_block { #if SWIGGUILE %scheme %{ -(load-extension "libguile-comedi" "scm_init_gnuradio_comedi_module") +(load-extension "libguile-gnuradio-comedi" "scm_init_gnuradio_comedi_module") %} %goops %{ -- cgit From 6df0423fe1880f5c33daa333604552ea68ac9593 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 3 Dec 2010 23:34:24 -0800 Subject: Regenerated Makefile.swig.gen's --- gr-comedi/src/Makefile.swig.gen | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 9b34dacce..cf55aa8ad 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -115,20 +115,20 @@ endif # end of if python if GUILE comedi_scmlib_LTLIBRARIES = \ - libguile-comedi.la -libguile_comedi_la_SOURCES = \ + libguile-gnuradio-comedi.la +libguile_gnuradio_comedi_la_SOURCES = \ guile/comedi.cc \ $(comedi_la_swig_sources) nobase_comedi_scm_DATA = \ gnuradio/comedi.scm \ gnuradio/comedi-primitive.scm -libguile_comedi_la_LIBADD = \ +libguile_gnuradio_comedi_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(comedi_la_swig_libadd) -libguile_comedi_la_LDFLAGS = \ +libguile_gnuradio_comedi_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(comedi_la_swig_ldflags) -libguile_comedi_la_CXXFLAGS = \ +libguile_gnuradio_comedi_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ -I$(top_builddir) \ $(comedi_la_swig_cxxflags) -- cgit From 08907ee94fb6c34531d57b988324c67c26c8b747 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 10 Dec 2010 16:15:40 -0800 Subject: Use load-extension-global instead of load-extension --- gr-comedi/src/comedi.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index dadb57e90..36865afbe 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -72,7 +72,7 @@ class comedi_sink_s : public gr_sync_block { #if SWIGGUILE %scheme %{ -(load-extension "libguile-gnuradio-comedi" "scm_init_gnuradio_comedi_module") +(load-extension-global "libguile-gnuradio-comedi" "scm_init_gnuradio_comedi_module") %} %goops %{ -- cgit From 7f622fef32225552811ccffa6b55fa6b2ad08f23 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 23 Jul 2011 23:17:06 -0700 Subject: comedi: cmake build support for gr-comedi component (linux only) --- gr-comedi/src/CMakeLists.txt | 107 +++++++++++++++++++++++++++++++++++++++ gr-comedi/src/comedi_sink_s.cc | 2 +- gr-comedi/src/comedi_source_s.cc | 2 +- 3 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 gr-comedi/src/CMakeLists.txt (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt new file mode 100644 index 000000000..f9dfb169d --- /dev/null +++ b/gr-comedi/src/CMakeLists.txt @@ -0,0 +1,107 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Setup the include and linker paths +######################################################################## +INCLUDE_DIRECTORIES( + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GR_COMEDI_INCLUDE_DIRS} +) + +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) + +INCLUDE_DIRECTORIES(${COMEDI_INCLUDE_DIRS}) +LINK_DIRECTORIES(${COMEDI_LIBRARY_DIRS}) + +######################################################################## +# Setup library +######################################################################## +LIST(APPEND gr_comedi_sources + ${comedii_viterbi_mux_cc} + comedi_sink_s.cc + comedi_source_s.cc + gri_comedi.cc +) + +LIST(APPEND comedi_libs + gnuradio-core + ${Boost_LIBRARIES} + ${COMEDI_LIBRARIES} +) + +ADD_LIBRARY(gnuradio-comedi SHARED ${gr_comedi_sources}) +TARGET_LINK_LIBRARIES(gnuradio-comedi ${comedi_libs}) +SET_TARGET_PROPERTIES(gnuradio-comedi PROPERTIES DEFINE_SYMBOL "gnuradio_comedi_EXPORTS") +SET_TARGET_PROPERTIES(gnuradio-comedi PROPERTIES SOVERSION ${LIBVER}) + +INSTALL(TARGETS gnuradio-comedi + LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "comedi_runtime" # .so/.dylib file + ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "comedi_devel" # .lib file + RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "comedi_runtime" # .dll file +) + +######################################################################## +# Setup swig generation +######################################################################## +IF(ENABLE_PYTHON) +INCLUDE(GrPython) +INCLUDE(GrSwig) + +SET(GR_SWIG_INCLUDE_DIRS + ${GR_COMEDI_INCLUDE_DIRS} + ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} +) + +SET(GR_SWIG_LIBRARIES gnuradio-comedi) + +GR_SWIG_MAKE(comedi comedi.i) + +GR_SWIG_INSTALL( + TARGETS comedi + DESTINATION ${GR_PYTHON_DIR}/gnuradio + COMPONENT "comedi_python" +) + +INSTALL( + FILES comedi.i + DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig + COMPONENT "comedi_swig" +) + +ENDIF(ENABLE_PYTHON) + +######################################################################## +# Handle the unit tests +######################################################################## +IF(ENABLE_TESTING AND ENABLE_PYTHON) +INCLUDE(GrTest) +FILE(GLOB py_qa_test_files "qa_*.py") +FOREACH(py_qa_test_file ${py_qa_test_files}) + GET_FILENAME_COMPONENT(py_qa_test_name ${py_qa_test_file} NAME_WE) + SET(GR_TEST_PYTHON_DIRS + ${CMAKE_BINARY_DIR}/gnuradio-core/src/python + ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig + ${CMAKE_BINARY_DIR}/gr-comedi/src + ) + SET(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-comedi) + GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) +ENDFOREACH(py_qa_test_file) +ENDIF(ENABLE_TESTING AND ENABLE_PYTHON) diff --git a/gr-comedi/src/comedi_sink_s.cc b/gr-comedi/src/comedi_sink_s.cc index d4a668758..fc5c14931 100644 --- a/gr-comedi/src/comedi_sink_s.cc +++ b/gr-comedi/src/comedi_sink_s.cc @@ -88,7 +88,7 @@ comedi_sink_s::comedi_sink_s (int sampling_freq, comedi_cmd cmd; int ret; - ret = comedi_get_cmd_generic_timed(d_dev,d_subdevice,&cmd,(unsigned int)(1e9/sampling_freq)); + ret = comedi_get_cmd_generic_timed(d_dev,d_subdevice,&cmd,d_n_chan,(unsigned int)(1e9/sampling_freq)); if(ret<0) bail ("comedi_get_cmd_generic_timed", comedi_errno()); diff --git a/gr-comedi/src/comedi_source_s.cc b/gr-comedi/src/comedi_source_s.cc index a52d04e2a..5d9f2f6b0 100644 --- a/gr-comedi/src/comedi_source_s.cc +++ b/gr-comedi/src/comedi_source_s.cc @@ -85,7 +85,7 @@ comedi_source_s::comedi_source_s (int sampling_freq, comedi_cmd cmd; int ret; - ret = comedi_get_cmd_generic_timed(d_dev,d_subdevice,&cmd,(unsigned int)(1e9/sampling_freq)); + ret = comedi_get_cmd_generic_timed(d_dev,d_subdevice,&cmd,d_n_chan,(unsigned int)(1e9/sampling_freq)); if(ret<0) bail ("comedi_get_cmd_generic_timed", comedi_errno()); -- cgit From 2ac512b0d209600834425141f18d111524ad1348 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 23 Jul 2011 23:35:44 -0700 Subject: video-sdl: cmake build support for gr-video-sdl component (unix only) --- gr-comedi/src/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index f9dfb169d..af1fc372c 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -35,7 +35,6 @@ LINK_DIRECTORIES(${COMEDI_LIBRARY_DIRS}) # Setup library ######################################################################## LIST(APPEND gr_comedi_sources - ${comedii_viterbi_mux_cc} comedi_sink_s.cc comedi_source_s.cc gri_comedi.cc @@ -58,6 +57,16 @@ INSTALL(TARGETS gnuradio-comedi RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "comedi_runtime" # .dll file ) +######################################################################## +# Install public header files +######################################################################## +INSTALL(FILES + comedi_sink_s.h + comedi_source_s.h + DESTINATION ${GR_INCLUDE_DIR}/gnuradio + COMPONENT "comedi_devel" +) + ######################################################################## # Setup swig generation ######################################################################## -- cgit From 71c0f14a46f85027b95f2f5f6d3d219cc9e3783e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 8 Oct 2011 17:11:12 -0700 Subject: gr: the CMakeLists.txt took a chill pill --- gr-comedi/src/CMakeLists.txt | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index af1fc372c..e963f9586 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -20,38 +20,38 @@ ######################################################################## # Setup the include and linker paths ######################################################################## -INCLUDE_DIRECTORIES( +include_directories( ${GNURADIO_CORE_INCLUDE_DIRS} ${GR_COMEDI_INCLUDE_DIRS} ) -INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) -LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) -INCLUDE_DIRECTORIES(${COMEDI_INCLUDE_DIRS}) -LINK_DIRECTORIES(${COMEDI_LIBRARY_DIRS}) +include_directories(${COMEDI_INCLUDE_DIRS}) +link_directories(${COMEDI_LIBRARY_DIRS}) ######################################################################## # Setup library ######################################################################## -LIST(APPEND gr_comedi_sources +list(APPEND gr_comedi_sources comedi_sink_s.cc comedi_source_s.cc gri_comedi.cc ) -LIST(APPEND comedi_libs +list(APPEND comedi_libs gnuradio-core ${Boost_LIBRARIES} ${COMEDI_LIBRARIES} ) -ADD_LIBRARY(gnuradio-comedi SHARED ${gr_comedi_sources}) -TARGET_LINK_LIBRARIES(gnuradio-comedi ${comedi_libs}) -SET_TARGET_PROPERTIES(gnuradio-comedi PROPERTIES DEFINE_SYMBOL "gnuradio_comedi_EXPORTS") -SET_TARGET_PROPERTIES(gnuradio-comedi PROPERTIES SOVERSION ${LIBVER}) +add_library(gnuradio-comedi SHARED ${gr_comedi_sources}) +target_link_libraries(gnuradio-comedi ${comedi_libs}) +set_target_properties(gnuradio-comedi PROPERTIES DEFINE_SYMBOL "gnuradio_comedi_EXPORTS") +set_target_properties(gnuradio-comedi PROPERTIES SOVERSION ${LIBVER}) -INSTALL(TARGETS gnuradio-comedi +install(TARGETS gnuradio-comedi LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "comedi_runtime" # .so/.dylib file ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "comedi_devel" # .lib file RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "comedi_runtime" # .dll file @@ -60,7 +60,7 @@ INSTALL(TARGETS gnuradio-comedi ######################################################################## # Install public header files ######################################################################## -INSTALL(FILES +install(FILES comedi_sink_s.h comedi_source_s.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio @@ -70,16 +70,16 @@ INSTALL(FILES ######################################################################## # Setup swig generation ######################################################################## -IF(ENABLE_PYTHON) -INCLUDE(GrPython) -INCLUDE(GrSwig) +if(ENABLE_PYTHON) +include(GrPython) +include(GrSwig) -SET(GR_SWIG_INCLUDE_DIRS +set(GR_SWIG_INCLUDE_DIRS ${GR_COMEDI_INCLUDE_DIRS} ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} ) -SET(GR_SWIG_LIBRARIES gnuradio-comedi) +set(GR_SWIG_LIBRARIES gnuradio-comedi) GR_SWIG_MAKE(comedi comedi.i) @@ -89,28 +89,28 @@ GR_SWIG_INSTALL( COMPONENT "comedi_python" ) -INSTALL( +install( FILES comedi.i DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig COMPONENT "comedi_swig" ) -ENDIF(ENABLE_PYTHON) +endif(ENABLE_PYTHON) ######################################################################## # Handle the unit tests ######################################################################## -IF(ENABLE_TESTING AND ENABLE_PYTHON) -INCLUDE(GrTest) -FILE(GLOB py_qa_test_files "qa_*.py") -FOREACH(py_qa_test_file ${py_qa_test_files}) - GET_FILENAME_COMPONENT(py_qa_test_name ${py_qa_test_file} NAME_WE) - SET(GR_TEST_PYTHON_DIRS +if(ENABLE_TESTING AND ENABLE_PYTHON) +include(GrTest) +file(GLOB py_qa_test_files "qa_*.py") +foreach(py_qa_test_file ${py_qa_test_files}) + get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) + set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/gnuradio-core/src/python ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig ${CMAKE_BINARY_DIR}/gr-comedi/src ) - SET(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-comedi) + set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-comedi) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) -ENDFOREACH(py_qa_test_file) -ENDIF(ENABLE_TESTING AND ENABLE_PYTHON) +endforeach(py_qa_test_file) +endif(ENABLE_TESTING AND ENABLE_PYTHON) -- cgit From faf7dea043728056bed5a7eb0529162eb7d9f932 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 23 Oct 2011 15:43:03 -0700 Subject: the libraries --- gr-comedi/src/CMakeLists.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index e963f9586..2573940dc 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -48,14 +48,7 @@ list(APPEND comedi_libs add_library(gnuradio-comedi SHARED ${gr_comedi_sources}) target_link_libraries(gnuradio-comedi ${comedi_libs}) -set_target_properties(gnuradio-comedi PROPERTIES DEFINE_SYMBOL "gnuradio_comedi_EXPORTS") -set_target_properties(gnuradio-comedi PROPERTIES SOVERSION ${LIBVER}) - -install(TARGETS gnuradio-comedi - LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "comedi_runtime" # .so/.dylib file - ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "comedi_devel" # .lib file - RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "comedi_runtime" # .dll file -) +GR_LIBRARY_FOO(gnuradio-comedi RUNTIME_COMPONENT "comedi_runtime" DEVEL_COMPONENT "comedi_devel") ######################################################################## # Install public header files -- cgit From 6c50cfa96ee15892c67e56585ded57b0fe405f59 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 27 Nov 2011 16:41:29 -0500 Subject: docs: added python doxygen docs to gr-comedi --- gr-comedi/src/CMakeLists.txt | 3 +++ gr-comedi/src/comedi.i | 3 +++ gr-comedi/src/comedi_sink_s.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 2573940dc..bbf0c9bb2 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -72,6 +72,9 @@ set(GR_SWIG_INCLUDE_DIRS ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} ) +set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/comedi_swig_doc.i) +set(GR_SWIG_DOC_DIRS ${GR_COMEDI_INCLUDE_DIRS}) + set(GR_SWIG_LIBRARIES gnuradio-comedi) GR_SWIG_MAKE(comedi comedi.i) diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index 36865afbe..a15b4d3b9 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -22,6 +22,9 @@ %include "gnuradio.i" // the common stuff +//load generated python docstrings +%include "comedi_swig_doc.i" + %{ #include "comedi_sink_s.h" #include "comedi_source_s.h" diff --git a/gr-comedi/src/comedi_sink_s.h b/gr-comedi/src/comedi_sink_s.h index 22f0428d4..b36d41304 100644 --- a/gr-comedi/src/comedi_sink_s.h +++ b/gr-comedi/src/comedi_sink_s.h @@ -31,7 +31,7 @@ class comedi_sink_s; typedef boost::shared_ptr comedi_sink_s_sptr; /*! - * \brief make an COMEDI sink. + * \brief make a COMEDI sink. * * \param sampling_freq sampling rate in Hz * \param dev COMEDI device name, e.g., "/dev/comedi0" -- cgit From 70ca9beab2c6c22eb9b98818fe1b69def41eb0db Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 27 Nov 2011 19:05:47 -0500 Subject: docs: forgot to have the generated .i files installed. --- gr-comedi/src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index bbf0c9bb2..bf6ff89c4 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -87,6 +87,7 @@ GR_SWIG_INSTALL( install( FILES comedi.i + ${CMAKE_CURRENT_BINARY_DIR}/comedi_swig_doc.i DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig COMPONENT "comedi_swig" ) -- cgit From 355dbf5b35e2c4ebbce6c5d7d1ef5a3b0f5610ce Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 27 Nov 2011 19:06:15 -0500 Subject: docs: Adding swig doc generation to Makefile.am files. --- gr-comedi/src/Makefile.am | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 47f689adb..86f013c90 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -59,6 +59,15 @@ libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) TOP_SWIG_IFILES = \ comedi.i +TOP_SWIG_DOC_IFILES = \ + comedi_swig_doc.i + +BUILT_SOURCES = \ + $(TOP_SWIG_DOC_IFILES) + +$(BUILT_SOURCES): + `echo "" > $@` + # Install so that they end up available as: # import gnuradio.comedi # This ends up at: -- cgit From cfea46699bd0450bc2e11b5ec44dae1f57af4dbc Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 27 Nov 2011 23:25:39 -0500 Subject: docs: better use of BUILT_SOURCES so I'm not overriding the standard build instructions for it. --- gr-comedi/src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 86f013c90..15e1124ed 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -62,10 +62,10 @@ TOP_SWIG_IFILES = \ TOP_SWIG_DOC_IFILES = \ comedi_swig_doc.i -BUILT_SOURCES = \ +BUILT_SOURCES += \ $(TOP_SWIG_DOC_IFILES) -$(BUILT_SOURCES): +$(TOP_SWIG_DOC_IFILES): `echo "" > $@` # Install so that they end up available as: -- cgit From 0408e48c26bfae60d4973e1f1128ac419d6268a2 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 28 Nov 2011 01:11:27 -0500 Subject: docs: installing generated _doc.i files under autotools. --- gr-comedi/src/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 15e1124ed..8aecaf335 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -68,6 +68,9 @@ BUILT_SOURCES += \ $(TOP_SWIG_DOC_IFILES): `echo "" > $@` +install-data-local: + cp -p $(TOP_SWIG_DOC_IFILES) $(swigincludedir) + # Install so that they end up available as: # import gnuradio.comedi # This ends up at: -- cgit From a2de55ca27d20ee6bb6c7114469c4ea0b599ae92 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 28 Nov 2011 15:44:12 -0500 Subject: docs: more appropriate variable to use when setting the include/headers directory. --- gr-comedi/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index bf6ff89c4..490a24e4b 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -73,7 +73,7 @@ set(GR_SWIG_INCLUDE_DIRS ) set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/comedi_swig_doc.i) -set(GR_SWIG_DOC_DIRS ${GR_COMEDI_INCLUDE_DIRS}) +set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_BINARY_DIR}) set(GR_SWIG_LIBRARIES gnuradio-comedi) -- cgit From 2d88dd48d9563a561b5c851555c2ff4714fa66e3 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Wed, 30 Nov 2011 14:45:19 -0500 Subject: docs: fixing variable for location of header files (SOURCE not BINARY). --- gr-comedi/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 490a24e4b..6ad14737b 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -73,7 +73,7 @@ set(GR_SWIG_INCLUDE_DIRS ) set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/comedi_swig_doc.i) -set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_BINARY_DIR}) +set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}) set(GR_SWIG_LIBRARIES gnuradio-comedi) -- cgit From fe2e6f8054ed8c6a19fe893553a0d05ce855179e Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 4 Dec 2011 11:10:13 -0500 Subject: docs: better install of swig docs .i files since we actually have a variable to take care of it already. --- gr-comedi/src/Makefile.am | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 8aecaf335..d6a287db5 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -65,12 +65,12 @@ TOP_SWIG_DOC_IFILES = \ BUILT_SOURCES += \ $(TOP_SWIG_DOC_IFILES) +EXTRA_DIST += \ + $(TOP_SWIG_DOC_IFILES) + $(TOP_SWIG_DOC_IFILES): `echo "" > $@` -install-data-local: - cp -p $(TOP_SWIG_DOC_IFILES) $(swigincludedir) - # Install so that they end up available as: # import gnuradio.comedi # This ends up at: @@ -82,6 +82,10 @@ comedi_pythondir_category = \ comedi_la_swig_libadd = \ libgnuradio-comedi.la +# additional SWIG files to be installed +comedi_swig_swiginclude_headers = \ + $(TOP_SWIG_DOC_IFILES) + if PYTHON TESTS += run_tests endif -- cgit From 0370cfc853b00626b85e1b9d4491b92ca775eb3d Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 5 Dec 2011 10:58:38 -0500 Subject: docs: more fixes for generated swig files. This worked before the merge, but this forces the build system to generate these before processing the other swig files. --- gr-comedi/src/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index d6a287db5..77211b7f9 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -57,6 +57,7 @@ libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) # SWIG interfaces and libraries TOP_SWIG_IFILES = \ + $(TOP_SWIG_DOC_IFILES) \ comedi.i TOP_SWIG_DOC_IFILES = \ -- cgit From 67d0b6b38b25166557de48a8e829c303d95ddfbc Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 6 Dec 2011 19:59:59 -0500 Subject: docs: fixes some warnings. There is way too much institutional knowledge in these makefiles now. Another reason I'm glad we're going to cmake, which is being kept more sane as all of the problems are already known. --- gr-comedi/src/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 77211b7f9..5ea0729e1 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -56,13 +56,13 @@ libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) ################################### # SWIG interfaces and libraries +TOP_SWIG_DOC_IFILES = \ + comedi_swig_doc.i + TOP_SWIG_IFILES = \ $(TOP_SWIG_DOC_IFILES) \ comedi.i -TOP_SWIG_DOC_IFILES = \ - comedi_swig_doc.i - BUILT_SOURCES += \ $(TOP_SWIG_DOC_IFILES) -- cgit From 00420d32081d8252bb37142b2be19a8a7c4dc4c4 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 8 Dec 2011 13:48:48 -0800 Subject: Removed autotools, gr-waveform, some cleanup Nick Foster owes Nick Corgan a six-pack of beer! --- gr-comedi/src/.gitignore | 15 ----- gr-comedi/src/Makefile.am | 92 ------------------------- gr-comedi/src/Makefile.swig.gen | 145 ---------------------------------------- gr-comedi/src/run_tests.in | 10 --- 4 files changed, 262 deletions(-) delete mode 100644 gr-comedi/src/.gitignore delete mode 100644 gr-comedi/src/Makefile.am delete mode 100644 gr-comedi/src/Makefile.swig.gen delete mode 100644 gr-comedi/src/run_tests.in (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/.gitignore b/gr-comedi/src/.gitignore deleted file mode 100644 index c43df1bab..000000000 --- a/gr-comedi/src/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/comedi.cc -/*.pyc -/comedi.py -/run_tests -/gnuradio -/guile -/python diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am deleted file mode 100644 index 5ea0729e1..000000000 --- a/gr-comedi/src/Makefile.am +++ /dev/null @@ -1,92 +0,0 @@ -# -# Copyright 2005,2008,2009,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += run_tests.in -DISTCLEANFILES += run_tests - - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) - -# C/C++ headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - comedi_sink_s.h \ - comedi_source_s.h - -noinst_HEADERS = \ - gri_comedi.h - -noinst_PYTHON = \ - qa_comedi.py - -lib_LTLIBRARIES = libgnuradio-comedi.la - -libgnuradio_comedi_la_SOURCES = \ - comedi_sink_s.cc \ - comedi_source_s.cc \ - gri_comedi.cc - -libgnuradio_comedi_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(COMEDI_LIBS) - -libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -################################### -# SWIG interfaces and libraries - -TOP_SWIG_DOC_IFILES = \ - comedi_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - comedi.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.comedi -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio -comedi_pythondir_category = \ - gnuradio - -# additional libraries for linking with the SWIG-generated library -comedi_la_swig_libadd = \ - libgnuradio-comedi.la - -# additional SWIG files to be installed -comedi_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -if PYTHON -TESTS += run_tests -endif diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen deleted file mode 100644 index cf55aa8ad..000000000 --- a/gr-comedi/src/Makefile.swig.gen +++ /dev/null @@ -1,145 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -# Makefile.swig.gen for comedi.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/comedi -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/comedi -## -## The following can be overloaded to change the install location, but -## this has to be done in the including Makefile.am -before- -## Makefile.swig is included. - -comedi_pythondir_category ?= gnuradio/comedi -comedi_pylibdir_category ?= $(comedi_pythondir_category) -comedi_pythondir = $(pythondir)/$(comedi_pythondir_category) -comedi_pylibdir = $(pyexecdir)/$(comedi_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -comedi_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/comedi -# FIXME: determince whether these should be installed with gnuradio. -comedi_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -comedi_swigincludedir = $(swigincludedir) - -## This is a template file for a "generated" Makefile addition (in -## this case, "Makefile.swig.gen"). By including the top-level -## Makefile.swig, this file will be used to generate the SWIG -## dependencies. Assign the variable TOP_SWIG_FILES to be the list of -## SWIG .i files to generated wrappings for; there can be more than 1 -## so long as the names are unique (no sorting is done on the -## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i -## file will generate .cc, .py, and possibly .h files -- meaning that -## all of these files will have the same base name (that provided for -## the SWIG .i file). -## -## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the -## right thing. For more info, see < -## http://sources.redhat.com/automake/automake.html#Multiple-Outputs > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -comedi_swiginclude_HEADERS = \ - comedi.i \ - $(comedi_swiginclude_headers) - -if PYTHON -comedi_pylib_LTLIBRARIES = \ - _comedi.la - -_comedi_la_SOURCES = \ - python/comedi.cc \ - $(comedi_la_swig_sources) - -comedi_python_PYTHON = \ - comedi.py \ - $(comedi_python) - -_comedi_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(comedi_la_swig_libadd) - -_comedi_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(comedi_la_swig_ldflags) - -_comedi_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(comedi_la_swig_cxxflags) - -python/comedi.cc: comedi.py -comedi.py: comedi.i - -# Include the python dependencies for this file --include python/comedi.d - -endif # end of if python - -if GUILE - -comedi_scmlib_LTLIBRARIES = \ - libguile-gnuradio-comedi.la -libguile_gnuradio_comedi_la_SOURCES = \ - guile/comedi.cc \ - $(comedi_la_swig_sources) -nobase_comedi_scm_DATA = \ - gnuradio/comedi.scm \ - gnuradio/comedi-primitive.scm -libguile_gnuradio_comedi_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(comedi_la_swig_libadd) -libguile_gnuradio_comedi_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(comedi_la_swig_ldflags) -libguile_gnuradio_comedi_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(comedi_la_swig_cxxflags) - -guile/comedi.cc: gnuradio/comedi.scm -gnuradio/comedi.scm: comedi.i -gnuradio/comedi-primitive.scm: gnuradio/comedi.scm - -# Include the guile dependencies for this file --include guile/comedi.d - -endif # end of GUILE - - diff --git a/gr-comedi/src/run_tests.in b/gr-comedi/src/run_tests.in deleted file mode 100644 index 84fefbaca..000000000 --- a/gr-comedi/src/run_tests.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# 1st parameter is absolute path to component source directory -# 2nd parameter is absolute path to component build directory -# 3rd parameter is path to Python QA directory - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-comedi \ - @abs_top_builddir@/gr-comedi \ - @srcdir@ -- cgit From 2bf64459036916258dcf3269cec47904fdeba8f6 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 1 Apr 2012 16:13:42 -0400 Subject: Removes all references to guile and scheme, which are no longer needed. The remaining pmt_serial_tags.scm is parsed by Python already. Future modifications could change this format to not confuse the point. --- gr-comedi/src/comedi.i | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index a15b4d3b9..6fa4438fc 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -72,13 +72,3 @@ class comedi_sink_s : public gr_sync_block { public: ~comedi_sink_s (); }; - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-comedi" "scm_init_gnuradio_comedi_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif -- cgit From f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 13 Apr 2012 18:36:53 -0400 Subject: Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future. The sed script was provided by Moritz Fischer. --- gr-comedi/src/CMakeLists.txt | 8 ++++---- gr-comedi/src/comedi.i | 8 ++++---- gr-comedi/src/comedi_sink_s.cc | 10 +++++----- gr-comedi/src/comedi_sink_s.h | 10 +++++----- gr-comedi/src/comedi_source_s.cc | 12 ++++++------ gr-comedi/src/comedi_source_s.h | 10 +++++----- gr-comedi/src/gri_comedi.cc | 8 ++++---- gr-comedi/src/gri_comedi.h | 8 ++++---- gr-comedi/src/qa_comedi.py | 12 ++++++------ 9 files changed, 43 insertions(+), 43 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 6ad14737b..1d3d16908 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index 6fa4438fc..d3660580a 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2009 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-comedi/src/comedi_sink_s.cc b/gr-comedi/src/comedi_sink_s.cc index fc5c14931..de1decfb6 100644 --- a/gr-comedi/src/comedi_sink_s.cc +++ b/gr-comedi/src/comedi_sink_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,7 +40,7 @@ * Feedback is welcome! --SF */ -static std::string +static std::string default_device_name () { return "/dev/comedi0"; diff --git a/gr-comedi/src/comedi_sink_s.h b/gr-comedi/src/comedi_sink_s.h index b36d41304..94d39710c 100644 --- a/gr-comedi/src/comedi_sink_s.h +++ b/gr-comedi/src/comedi_sink_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -78,7 +78,7 @@ class comedi_sink_s : public gr_sync_block { public: ~comedi_sink_s (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-comedi/src/comedi_source_s.cc b/gr-comedi/src/comedi_source_s.cc index 5d9f2f6b0..517f1440b 100644 --- a/gr-comedi/src/comedi_source_s.cc +++ b/gr-comedi/src/comedi_source_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -38,7 +38,7 @@ // FIXME these should query some kind of user preference -static std::string +static std::string default_device_name () { return "/dev/comedi0"; @@ -197,7 +197,7 @@ comedi_source_s::work (int noutput_items, int o_idx = noutput_items-work_left/d_n_chan/sizeof(sampl_t)+(i-d_buf_back/sizeof(sampl_t))/d_n_chan; if (output_items[chan]) - ((short*)(output_items[chan]))[o_idx] = + ((short*)(output_items[chan]))[o_idx] = (int)pbuf[i%(d_buffer_size/sizeof(sampl_t))] - 32767; } diff --git a/gr-comedi/src/comedi_source_s.h b/gr-comedi/src/comedi_source_s.h index c406f274b..b9fde4c1e 100644 --- a/gr-comedi/src/comedi_source_s.h +++ b/gr-comedi/src/comedi_source_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -79,7 +79,7 @@ class comedi_source_s : public gr_sync_block { public: ~comedi_source_s (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-comedi/src/gri_comedi.cc b/gr-comedi/src/gri_comedi.cc index 15caac4d4..97b3ccd3e 100644 --- a/gr-comedi/src/gri_comedi.cc +++ b/gr-comedi/src/gri_comedi.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-comedi/src/gri_comedi.h b/gr-comedi/src/gri_comedi.h index 410db842d..571a41180 100644 --- a/gr-comedi/src/gri_comedi.h +++ b/gr-comedi/src/gri_comedi.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-comedi/src/qa_comedi.py b/gr-comedi/src/qa_comedi.py index e690dfa19..a407ab62b 100755 --- a/gr-comedi/src/qa_comedi.py +++ b/gr-comedi/src/qa_comedi.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import comedi @@ -35,6 +35,6 @@ class qa_comedi (gr_unittest.TestCase): """Just see if we can import the module... They may not have COMEDI library, etc. Don't try to run anything""" pass - + if __name__ == '__main__': gr_unittest.main () -- cgit From 06c325cb925555d1864d67db20490eb67402868d Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Tue, 3 Jul 2012 14:22:41 -0700 Subject: swig: added GR_SWIG_TARGET_DEPS core_swig to other swig builds I have not encountered an issue, however this is the correct thing to do. Now individual components swig builds depend on the gr core swig target. Conflicts: gr-filter/swig/CMakeLists.txt --- gr-comedi/src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 1d3d16908..5291e4d90 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -67,6 +67,8 @@ if(ENABLE_PYTHON) include(GrPython) include(GrSwig) +set(GR_SWIG_TARGET_DEPS core_swig) + set(GR_SWIG_INCLUDE_DIRS ${GR_COMEDI_INCLUDE_DIRS} ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} -- cgit From 32cad29dc50d26af8e7a34b040d9d2657017e5bb Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 3 Nov 2012 14:02:49 -0700 Subject: gr: added python -B everywhere for clean source tree --- gr-comedi/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 5291e4d90..8c4834115 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -110,6 +110,6 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gr-comedi/src ) set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-comedi) - GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) + GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING AND ENABLE_PYTHON) -- cgit From 37f752257d7fc336de1fe85a5a83134e66441e6e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 13 Nov 2012 17:04:16 -0800 Subject: gr: set a common GR_TEST_TARGET_DEPS for all module unit tests Each unit test shares common dependencies, but we have been neglecting to set these. In this changeset, we set one top level GR_TEST_TARGET_DEPS, and simply append module-specific dependencies for each test. This also helps to fix QA tests on windows which were missing the dependencies list. Conflicts: gr-analog/python/CMakeLists.txt gr-blocks/python/CMakeLists.txt --- gr-comedi/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 8c4834115..0ef429a7d 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -109,7 +109,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig ${CMAKE_BINARY_DIR}/gr-comedi/src ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-comedi) + list(APPEND GR_TEST_TARGET_DEPS gnuradio-comedi) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING AND ENABLE_PYTHON) -- cgit From c4c0ce97f4f5586548a603acc8c9721f416c5803 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 13 Nov 2012 17:31:45 -0800 Subject: gr: same change for common PYTHON test paths Conflicts: gr-analog/python/CMakeLists.txt gr-blocks/python/CMakeLists.txt --- gr-comedi/src/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 0ef429a7d..91bbf9212 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -100,16 +100,16 @@ endif(ENABLE_PYTHON) # Handle the unit tests ######################################################################## if(ENABLE_TESTING AND ENABLE_PYTHON) + +list(APPEND GR_TEST_PYTHON_DIRS + ${CMAKE_BINARY_DIR}/gr-comedi/src +) +list(APPEND GR_TEST_TARGET_DEPS gnuradio-comedi) + include(GrTest) file(GLOB py_qa_test_files "qa_*.py") foreach(py_qa_test_file ${py_qa_test_files}) get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) - set(GR_TEST_PYTHON_DIRS - ${CMAKE_BINARY_DIR}/gnuradio-core/src/python - ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig - ${CMAKE_BINARY_DIR}/gr-comedi/src - ) - list(APPEND GR_TEST_TARGET_DEPS gnuradio-comedi) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING AND ENABLE_PYTHON) -- cgit From b928f8bd0971429cc6ba8b4a09629b2b55f77947 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Wed, 12 Dec 2012 11:02:30 -0500 Subject: build: removing core_swig from GR_SWIG_TARGET_DEPS. Seems to have been the cause of the parallel build woes. --- gr-comedi/src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 91bbf9212..957eacaf2 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -67,8 +67,6 @@ if(ENABLE_PYTHON) include(GrPython) include(GrSwig) -set(GR_SWIG_TARGET_DEPS core_swig) - set(GR_SWIG_INCLUDE_DIRS ${GR_COMEDI_INCLUDE_DIRS} ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} -- cgit From e788c523d4f8de3efd64a64f148ac1bf25ea032d Mon Sep 17 00:00:00 2001 From: Michael L Dickens Date: Tue, 1 Jan 2013 21:42:23 -0500 Subject: Tweak INCLUDE dirs such that INCLUDE_DIRECTORIES and LINK_DIRECTORIES are ordered as: internal build and source for this component, other components (internal build and source, or already installed), non-project non-system dependencies (e.g., Qt, Boost, Python), system dependencies (e.g., CoreAudio). --- gr-comedi/src/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'gr-comedi/src') diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 957eacaf2..1d9dac2c4 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -21,15 +21,17 @@ # Setup the include and linker paths ######################################################################## include_directories( - ${GNURADIO_CORE_INCLUDE_DIRS} ${GR_COMEDI_INCLUDE_DIRS} + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GRUEL_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${COMEDI_INCLUDE_DIRS} ) -include_directories(${Boost_INCLUDE_DIRS}) -link_directories(${Boost_LIBRARY_DIRS}) - -include_directories(${COMEDI_INCLUDE_DIRS}) -link_directories(${COMEDI_LIBRARY_DIRS}) +link_directories( + ${Boost_LIBRARY_DIRS} + ${COMEDI_LIBRARY_DIRS} +) ######################################################################## # Setup library @@ -70,6 +72,8 @@ include(GrSwig) set(GR_SWIG_INCLUDE_DIRS ${GR_COMEDI_INCLUDE_DIRS} ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} + ${GRUEL_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ) set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/comedi_swig_doc.i) -- cgit