[gegl] tools/gen-loader.sh: add shellscript for generating module loading code
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] tools/gen-loader.sh: add shellscript for generating module loading code
- Date: Tue, 20 Sep 2016 23:02:47 +0000 (UTC)
commit be09cd6d6727554de72fe065ec11592ca391e3e8
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 20 23:29:30 2016 +0200
tools/gen-loader.sh: add shellscript for generating module loading code
tools/Makefile.am | 1 +
tools/gen-loader.sh | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/tools/Makefile.am b/tools/Makefile.am
index f7b29f3..4ce486b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -2,6 +2,7 @@
EXTRA_DIST = \
xml_insert.sh \
+ gen-loader.sh \
csourcetostring.py \
gobj2dot.rb
diff --git a/tools/gen-loader.sh b/tools/gen-loader.sh
new file mode 100755
index 0000000..d10c418
--- /dev/null
+++ b/tools/gen-loader.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+echo '#include "config.h"'
+echo '#include <gegl-plugin.h>'
+
+for a in `grep GEGL_OP_NAME *.c | sed 's/.*NAME//'`;do echo "void gegl_op_"$a"_register_type(GTypeModule
*module);" ;done
+
+echo 'static const GeglModuleInfo modinfo = {
+ GEGL_MODULE_ABI_VERSION
+ };
+
+ G_MODULE_EXPORT const GeglModuleInfo *
+ gegl_module_query (GTypeModule *module)
+ {
+ return &modinfo;
+ }
+
+ G_MODULE_EXPORT gboolean
+ gegl_module_register (GTypeModule *module)
+ {
+ '
+
+
+for a in `grep GEGL_OP_NAME *.c | sed 's/.*NAME//'`;do echo " gegl_op_"$a"_register_type(module);" ;done
+
+
+ echo ' return TRUE;}'
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]