[gimp] pdb: move PDB generation and sources to toplevel/pdb



commit 3b639b1de24f94602c8c51243ea94df59a1312a4
Author: Michael Natterer <mitch gimp org>
Date:   Sun Dec 17 18:41:34 2017 +0100

    pdb: move PDB generation and sources to toplevel/pdb
    
    It never belonged inside "tools". Also rename its "pdb" subdirectory
    to "groups". This had to happen before 2.10 so cherry-picking between
    branches doesn't become a nightmare in the future.

 HACKING                                   |    2 +-
 Makefile.am                               |    5 +
 app/app.c                                 |    2 +-
 app/core/core-enums.h                     |    2 +-
 app/paint/paint-enums.h                   |    2 +-
 app/pdb/README                            |    2 +-
 configure.ac                              |    2 +-
 {tools/pdbgen => pdb}/.gitignore          |    0
 {tools/pdbgen => pdb}/Makefile.am         |  132 +-
 {tools/pdbgen => pdb}/README              |    0
 {tools/pdbgen => pdb}/README_NEW_PDB_PROC |    8 +-
 {tools/pdbgen => pdb}/app.pl              |    0
 {tools/pdbgen => pdb}/enumcode.pl         |    0
 {tools/pdbgen => pdb}/enumgen.pl          |    0
 {tools/pdbgen => pdb}/enums.pl            |    0
 {tools/pdbgen => pdb}/groups.pl           |    0
 {tools/pdbgen => pdb}/lib.pl              |    0
 {tools/pdbgen => pdb}/pdb.pl              |    0
 {tools/pdbgen => pdb}/pdbgen.pl           |    4 +-
 {tools/pdbgen => pdb}/stddefs.pdb         |    0
 {tools/pdbgen => pdb}/util.pl             |    0
 plug-ins/common/mkgen.pl                  |    2 +-
 tools/Makefile.am                         |    7 -
 tools/pdbgen/pdb/brush.pdb                |  883 -----
 tools/pdbgen/pdb/brush_select.pdb         |  144 -
 tools/pdbgen/pdb/brushes.pdb              |  227 --
 tools/pdbgen/pdb/buffer.pdb               |  260 --
 tools/pdbgen/pdb/channel.pdb              |  382 ---
 tools/pdbgen/pdb/color.pdb                |  759 -----
 tools/pdbgen/pdb/context.pdb              | 3111 ------------------
 tools/pdbgen/pdb/debug.pdb                |  104 -
 tools/pdbgen/pdb/display.pdb              |  229 --
 tools/pdbgen/pdb/drawable.pdb             | 1035 ------
 tools/pdbgen/pdb/drawable_color.pdb       |  838 -----
 tools/pdbgen/pdb/drawable_transform.pdb   |  934 ------
 tools/pdbgen/pdb/dynamics.pdb             |   87 -
 tools/pdbgen/pdb/edit.pdb                 | 1052 ------
 tools/pdbgen/pdb/fileops.pdb              |  720 -----
 tools/pdbgen/pdb/floating_sel.pdb         |  222 --
 tools/pdbgen/pdb/font_select.pdb          |  111 -
 tools/pdbgen/pdb/fonts.pdb                |   86 -
 tools/pdbgen/pdb/gimp.pdb                 |  244 --
 tools/pdbgen/pdb/gimprc.pdb               |  284 --
 tools/pdbgen/pdb/gradient.pdb             | 1466 ---------
 tools/pdbgen/pdb/gradient_select.pdb      |  123 -
 tools/pdbgen/pdb/gradients.pdb            |  268 --
 tools/pdbgen/pdb/help.pdb                 |   72 -
 tools/pdbgen/pdb/image.pdb                | 2929 -----------------
 tools/pdbgen/pdb/image_color_profile.pdb  |  327 --
 tools/pdbgen/pdb/image_convert.pdb        |  286 --
 tools/pdbgen/pdb/image_grid.pdb           |  372 ---
 tools/pdbgen/pdb/image_guides.pdb         |  270 --
 tools/pdbgen/pdb/image_sample_points.pdb  |  202 --
 tools/pdbgen/pdb/image_select.pdb         |  438 ---
 tools/pdbgen/pdb/image_transform.pdb      |  276 --
 tools/pdbgen/pdb/image_undo.pdb           |  306 --
 tools/pdbgen/pdb/item.pdb                 |  992 ------
 tools/pdbgen/pdb/item_transform.pdb       |  695 ----
 tools/pdbgen/pdb/layer.pdb                | 1406 --------
 tools/pdbgen/pdb/message.pdb              |  116 -
 tools/pdbgen/pdb/paint_tools.pdb          | 1071 -------
 tools/pdbgen/pdb/palette.pdb              |  587 ----
 tools/pdbgen/pdb/palette_select.pdb       |  116 -
 tools/pdbgen/pdb/palettes.pdb             |  167 -
 tools/pdbgen/pdb/paths.pdb                |  636 ----
 tools/pdbgen/pdb/pattern.pdb              |  130 -
 tools/pdbgen/pdb/pattern_select.pdb       |  116 -
 tools/pdbgen/pdb/patterns.pdb             |  171 -
 tools/pdbgen/pdb/plug_in.pdb              |  449 ---
 tools/pdbgen/pdb/plug_in_compat.pdb       | 4966 -----------------------------
 tools/pdbgen/pdb/procedural_db.pdb        |  521 ---
 tools/pdbgen/pdb/progress.pdb             |  321 --
 tools/pdbgen/pdb/selection.pdb            |  578 ----
 tools/pdbgen/pdb/selection_tools.pdb      |  419 ---
 tools/pdbgen/pdb/text_layer.pdb           | 1253 --------
 tools/pdbgen/pdb/text_tool.pdb            |  288 --
 tools/pdbgen/pdb/transform_tools.pdb      |  532 ---
 tools/pdbgen/pdb/unit.pdb                 |  376 ---
 tools/pdbgen/pdb/vectors.pdb              | 1365 --------
 79 files changed, 84 insertions(+), 36404 deletions(-)
