[Fawkes Git] branch/jrothe/plugin_generator: 3 revs updated. (0.5.0-3091-g0aae627)

Tim Niemueller niemueller at kbsg.rwth-aachen.de
Tue Sep 6 02:06:45 CEST 2016


Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, jrothe/plugin_generator has been updated
        to  0aae62787a2df4dd2e207091ada38bb5f0f3d3ce (commit)
       via  03523ac3a19016c99edc39eac71cbd88d45ab865 (commit)
       via  e5ea7294da4275561aca720557a96f673d6551f2 (commit)
      from  64ee60bc7513ab1bba700775c72921ad81aa078e (commit)

http://git.fawkesrobotics.org/fawkes.git/jrothe/plugin_generator

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- *Log* ---------------------------------------------------------------
commit e5ea7294da4275561aca720557a96f673d6551f2
Author:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
AuthorDate: Tue Sep 6 02:03:40 2016 +0200
Commit:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
CommitDate: Tue Sep 6 02:03:40 2016 +0200

    plugin_generator: fix BASEDIR to compile

http://git.fawkesrobotics.org/fawkes.git/commit/e5ea729
http://trac.fawkesrobotics.org/changeset/e5ea729

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 03523ac3a19016c99edc39eac71cbd88d45ab865
Author:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
AuthorDate: Tue Sep 6 02:05:56 2016 +0200
Commit:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
CommitDate: Tue Sep 6 02:05:56 2016 +0200

    plugin_generator: rename binary to ffgenplugin
    
    Use ff prefix and rename such that it does not conflict with ffplugin
    auto completion.

http://git.fawkesrobotics.org/fawkes.git/commit/03523ac
http://trac.fawkesrobotics.org/changeset/03523ac

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 0aae62787a2df4dd2e207091ada38bb5f0f3d3ce
Author:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
AuthorDate: Tue Sep 6 02:06:30 2016 +0200
Commit:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
CommitDate: Tue Sep 6 02:06:30 2016 +0200

    plugin_generator: automatically create directory

http://git.fawkesrobotics.org/fawkes.git/commit/0aae627
http://trac.fawkesrobotics.org/changeset/0aae627

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 src/tools/plugin_generator/Makefile             |   10 +++++-----
 src/tools/plugin_generator/plugin_generator.cpp |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)


- *Diffs* -------------------------------------------------------------

- *commit* e5ea7294da4275561aca720557a96f673d6551f2 - - - - - - - - - -
Author:  Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date:    Tue Sep 6 02:03:40 2016 +0200
Subject: plugin_generator: fix BASEDIR to compile

 src/tools/plugin_generator/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/tools/plugin_generator/Makefile b/src/tools/plugin_generator/Makefile
index 135458b..734d3a8 100644
--- a/src/tools/plugin_generator/Makefile
+++ b/src/tools/plugin_generator/Makefile
@@ -13,7 +13,7 @@
 #
 #*****************************************************************************
 
-BASEDIR = ../../../..
+BASEDIR = ../../..
 
 include $(BASEDIR)/etc/buildsys/config.mk
 include $(BUILDSYSDIR)/interface.mk

- *commit* 03523ac3a19016c99edc39eac71cbd88d45ab865 - - - - - - - - - -
Author:  Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date:    Tue Sep 6 02:05:56 2016 +0200
Subject: plugin_generator: rename binary to ffgenplugin

 src/tools/plugin_generator/Makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/tools/plugin_generator/Makefile b/src/tools/plugin_generator/Makefile
index 734d3a8..1a330a3 100644
--- a/src/tools/plugin_generator/Makefile
+++ b/src/tools/plugin_generator/Makefile
@@ -24,12 +24,12 @@ else
 	WARN_TARGETS += warning_cpp11
 endif
 
-LIBS_plugin_generator = stdc++ fawkescore fawkesutils
+LIBS_ffgenplugin = stdc++ fawkescore fawkesutils
 
-OBJS_plugin_generator = plugin_generator.o main.o
+OBJS_ffgenplugin = plugin_generator.o main.o
 
-OBJS_all     += $(OBJS_plugin_generator)
-BINS_all     += $(BINDIR)/plugin_generator
+OBJS_all     += $(OBJS_ffgenplugin)
+BINS_all     += $(BINDIR)/ffgenplugin
 
 ifeq ($(OBJSSUBMAKE),1)
   ifneq ($(WARN_TARGETS),)

- *commit* 0aae62787a2df4dd2e207091ada38bb5f0f3d3ce - - - - - - - - - -
Author:  Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date:    Tue Sep 6 02:06:30 2016 +0200
Subject: plugin_generator: automatically create directory

 src/tools/plugin_generator/plugin_generator.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

_Diff for modified files_:
diff --git a/src/tools/plugin_generator/plugin_generator.cpp b/src/tools/plugin_generator/plugin_generator.cpp
index 614993b..2237427 100644
--- a/src/tools/plugin_generator/plugin_generator.cpp
+++ b/src/tools/plugin_generator/plugin_generator.cpp
@@ -23,6 +23,7 @@
 #include "plugin_generator.h"
 
 #include <utils/misc/string_conversions.h>
+#include <core/exception.h>
 
 #include <algorithm>
 #include <iostream>
@@ -109,7 +110,7 @@ PluginGenerator::write_header(FILE *f, std::string filename)
 	  " *  Read the full text in the LICENSE.GPL file in the doc directory.\n"
 	  " */\n\n",
 	  filename.c_str(), _plugin_name.c_str(),
-	  (_creation_date.length() > 0 ) ? " *  Plugin created: " : "",
+	  (_creation_date.length() > 0 ) ? " *  Created: " : "",
 	  (_creation_date.length() > 0 ) ? _creation_date.c_str() : "",
 	  (_creation_date.length() > 0 ) ? "\n" : "",
 	  _year.c_str(),  _author.c_str()
@@ -334,10 +335,9 @@ PluginGenerator::generate()
   struct stat info;
 
   if (!(stat(_dir.c_str(), &info) == 0 && S_ISDIR(info.st_mode))) {
-      printf( "ERROR: Cannot open %s\n"
-          "Use this command to create it: \n"
-          "mkdir %s\n", _dir.c_str(), _dir.c_str());
-      exit(1);
+	  if (mkdir(_dir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1) {
+		  throw fawkes::Exception(errno, "Failed to generate plugin, cannot create directory");
+	  }
   }
   thread_h   = fopen(string(_dir + _filename_thread_h).c_str(), "w");
   thread_cpp = fopen(string(_dir + _filename_thread_cpp).c_str(), "w");




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org


More information about the fawkes-commits mailing list