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. --- gruel/Makefile.am | 4 ++-- gruel/src/include/gruel/Makefile.am | 5 ++--- gruel/src/lib/pmt/Makefile.am | 2 +- gruel/src/scheme/gnuradio/Makefile.am | 8 +++++--- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'gruel') diff --git a/gruel/Makefile.am b/gruel/Makefile.am index 93f56a7db..c43e461f2 100644 --- a/gruel/Makefile.am +++ b/gruel/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -21,7 +21,7 @@ include $(top_srcdir)/Makefile.common -EXTRA_DIST = \ +EXTRA_DIST += \ gruel.pc.in SUBDIRS = src diff --git a/gruel/src/include/gruel/Makefile.am b/gruel/src/include/gruel/Makefile.am index 67dd12995..d7ac3d332 100644 --- a/gruel/src/include/gruel/Makefile.am +++ b/gruel/src/include/gruel/Makefile.am @@ -21,13 +21,12 @@ include $(top_srcdir)/Makefile.common -BUILT_SOURCES = \ - inet.h +EXTRA_DIST += inet.h.in gruelincludedir = $(prefix)/include/gruel gruelinclude_HEADERS = \ - $(BUILT_SOURCES) \ + inet.h \ msg_accepter.h \ msg_accepter_msgq.h \ msg_queue.h \ diff --git a/gruel/src/lib/pmt/Makefile.am b/gruel/src/lib/pmt/Makefile.am index d3efc1afa..7a1f2e7d4 100644 --- a/gruel/src/lib/pmt/Makefile.am +++ b/gruel/src/lib/pmt/Makefile.am @@ -48,7 +48,7 @@ python_built_sources = $(GENERATED_H) $(GENERATED_CC) PMT_SERIAL_TAGS_H = $(abs_top_builddir)/gruel/src/include/gruel/pmt_serial_tags.h BUILT_SOURCES = $(python_built_sources) $(PMT_SERIAL_TAGS_H) -EXTRA_DIST = $(code_generator) +EXTRA_DIST += $(code_generator) # ---------------------------------------------------------------- diff --git a/gruel/src/scheme/gnuradio/Makefile.am b/gruel/src/scheme/gnuradio/Makefile.am index 0ce01f6f8..2f8e5c8d2 100644 --- a/gruel/src/scheme/gnuradio/Makefile.am +++ b/gruel/src/scheme/gnuradio/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2007,2009 Free Software Foundation, Inc. +# Copyright 2007,2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -18,12 +18,14 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # +include $(top_srcdir)/Makefile.common + #pkgdatadir = $(datadir)/gnuradio -EXTRA_DIST = \ +EXTRA_DIST += \ gen-serial-tags.scm -# really scheme source files +# really scheme source files FIXME wrong location dist_pkgdata_DATA = \ pmt-serial-tags.scm \ pmt-serialize.scm \ -- cgit From 153de8c41caa9c478bec2f10b8a1167952809eed Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 23 Dec 2010 18:31:28 -0500 Subject: Modifying the unittest output. XML files are no longer written outside of the build tree. --- gruel/src/lib/test_gruel.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gruel') diff --git a/gruel/src/lib/test_gruel.cc b/gruel/src/lib/test_gruel.cc index f4b9fc4e2..2c9528b0a 100644 --- a/gruel/src/lib/test_gruel.cc +++ b/gruel/src/lib/test_gruel.cc @@ -65,14 +65,13 @@ main(int argc, char **argv) */ static void -ensure_unittest_path (const char *grpath, const char *path) +ensure_unittest_path (const char *path) { struct stat statbuf; if (stat (path, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) return; // blindly try to make it // FIXME make this robust. C++ SUCKS! - gr_mkdir (grpath, 0750); gr_mkdir (path, 0750); } @@ -80,11 +79,9 @@ static void get_unittest_path (const char *filename, char *fullpath, size_t pathsize) { char path[200]; - char grpath[200]; - snprintf (grpath, sizeof(grpath), "%s/.gnuradio", getenv ("HOME")); - snprintf (path, sizeof(path), "%s/unittests", grpath); + snprintf (path, sizeof(path), "./.unittests"); snprintf (fullpath, pathsize, "%s/%s", path, filename); - ensure_unittest_path(grpath, path); + ensure_unittest_path(path); } -- cgit From 05cc02cec03507c47846a668c92e6dcc4ba2e71e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 18 Jan 2011 01:00:15 -0800 Subject: cleanup mkdir usage with boost filesystem: Replaced copy/pasted code and MKDIR_TAKES_ONE_ARG #ifdefs with portable boost filesystem path and directory creation. Gets the correct home directory on windows systems: APPDATA. Replaces large amounts of copypasta with single lines of code. Removes MKDIR_TAKES_ONE_ARG configuration checks from m4 files. Adds boost filesystem and system library as build dependencies. --- gruel/src/lib/Makefile.am | 2 ++ gruel/src/lib/test_gruel.cc | 51 +++++++-------------------------------------- 2 files changed, 10 insertions(+), 43 deletions(-) (limited to 'gruel') diff --git a/gruel/src/lib/Makefile.am b/gruel/src/lib/Makefile.am index 5c3302f19..876e7ab3d 100644 --- a/gruel/src/lib/Makefile.am +++ b/gruel/src/lib/Makefile.am @@ -51,6 +51,8 @@ libgruel_la_SOURCES = \ libgruel_la_LIBADD = \ $(BOOST_THREAD_LIB) \ + $(BOOST_SYSTEM_LIB) \ + $(BOOST_FILESYSTEM_LIB) \ $(PMT_LIB) \ $(MSG_LIB) \ -lstdc++ diff --git a/gruel/src/lib/test_gruel.cc b/gruel/src/lib/test_gruel.cc index 2c9528b0a..efb6cb777 100644 --- a/gruel/src/lib/test_gruel.cc +++ b/gruel/src/lib/test_gruel.cc @@ -28,16 +28,19 @@ #include "pmt/qa_pmt.h" -static void get_unittest_path (const char *filename, char *fullpath, size_t pathsize); +#include +#include +namespace fs = boost::filesystem; int main(int argc, char **argv) { - char path[200]; - get_unittest_path ("gruel.xml", path, 200); - + fs::path path = fs::current_path() / ".unittests"; + if (!fs::is_directory(path)) fs::create_directory(path); + path = path / "gruel.xml"; + CppUnit::TextTestRunner runner; - std::ofstream xmlfile(path); + std::ofstream xmlfile(path.string().c_str()); CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile); runner.addTest(qa_pmt::suite ()); @@ -47,41 +50,3 @@ main(int argc, char **argv) return was_successful ? 0 : 1; } - - -// NOTE: These are defined in gr_unittest.h for the rest of the project; -// rewriting here since we don't depend on gnuradio-core in gruel - -#ifdef MKDIR_TAKES_ONE_ARG -#define gr_mkdir(pathname, mode) mkdir(pathname) -#else -#define gr_mkdir(pathname, mode) mkdir((pathname), (mode)) -#endif - -/* - * Mostly taken from gr_preferences.cc/h - * The simplest thing that could possibly work: - * the key is the filename; the value is the file contents. - */ - -static void -ensure_unittest_path (const char *path) -{ - struct stat statbuf; - if (stat (path, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) - return; - - // blindly try to make it // FIXME make this robust. C++ SUCKS! - gr_mkdir (path, 0750); -} - -static void -get_unittest_path (const char *filename, char *fullpath, size_t pathsize) -{ - char path[200]; - snprintf (path, sizeof(path), "./.unittests"); - snprintf (fullpath, pathsize, "%s/%s", path, filename); - - ensure_unittest_path(path); -} - -- cgit From ebb0f56da62e9ff16928b32cc525f24c93a99e0b Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sat, 22 Jan 2011 14:54:20 -0500 Subject: Updating copyright. --- gruel/src/lib/Makefile.am | 2 +- gruel/src/lib/test_gruel.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gruel') diff --git a/gruel/src/lib/Makefile.am b/gruel/src/lib/Makefile.am index 876e7ab3d..b9b35ae10 100644 --- a/gruel/src/lib/Makefile.am +++ b/gruel/src/lib/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 # diff --git a/gruel/src/lib/test_gruel.cc b/gruel/src/lib/test_gruel.cc index efb6cb777..7ef3520e6 100644 --- a/gruel/src/lib/test_gruel.cc +++ b/gruel/src/lib/test_gruel.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2009,2010 Free Software Foundation, Inc. + * Copyright 2006,2009,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * -- cgit