---
diff --git a/HACKING b/HACKING
index 7d3fdc7..b4eb927 100644
--- a/HACKING
+++ b/HACKING
@@ -116,7 +116,7 @@ sources. All those files have a short notice about being generated
 somewhere at the top. Among them are the files ending in pdb.[ch] in
 the libgimp directory and the files ending in cmds.c in the app/pdb
 subdirectory. Those are generated from the respective .pdb files in
-tools/pdbgen/pdb.
+pdb/groups.
 
 
 Hackordnung
diff --git a/Makefile.am b/Makefile.am
index eddac25..e2e2ad8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,10 @@
 
 ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
 
+if WITH_PDBGEN
+PDB = pdb
+endif
+
 SUBDIRS = \
        m4macros        \
        cursors         \
@@ -17,6 +21,7 @@ SUBDIRS = \
        menus           \
        libgimpbase     \
        tools           \
+       $(PDB)          \
        icons           \
        libgimpcolor    \
        libgimpmath     \
diff --git a/app/app.c b/app/app.c
index 377c18e..345326f 100644
--- a/app/app.c
+++ b/app/app.c
@@ -118,7 +118,7 @@ app_libs_init (GOptionContext *context,
     }
 #endif
 
-  /*  keep compat enum code in sync with tools/pdbgen/enumcode.pl  */
+  /*  keep compat enum code in sync with pdb/enumcode.pl  */
   quark = g_quark_from_static_string ("gimp-compat-enum");
 
   g_type_set_qdata (GIMP_TYPE_CONVERT_DITHER_TYPE, quark,
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 2dd1fc8..51db731 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -20,7 +20,7 @@
 
 
 #if 0
-   This file is parsed by two scripts, enumgen.pl in tools/pdbgen,
+   This file is parsed by two scripts, enumgen.pl in pdb,
    and gimp-mkenums. All enums that are not marked with
    /*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are
    not marked with /*< skip >*/ are registered with the GType system.
diff --git a/app/paint/paint-enums.h b/app/paint/paint-enums.h
index 95d89d0..44f01b4 100644
--- a/app/paint/paint-enums.h
+++ b/app/paint/paint-enums.h
@@ -19,7 +19,7 @@
 #define __PAINT_ENUMS_H__
 
 #if 0
-   This file is parsed by two scripts, enumgen.pl in tools/pdbgen,
+   This file is parsed by two scripts, enumgen.pl in pdb,
    and gimp-mkenums. All enums that are not marked with
    /*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are
    not marked with /*< skip >*/ are registered with the GType system.
diff --git a/app/pdb/README b/app/pdb/README
index 0aa89b7..2205ba6 100644
--- a/app/pdb/README
+++ b/app/pdb/README
@@ -3,5 +3,5 @@ Gimp functions.
 
 THESE FILES ARE AUTOGENERATED AND CHANGES HERE ARE USELESS!
 
-If you need to change the code please have a look in ../../tools/pdbgen/pdb.
+If you need to change the code please have a look in ../../pdb/groups.
 
diff --git a/configure.ac b/configure.ac
index fc00af8..a5cb328 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2480,7 +2480,7 @@ _______EOF
 AC_CONFIG_FILES([
 INSTALL
 tools/Makefile
-tools/pdbgen/Makefile
+pdb/Makefile
 libgimp/Makefile
 libgimpbase/Makefile
 libgimpconfig/Makefile
diff --git a/tools/pdbgen/.gitignore b/pdb/.gitignore
similarity index 100%
rename from tools/pdbgen/.gitignore
rename to pdb/.gitignore
diff --git a/tools/pdbgen/Makefile.am b/pdb/Makefile.am
similarity index 54%
rename from tools/pdbgen/Makefile.am
rename to pdb/Makefile.am
index a1fc0cd..eab66dc 100644
--- a/tools/pdbgen/Makefile.am
+++ b/pdb/Makefile.am
@@ -1,63 +1,63 @@
 PDBGEN_BACKUP = 0
 PDBGEN_GROUPS =
 
-pdb_sources = \
-       pdb/brush.pdb                   \
-       pdb/brush_select.pdb            \
-       pdb/brushes.pdb                 \
-       pdb/buffer.pdb                  \
-       pdb/channel.pdb                 \
-       pdb/color.pdb                   \
-       pdb/context.pdb                 \
-       pdb/debug.pdb                   \
-       pdb/display.pdb                 \
-       pdb/drawable.pdb                \
-       pdb/drawable_color.pdb          \
-       pdb/drawable_transform.pdb      \
-       pdb/dynamics.pdb                \
-       pdb/edit.pdb                    \
-       pdb/fileops.pdb                 \
-       pdb/floating_sel.pdb            \
-       pdb/font_select.pdb             \
-       pdb/fonts.pdb                   \
-       pdb/gimp.pdb                    \
-       pdb/gimprc.pdb                  \
-       pdb/gradient.pdb                \
-       pdb/gradient_select.pdb         \
-       pdb/gradients.pdb               \
-       pdb/help.pdb                    \
-       pdb/image.pdb                   \
-       pdb/image_color_profile.pdb     \
-       pdb/image_convert.pdb           \
-       pdb/image_grid.pdb              \
-       pdb/image_guides.pdb            \
-       pdb/image_sample_points.pdb     \
-       pdb/image_select.pdb            \
-       pdb/image_transform.pdb         \
-       pdb/image_undo.pdb              \
-       pdb/item.pdb                    \
-       pdb/item_transform.pdb          \
-       pdb/layer.pdb                   \
-       pdb/message.pdb                 \
-       pdb/paint_tools.pdb             \
-       pdb/palette.pdb                 \
-       pdb/palette_select.pdb          \
-       pdb/palettes.pdb                \
-       pdb/paths.pdb                   \
-       pdb/pattern.pdb                 \
-       pdb/pattern_select.pdb          \
-       pdb/patterns.pdb                \
-       pdb/plug_in.pdb                 \
-       pdb/plug_in_compat.pdb          \
-       pdb/procedural_db.pdb           \
-       pdb/progress.pdb                \
-       pdb/selection.pdb               \
-       pdb/selection_tools.pdb         \
-       pdb/text_layer.pdb              \
-       pdb/text_tool.pdb               \
-       pdb/transform_tools.pdb         \
-       pdb/unit.pdb                    \
-       pdb/vectors.pdb
+pdb_groups = \
+       groups/brush.pdb                \
+       groups/brush_select.pdb         \
+       groups/brushes.pdb              \
+       groups/buffer.pdb               \
+       groups/channel.pdb              \
+       groups/color.pdb                \
+       groups/context.pdb              \
+       groups/debug.pdb                \
+       groups/display.pdb              \
+       groups/drawable.pdb             \
+       groups/drawable_color.pdb       \
+       groups/drawable_transform.pdb   \
+       groups/dynamics.pdb             \
+       groups/edit.pdb                 \
+       groups/fileops.pdb              \
+       groups/floating_sel.pdb         \
+       groups/font_select.pdb          \
+       groups/fonts.pdb                \
+       groups/gimp.pdb                 \
+       groups/gimprc.pdb               \
+       groups/gradient.pdb             \
+       groups/gradient_select.pdb      \
+       groups/gradients.pdb            \
+       groups/help.pdb                 \
+       groups/image.pdb                \
+       groups/image_color_profile.pdb  \
+       groups/image_convert.pdb        \
+       groups/image_grid.pdb           \
+       groups/image_guides.pdb         \
+       groups/image_sample_points.pdb  \
+       groups/image_select.pdb         \
+       groups/image_transform.pdb      \
+       groups/image_undo.pdb           \
+       groups/item.pdb                 \
+       groups/item_transform.pdb       \
+       groups/layer.pdb                \
+       groups/message.pdb              \
+       groups/paint_tools.pdb          \
+       groups/palette.pdb              \
+       groups/palette_select.pdb       \
+       groups/palettes.pdb             \
+       groups/paths.pdb                \
+       groups/pattern.pdb              \
+       groups/pattern_select.pdb       \
+       groups/patterns.pdb             \
+       groups/plug_in.pdb              \
+       groups/plug_in_compat.pdb       \
+       groups/procedural_db.pdb        \
+       groups/progress.pdb             \
+       groups/selection.pdb            \
+       groups/selection_tools.pdb      \
+       groups/text_layer.pdb           \
+       groups/text_tool.pdb            \
+       groups/transform_tools.pdb      \
+       groups/unit.pdb                 \
+       groups/vectors.pdb
 
 EXTRA_DIST = \
        README                  \
@@ -72,14 +72,14 @@ EXTRA_DIST = \
        pdbgen.pl               \
        stddefs.pdb             \
        util.pl                 \
-       $(pdb_sources)
+       $(pdb_groups)
 
 enum_headers = \
-       ../../libgimpbase/gimpbaseenums.h       \
-       ../../libgimpconfig/gimpconfigenums.h   \
-       ../../app/operations/operations-enums.h \
-       ../../app/core/core-enums.h             \
-       ../../app/paint/paint-enums.h
+       ../libgimpbase/gimpbaseenums.h          \
+       ../libgimpconfig/gimpconfigenums.h      \
+       ../app/operations/operations-enums.h    \
+       ../app/core/core-enums.h                \
+       ../app/paint/paint-enums.h
 
 pdb_scripts = \
        pdbgen.pl       \
@@ -125,8 +125,8 @@ stamp-groups: Makefile.am
        rootme=`pwd`; cd $(srcdir) \
        && echo "# This file is autogenerated" > $$rootme/groups.pl.tmp \
        && echo "@groups = qw(" >> $$rootme/groups.pl.tmp \
-       && (for pdb in $(pdb_sources); do \
-             group=`echo $$pdb | sed -e 's%pdb/\([^.]*\)\..*%\1%'`; \
+       && (for pdb in $(pdb_groups); do \
+             group=`echo $$pdb | sed -e 's%groups/\([^.]*\)\..*%\1%'`; \
              echo "    $$group" >> $$rootme/groups.pl.tmp; \
            done) \
        && echo ");" >> $$rootme/groups.pl.tmp \
@@ -135,7 +135,7 @@ stamp-groups: Makefile.am
        && rm $$rootme/groups.pl.tmp \
        && echo timestamp > $$rootme/stamp-groups
 
-stamp-pdbgen: $(pdbgen_deps) $(pdb_scripts) $(pdb_sources) Makefile.am
+stamp-pdbgen: $(pdbgen_deps) $(pdb_scripts) $(pdb_groups) Makefile.am
        rootme=`pwd`; \
        destdir=`cd $(top_srcdir) && pwd`; export destdir; \
        builddir=`cd $(top_builddir) && pwd`; export builddir; \
diff --git a/tools/pdbgen/README b/pdb/README
similarity index 100%
rename from tools/pdbgen/README
rename to pdb/README
diff --git a/tools/pdbgen/README_NEW_PDB_PROC b/pdb/README_NEW_PDB_PROC
similarity index 97%
rename from tools/pdbgen/README_NEW_PDB_PROC
rename to pdb/README_NEW_PDB_PROC
index aed91d5..19f8e4d 100644
--- a/tools/pdbgen/README_NEW_PDB_PROC
+++ b/pdb/README_NEW_PDB_PROC
@@ -63,7 +63,7 @@ http://git.gnome.org/browse/gimp/tree/tools/pdbgen/pdb[tools/pdbgen/pdb].
 You can see many files with the .pdb suffix - these are special template
 files which include the actual source of the PDB functions. Let's take a
 quick look at one of these - text_layer_get_text in
-http://git.gnome.org/browse/gimp/tree/tools/pdbgen/pdb/text_layer.pdb[tools/pdbgen/pdb/text_layer.pdb].
+http://git.gnome.org/browse/gimp/tree/pdb/groups/text_layer.pdb[pdb/groups/text_layer.pdb].
 
 [source,perl]
 ----
@@ -337,7 +337,7 @@ this can be done automatically for you if the desired enum is one of the
 enums which are already used by GIMP.
 
 To make it clearer, let's take a look at +layer_get_mode+ in
-http://git.gnome.org/browse/gimp/tree/tools/pdbgen/pdb/layer.pdb[tools/pdbgen/pdb/layer.pdb]:
+http://git.gnome.org/browse/gimp/tree/pdb/groups/layer.pdb[pdb/groups/layer.pdb]:
 
 [source,perl]
 ----
@@ -388,7 +388,7 @@ function, and by that we can make sure it won't be called with values
 out of range (GIMP will make sure the values are inside the specified
 range before it calls our function). To see an example, let's take look
 at the procedure image_new from
-http://git.gnome.org/browse/gimp/tree/tools/pdbgen/pdb/image.pdb[tools/pdbgen/pdb/image.pdb]:
+http://git.gnome.org/browse/gimp/tree/pdb/groups/image.pdb[pdb/groups/image.pdb]:
 
 [source,perl]
 ----
@@ -435,7 +435,7 @@ function which receives an array. Array arguments are specified in a
 special way which is a bit different than the other arguments. To see
 how array arguments are specified, let's take a look at the +@outargs+
 of +vectors_stroke_get_points+ from
-http://git.gnome.org/browse/gimp/tree/tools/pdbgen/pdb/vectors.pdb[tools/pdbgen/pdb/vectors.pdb]:
+http://git.gnome.org/browse/gimp/tree/pdb/groups/vectors.pdb[pdb/groups/vectors.pdb]:
 
 [source,perl]
 ----
diff --git a/tools/pdbgen/app.pl b/pdb/app.pl
similarity index 100%
rename from tools/pdbgen/app.pl
rename to pdb/app.pl
diff --git a/tools/pdbgen/enumcode.pl b/pdb/enumcode.pl
similarity index 100%
rename from tools/pdbgen/enumcode.pl
rename to pdb/enumcode.pl
diff --git a/tools/pdbgen/enumgen.pl b/pdb/enumgen.pl
similarity index 100%
rename from tools/pdbgen/enumgen.pl
rename to pdb/enumgen.pl
diff --git a/tools/pdbgen/enums.pl b/pdb/enums.pl
similarity index 100%
rename from tools/pdbgen/enums.pl
rename to pdb/enums.pl
diff --git a/tools/pdbgen/groups.pl b/pdb/groups.pl
similarity index 100%
rename from tools/pdbgen/groups.pl
rename to pdb/groups.pl
diff --git a/tools/pdbgen/lib.pl b/pdb/lib.pl
similarity index 100%
rename from tools/pdbgen/lib.pl
rename to pdb/lib.pl
diff --git a/tools/pdbgen/pdb.pl b/pdb/pdb.pl
similarity index 100%
rename from tools/pdbgen/pdb.pl
rename to pdb/pdb.pl
diff --git a/tools/pdbgen/pdbgen.pl b/pdb/pdbgen.pl
similarity index 98%
rename from tools/pdbgen/pdbgen.pl
rename to pdb/pdbgen.pl
index e1df743..403aafa 100755
--- a/tools/pdbgen/pdbgen.pl
+++ b/pdb/pdbgen.pl
@@ -89,7 +89,7 @@ $evalcode = <<'CODE';
     foreach (@groupvars) { eval "undef $_" }
 
     # Load the file in and get the group info
-    &$safeeval("require '$main::srcdir/pdb/$file.pdb'");
+    &$safeeval("require '$main::srcdir/groups/$file.pdb'");
 
     # Save these for later
     &$copyvars(\$grp{$file}, @groupvars);
@@ -120,7 +120,7 @@ CODE
 
 # Slurp in the PDB defs
 foreach $file (@groups) {
-    print "Processing $srcdir/pdb/$file.pdb...\n";
+    print "Processing $srcdir/groups/$file.pdb...\n";
     eval "package Gimp::CodeGen::Safe::$file; $evalcode;";
     die $@ if $@;
 }
diff --git a/tools/pdbgen/stddefs.pdb b/pdb/stddefs.pdb
similarity index 100%
rename from tools/pdbgen/stddefs.pdb
rename to pdb/stddefs.pdb
diff --git a/tools/pdbgen/util.pl b/pdb/util.pl
similarity index 100%
rename from tools/pdbgen/util.pl
rename to pdb/util.pl
diff --git a/plug-ins/common/mkgen.pl b/plug-ins/common/mkgen.pl
index 8a61139..90f66d4 100755
--- a/plug-ins/common/mkgen.pl
+++ b/plug-ins/common/mkgen.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-use lib '../../tools/pdbgen';
+use lib '../../pdb';
 
 require 'util.pl';
 
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 3184da9..37e7b33 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -2,12 +2,6 @@
 
 libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
 
-if WITH_PDBGEN
-PDBGEN = pdbgen
-endif
-
-SUBDIRS = $(PDBGEN)
-
 if OS_WIN32
 
 bin_PROGRAMS = \
@@ -94,4 +88,3 @@ EXTRA_DIST = \
        gimp-mkenums    \
        gimppath2svg.py \
        invert-svg.c
-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]