diff options
-rw-r--r-- | config/gr_guile.m4 | 6 | ||||
-rw-r--r-- | config/grc_gruel.m4 | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | gr-howto-write-a-block/Makefile.swig.gen.t | 2 | ||||
-rw-r--r-- | gr-howto-write-a-block/swig/Makefile.am | 10 | ||||
-rw-r--r-- | gr-howto-write-a-block/swig/Makefile.swig.gen | 2 | ||||
-rw-r--r-- | gr-howto-write-a-block/swig/howto.test | 2 | ||||
-rw-r--r-- | gruel/src/lib/pmt/Makefile.am | 8 | ||||
-rw-r--r-- | gruel/src/scheme/gnuradio/Makefile.am | 4 | ||||
-rw-r--r-- | gruel/src/scheme/gnuradio/gen-serial-tags.py | 53 | ||||
-rwxr-xr-x | gruel/src/scheme/gnuradio/gen-serial-tags.scm | 118 | ||||
-rw-r--r-- | volk/config/orc.m4 | 4 | ||||
-rw-r--r-- | volk/volk.pc.in | 2 |
13 files changed, 79 insertions, 138 deletions
diff --git a/config/gr_guile.m4 b/config/gr_guile.m4 index 4d8d61d434..b5879e0811 100644 --- a/config/gr_guile.m4 +++ b/config/gr_guile.m4 @@ -35,7 +35,11 @@ AC_DEFUN([GUILE_DEVEL],[ GUILE_PKLIBDIR="`${GUILE_CONFIG} info pkglibdir`" GUILE_PKDATADIR="`${GUILE_CONFIG} info pkgdatadir`/site" else - AC_MSG_ERROR([You need to install the guile development files (e.g., libguile-dev, guile-devel, etc.)!]) + dnl Only break on an error if we are using guile. + dnl This should be taken care of in gr_scripting.m4 and I don't know why it's not. + if test x${enable_guile} = xyes; then + AC_MSG_ERROR([You need to install the guile development files (e.g., libguile-dev, guile-devel, etc.)!]) + fi GUILE_CFLAGS="" GUILE_PKLIBDIR="" GUILE_LIBS="Wl,-Bsymbolic-functions -lguile -lgmp -lcrypt" diff --git a/config/grc_gruel.m4 b/config/grc_gruel.m4 index d8ac95fed6..7295714341 100644 --- a/config/grc_gruel.m4 +++ b/config/grc_gruel.m4 @@ -25,10 +25,6 @@ AC_DEFUN([GRC_GRUEL],[ dnl with : if the --with code didn't error out dnl yes : if the --enable code passed muster and all dependencies are met dnl no : otherwise - if test $passed = yes; then - dnl Don't do gruel if guile not available - GRC_CHECK_GUILE(gruel) - fi if test $passed != with; then dnl how and where to find INCLUDES and LA and such gruel_INCLUDES="\ diff --git a/configure.ac b/configure.ac index ff969c27fa..7546eb3025 100644 --- a/configure.ac +++ b/configure.ac @@ -276,7 +276,7 @@ CPPUNIT_INCLUDES=$CPPUNIT_CFLAGS AC_SUBST(CPPUNIT_INCLUDES) dnl see if GUILE is installed -AC_PATH_PROG(GUILE,guile) +dnl AC_PATH_PROG(GUILE,guile) dnl dnl We require the boost headers, thread lib and date_time lib. diff --git a/gr-howto-write-a-block/Makefile.swig.gen.t b/gr-howto-write-a-block/Makefile.swig.gen.t index 4d37e0e215..3c76ee4b40 100644 --- a/gr-howto-write-a-block/Makefile.swig.gen.t +++ b/gr-howto-write-a-block/Makefile.swig.gen.t @@ -33,7 +33,7 @@ ## this has to be done in the including Makefile.am -before- ## Makefile.swig is included. -@NAME@_pythondir_category ?= gnuradio/@NAME@ +@NAME@_pythondir_category ?= @NAME@ @NAME@_pylibdir_category ?= $(@NAME@_pythondir_category) @NAME@_pythondir = $(pythondir)/$(@NAME@_pythondir_category) @NAME@_pylibdir = $(pyexecdir)/$(@NAME@_pylibdir_category) diff --git a/gr-howto-write-a-block/swig/Makefile.am b/gr-howto-write-a-block/swig/Makefile.am index ba660f1b39..3260042351 100644 --- a/gr-howto-write-a-block/swig/Makefile.am +++ b/gr-howto-write-a-block/swig/Makefile.am @@ -36,6 +36,9 @@ TOP_SWIG_IFILES = \ # import howto # This ends up at: # ${prefix}/lib/python${python_version}/site-packages/$(modname) +howto_swig_pythondir_category = $(modname) + +# additional libraries for linking with the SWIG-generated library howto_swig_la_swig_libadd = \ $(top_builddir)/lib/libgnuradio-howto.la @@ -46,11 +49,10 @@ howto_swiginclude_headers = \ EXTRA_DIST = $(howto_swiginclude_headers) - if GUILE TESTS = run_guile_tests -EXTRA_DIST += $(nobase_guile_DATA) - nobase_guile_DATA = \ - gnuradio/howto.scm + gnuradio/howto_swig.scm endif + +EXTRA_DIST += $(nobase_guile_DATA) diff --git a/gr-howto-write-a-block/swig/Makefile.swig.gen b/gr-howto-write-a-block/swig/Makefile.swig.gen index 310cfb8da7..6b7be2185c 100644 --- a/gr-howto-write-a-block/swig/Makefile.swig.gen +++ b/gr-howto-write-a-block/swig/Makefile.swig.gen @@ -33,7 +33,7 @@ ## this has to be done in the including Makefile.am -before- ## Makefile.swig is included. -howto_swig_pythondir_category ?= gnuradio/howto_swig +howto_swig_pythondir_category ?= howto_swig howto_swig_pylibdir_category ?= $(howto_swig_pythondir_category) howto_swig_pythondir = $(pythondir)/$(howto_swig_pythondir_category) howto_swig_pylibdir = $(pyexecdir)/$(howto_swig_pylibdir_category) diff --git a/gr-howto-write-a-block/swig/howto.test b/gr-howto-write-a-block/swig/howto.test index ffe7251cd8..dc257a61e3 100644 --- a/gr-howto-write-a-block/swig/howto.test +++ b/gr-howto-write-a-block/swig/howto.test @@ -33,7 +33,7 @@ ;; Use our module -(use-modules (gnuradio howto)) +(use-modules (gnuradio howto_swig)) (define (vector-map f v) diff --git a/gruel/src/lib/pmt/Makefile.am b/gruel/src/lib/pmt/Makefile.am index 7a1f2e7d4a..0c8e12dc34 100644 --- a/gruel/src/lib/pmt/Makefile.am +++ b/gruel/src/lib/pmt/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2008,2009,2010 Free Software Foundation, Inc. +# Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -99,7 +99,7 @@ gen_sources_deps = $(core_generator) par_gen_command = PYTHONPATH=$(top_srcdir)/gruel/src/lib/pmt srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_unv.py include $(top_srcdir)/Makefile.par.gen -# Rule to create the build header file using GUILE +# Rule to create the build header file using python # Doesn't need parallel protections because there is a single target -$(PMT_SERIAL_TAGS_H): $(srcdir)/../../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../../scheme/gnuradio/pmt-serial-tags.scm - $(RUN_GUILE) $(srcdir)/../../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../../scheme/gnuradio/pmt-serial-tags.scm $(PMT_SERIAL_TAGS_H) +$(PMT_SERIAL_TAGS_H): $(top_srcdir)/gruel/src/scheme/gnuradio/gen-serial-tags.py $(top_srcdir)/gruel/src/scheme/gnuradio/pmt-serial-tags.scm + $(PYTHON) $^ $@ diff --git a/gruel/src/scheme/gnuradio/Makefile.am b/gruel/src/scheme/gnuradio/Makefile.am index 2f8e5c8d28..e7b6bf7443 100644 --- a/gruel/src/scheme/gnuradio/Makefile.am +++ b/gruel/src/scheme/gnuradio/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2007,2009,2010 Free Software Foundation, Inc. +# Copyright 2007,2009,2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -23,7 +23,7 @@ include $(top_srcdir)/Makefile.common #pkgdatadir = $(datadir)/gnuradio EXTRA_DIST += \ - gen-serial-tags.scm + gen-serial-tags.py # really scheme source files FIXME wrong location dist_pkgdata_DATA = \ diff --git a/gruel/src/scheme/gnuradio/gen-serial-tags.py b/gruel/src/scheme/gnuradio/gen-serial-tags.py new file mode 100644 index 0000000000..18e927beb5 --- /dev/null +++ b/gruel/src/scheme/gnuradio/gen-serial-tags.py @@ -0,0 +1,53 @@ +""" +// +// 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 this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// +// THIS FILE IS MACHINE GENERATED FROM %s. DO NOT EDIT BY HAND. +// See %s for additional commentary. +// + +#ifndef INCLUDED_PMT_SERIAL_TAGS_H +#define INCLUDED_PMT_SERIAL_TAGS_H + +enum pst_tags { +%s +}; +#endif /* INCLUDED_PMT_SERIAL_TAGS_H */ +""" + +import sys, os, re + +if __name__ == '__main__': + if len(sys.argv) != 3: + print "Usage %s <input_scm_file> <output_hdr_file>"%__file__ + exit() + input_scm_file, output_hdr_file = sys.argv[1:] + enums = list() + for line in open(input_scm_file).readlines(): + match = re.match('^\s*\(define\s+([\w|-]+)\s+#x([0-9a-fA-F]+)\)', line) + if not match: continue + name, value = match.groups() + name = name.upper().replace('-', '_') + enums.append(' %s = 0x%s'%(name, value)) + open(output_hdr_file, 'w').write(__doc__%( + os.path.basename(__file__), + os.path.basename(input_scm_file), + ',\n'.join(enums), + )) diff --git a/gruel/src/scheme/gnuradio/gen-serial-tags.scm b/gruel/src/scheme/gnuradio/gen-serial-tags.scm deleted file mode 100755 index 7b90872288..0000000000 --- a/gruel/src/scheme/gnuradio/gen-serial-tags.scm +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/guile \ --e main -s -!# -;;; -*-scheme-*- -;;; -;;; Copyright 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 this program; if not, write to the Free Software Foundation, Inc., -;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -;;; - -(use-modules (ice-9 format)) - -(defmacro when (pred . body) - `(if ,pred (begin ,@body) #f)) - -;; ---------------------------------------------------------------- - -(define (main args) - - (define (usage) - (format 0 - "usage: ~a <pmt-serial-tags.scm> <pmt_serial_tags.h>~%" - (car args))) - - (when (not (= (length args) 3)) - (usage) - (format 0 "args: ~s~%" args) - (exit 1)) - - (let ((i-file (open-input-file (cadr args))) - (h-file (open-output-file (caddr args)))) - - (write-header-comment h-file "// ") - (display "#ifndef INCLUDED_PMT_SERIAL_TAGS_H\n" h-file) - (display "#define INCLUDED_PMT_SERIAL_TAGS_H\n" h-file) - (newline h-file) - (display "enum pst_tags {\n" h-file) - - (for-each-in-file i-file - (lambda (form) - (let* ((name (cadr form)) - (c-name (string-upcase (c-ify name))) - (value (caddr form))) - ;;(format h-file "static const int ~a\t= 0x~x;~%" c-name value) - (format h-file " ~a\t= 0x~x,~%" c-name value)))) - - (display "};\n" h-file) - (display "#endif\n" h-file))) - -(define (c-ify name) - (list->string (map (lambda (c) - (if (eqv? c #\-) #\_ c)) - (string->list (symbol->string name))))) - - -(define (write-header-comment o-port prefix) - (for-each (lambda (comment) - (format o-port "~a~a~%" prefix comment)) - header-comment)) - -(define header-comment - '( - "" - "Copyright 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 this program; if not, write to the Free Software Foundation, Inc.," - "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - "" - "" - "THIS FILE IS MACHINE GENERATED FROM pmt-serial-tags.scm. DO NOT EDIT BY HAND." - "See pmt-serial-tags.scm for additional commentary." - "")) - - - -(define (for-each-in-file file f) - (let ((port (if (port? file) - file - (open-input-file file)))) - (letrec - ((loop - (lambda (port form) - (cond ((eof-object? form) - (when (not (eq? port file)) - (close-input-port port)) - #t) - (else - (f form) - (set! form #f) ; for GC - (loop port (read port))))))) - (loop port (read port))))) diff --git a/volk/config/orc.m4 b/volk/config/orc.m4 index df0f3d6f33..d17160a9a0 100644 --- a/volk/config/orc.m4 +++ b/volk/config/orc.m4 @@ -22,6 +22,7 @@ AC_DEFUN([ORC_CHECK], AC_SUBST(ORC_CFLAGS) LV_HAVE_ORC=yes LV_HAVE_ORCC=yes + LV_ORC_PKGCONFIG="-lvolk_orc" if test "x$cross_compiling" = "xyes" ; then LV_HAVE_ORCC=no fi @@ -32,14 +33,17 @@ AC_DEFUN([ORC_CHECK], AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) LV_HAVE_ORC=no LV_HAVE_ORCC=no + LV_ORC_PKGCONFIG="" ]) else AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) LV_HAVE_ORC=no LV_HAVE_ORCC=no + LV_ORC_PKGCONFIG="" fi AM_CONDITIONAL(LV_HAVE_ORC, [test "x$LV_HAVE_ORC" = "xyes"]) AM_CONDITIONAL(LV_HAVE_ORCC, [test "x$LV_HAVE_ORCC" = "xyes"]) + AC_SUBST(LV_ORC_PKGCONFIG) ])) AC_DEFUN([ORC_OUTPUT], diff --git a/volk/volk.pc.in b/volk/volk.pc.in index b03dbdada5..85425ba647 100644 --- a/volk/volk.pc.in +++ b/volk/volk.pc.in @@ -10,6 +10,6 @@ Name: volk Description: VOLK.. Vector Optimized Library of Kernels Requires: Version: @VERSION@ -Libs: -lvolk -lvolk_runtime -lvolk_orc +Libs: -lvolk -lvolk_runtime @LV_ORC_PKGCONFIG@ Cflags: -I${includedir} ${LV_CXXFLAGS} |