[gegl] operations, tools: module.c not properly generated in VPATH builds.



commit c1ff6484a3e8487c1be0c4cf7f7a6b3cb60a4d27
Author: Jehan <jehan girinstud io>
Date:   Mon Sep 26 18:09:09 2016 +0200

    operations, tools: module.c not properly generated in VPATH builds.
    
    None of the core, common and generated operations were registered inside
    respective `common.c` when `gen-loader.sh` was not run from inside the
    directory with all the source files. Such build case typically happens
    on VPATH builds.

 operations/common/Makefile.am    |    2 +-
 operations/core/Makefile.am      |    4 ++--
 operations/generated/Makefile.am |    4 ++--
 tools/gen-loader.sh              |    8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/operations/common/Makefile.am b/operations/common/Makefile.am
index 51d5c50..ef97fe9 100644
--- a/operations/common/Makefile.am
+++ b/operations/common/Makefile.am
@@ -155,4 +155,4 @@ gegl_common_la_SOURCES =\
        write-buffer.c
 
 module.c: $(gegl_common_la_SOURCES)
-       $(top_srcdir)/tools/gen-loader.sh > module.c
+       $(top_srcdir)/tools/gen-loader.sh $^ > module.c
diff --git a/operations/core/Makefile.am b/operations/core/Makefile.am
index 7fd0ac5..dd3e6b5 100644
--- a/operations/core/Makefile.am
+++ b/operations/core/Makefile.am
@@ -23,6 +23,6 @@ gegl_core_la_SOURCES =\
        json.c \
        nop.c
 
-module.c: $(gegl_common_la_SOURCES)
-       $(top_srcdir)/tools/gen-loader.sh > module.c
+module.c: $(gegl_core_la_SOURCES)
+       $(top_srcdir)/tools/gen-loader.sh $^ > module.c
 
diff --git a/operations/generated/Makefile.am b/operations/generated/Makefile.am
index 3ece48b..96b72ce 100644
--- a/operations/generated/Makefile.am
+++ b/operations/generated/Makefile.am
@@ -42,5 +42,5 @@ gegl_generated_la_SOURCES = \
   xor.c \
   module.c
 
-module.c: $(gegl_common_la_SOURCES)
-       $(top_srcdir)/tools/gen-loader.sh > module.c
+module.c: $(gegl_generated_la_SOURCES)
+       $(top_srcdir)/tools/gen-loader.sh $^ > module.c
diff --git a/tools/gen-loader.sh b/tools/gen-loader.sh
index a6b6f44..26e08ea 100755
--- a/tools/gen-loader.sh
+++ b/tools/gen-loader.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 
 echo '#include "config.h"'
-echo '#include <gegl-plugin.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
+for a in `grep GEGL_OP_NAME "$@" | sed 's/.*NAME//'`;do echo "void gegl_op_"$a"_register_type(GTypeModule 
*module);" ;done
 
-echo 'static const GeglModuleInfo modinfo = { 
+echo 'static const GeglModuleInfo modinfo = {
 GEGL_MODULE_ABI_VERSION
 };
 
@@ -23,7 +23,7 @@ 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
+for a in `grep GEGL_OP_NAME "$@" | 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]