Commit b05cfc60 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Ell

pdb: (try 3) 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.
parent 89a9d0e9
...@@ -116,7 +116,7 @@ sources. All those files have a short notice about being generated ...@@ -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 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 the libgimp directory and the files ending in cmds.c in the app/pdb
subdirectory. Those are generated from the respective .pdb files in subdirectory. Those are generated from the respective .pdb files in
tools/pdbgen/pdb. pdb/groups.
Hackordnung Hackordnung
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
if WITH_PDBGEN
PDB = pdb
endif
SUBDIRS = \ SUBDIRS = \
m4macros \ m4macros \
cursors \ cursors \
...@@ -17,6 +21,7 @@ SUBDIRS = \ ...@@ -17,6 +21,7 @@ SUBDIRS = \
menus \ menus \
libgimpbase \ libgimpbase \
tools \ tools \
$(PDB) \
icons \ icons \
libgimpcolor \ libgimpcolor \
libgimpmath \ libgimpmath \
......
...@@ -118,7 +118,7 @@ app_libs_init (GOptionContext *context, ...@@ -118,7 +118,7 @@ app_libs_init (GOptionContext *context,
} }
#endif #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"); quark = g_quark_from_static_string ("gimp-compat-enum");
g_type_set_qdata (GIMP_TYPE_CONVERT_DITHER_TYPE, quark, g_type_set_qdata (GIMP_TYPE_CONVERT_DITHER_TYPE, quark,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#if 0 #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 and gimp-mkenums. All enums that are not marked with
/*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are /*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are
not marked with /*< skip >*/ are registered with the GType system. not marked with /*< skip >*/ are registered with the GType system.
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define __PAINT_ENUMS_H__ #define __PAINT_ENUMS_H__
#if 0 #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 and gimp-mkenums. All enums that are not marked with
/*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are /*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are
not marked with /*< skip >*/ are registered with the GType system. not marked with /*< skip >*/ are registered with the GType system.
......
...@@ -3,5 +3,5 @@ Gimp functions. ...@@ -3,5 +3,5 @@ Gimp functions.
THESE FILES ARE AUTOGENERATED AND CHANGES HERE ARE USELESS! 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.
...@@ -2480,7 +2480,7 @@ _______EOF ...@@ -2480,7 +2480,7 @@ _______EOF
AC_CONFIG_FILES([ AC_CONFIG_FILES([
INSTALL INSTALL
tools/Makefile tools/Makefile
tools/pdbgen/Makefile pdb/Makefile
libgimp/Makefile libgimp/Makefile
libgimpbase/Makefile libgimpbase/Makefile
libgimpconfig/Makefile libgimpconfig/Makefile
......
PDBGEN_BACKUP = 0 PDBGEN_BACKUP = 0
PDBGEN_GROUPS = PDBGEN_GROUPS =
pdb_sources = \ pdb_groups = \
pdb/brush.pdb \ groups/brush.pdb \
pdb/brush_select.pdb \ groups/brush_select.pdb \
pdb/brushes.pdb \ groups/brushes.pdb \
pdb/buffer.pdb \ groups/buffer.pdb \
pdb/channel.pdb \ groups/channel.pdb \
pdb/color.pdb \ groups/color.pdb \
pdb/context.pdb \ groups/context.pdb \
pdb/debug.pdb \ groups/debug.pdb \
pdb/display.pdb \ groups/display.pdb \
pdb/drawable.pdb \ groups/drawable.pdb \
pdb/drawable_color.pdb \ groups/drawable_color.pdb \
pdb/drawable_transform.pdb \ groups/drawable_transform.pdb \
pdb/dynamics.pdb \ groups/dynamics.pdb \
pdb/edit.pdb \ groups/edit.pdb \
pdb/fileops.pdb \ groups/fileops.pdb \
pdb/floating_sel.pdb \ groups/floating_sel.pdb \
pdb/font_select.pdb \ groups/font_select.pdb \
pdb/fonts.pdb \ groups/fonts.pdb \
pdb/gimp.pdb \ groups/gimp.pdb \
pdb/gimprc.pdb \ groups/gimprc.pdb \
pdb/gradient.pdb \ groups/gradient.pdb \
pdb/gradient_select.pdb \ groups/gradient_select.pdb \
pdb/gradients.pdb \ groups/gradients.pdb \
pdb/help.pdb \ groups/help.pdb \
pdb/image.pdb \ groups/image.pdb \
pdb/image_color_profile.pdb \ groups/image_color_profile.pdb \
pdb/image_convert.pdb \ groups/image_convert.pdb \
pdb/image_grid.pdb \ groups/image_grid.pdb \
pdb/image_guides.pdb \ groups/image_guides.pdb \
pdb/image_sample_points.pdb \ groups/image_sample_points.pdb \
pdb/image_select.pdb \ groups/image_select.pdb \
pdb/image_transform.pdb \ groups/image_transform.pdb \
pdb/image_undo.pdb \ groups/image_undo.pdb \
pdb/item.pdb \ groups/item.pdb \
pdb/item_transform.pdb \ groups/item_transform.pdb \
pdb/layer.pdb \ groups/layer.pdb \
pdb/message.pdb \ groups/message.pdb \
pdb/paint_tools.pdb \ groups/paint_tools.pdb \
pdb/palette.pdb \ groups/palette.pdb \
pdb/palette_select.pdb \ groups/palette_select.pdb \
pdb/palettes.pdb \ groups/palettes.pdb \
pdb/paths.pdb \ groups/paths.pdb \
pdb/pattern.pdb \ groups/pattern.pdb \
pdb/pattern_select.pdb \ groups/pattern_select.pdb \
pdb/patterns.pdb \ groups/patterns.pdb \
pdb/plug_in.pdb \ groups/plug_in.pdb \
pdb/plug_in_compat.pdb \ groups/plug_in_compat.pdb \
pdb/procedural_db.pdb \ groups/procedural_db.pdb \
pdb/progress.pdb \ groups/progress.pdb \
pdb/selection.pdb \ groups/selection.pdb \
pdb/selection_tools.pdb \ groups/selection_tools.pdb \
pdb/text_layer.pdb \ groups/text_layer.pdb \
pdb/text_tool.pdb \ groups/text_tool.pdb \
pdb/transform_tools.pdb \ groups/transform_tools.pdb \
pdb/unit.pdb \ groups/unit.pdb \
pdb/vectors.pdb groups/vectors.pdb
EXTRA_DIST = \ EXTRA_DIST = \
README \ README \
...@@ -72,14 +72,14 @@ EXTRA_DIST = \ ...@@ -72,14 +72,14 @@ EXTRA_DIST = \
pdbgen.pl \ pdbgen.pl \
stddefs.pdb \ stddefs.pdb \
util.pl \ util.pl \
$(pdb_sources) $(pdb_groups)
enum_headers = \ enum_headers = \
../../libgimpbase/gimpbaseenums.h \ ../libgimpbase/gimpbaseenums.h \
../../libgimpconfig/gimpconfigenums.h \ ../libgimpconfig/gimpconfigenums.h \
../../app/operations/operations-enums.h \ ../app/operations/operations-enums.h \
../../app/core/core-enums.h \ ../app/core/core-enums.h \
../../app/paint/paint-enums.h ../app/paint/paint-enums.h
pdb_scripts = \ pdb_scripts = \
pdbgen.pl \ pdbgen.pl \
...@@ -125,8 +125,8 @@ stamp-groups: Makefile.am ...@@ -125,8 +125,8 @@ stamp-groups: Makefile.am
rootme=`pwd`; cd $(srcdir) \ rootme=`pwd`; cd $(srcdir) \
&& echo "# This file is autogenerated" > $$rootme/groups.pl.tmp \ && echo "# This file is autogenerated" > $$rootme/groups.pl.tmp \
&& echo "@groups = qw(" >> $$rootme/groups.pl.tmp \ && echo "@groups = qw(" >> $$rootme/groups.pl.tmp \
&& (for pdb in $(pdb_sources); do \ && (for pdb in $(pdb_groups); do \
group=`echo $$pdb | sed -e 's%pdb/\([^.]*\)\..*%\1%'`; \ group=`echo $$pdb | sed -e 's%groups/\([^.]*\)\..*%\1%'`; \
echo " $$group" >> $$rootme/groups.pl.tmp; \ echo " $$group" >> $$rootme/groups.pl.tmp; \
done) \ done) \
&& echo ");" >> $$rootme/groups.pl.tmp \ && echo ");" >> $$rootme/groups.pl.tmp \
...@@ -135,7 +135,7 @@ stamp-groups: Makefile.am ...@@ -135,7 +135,7 @@ stamp-groups: Makefile.am
&& rm $$rootme/groups.pl.tmp \ && rm $$rootme/groups.pl.tmp \
&& echo timestamp > $$rootme/stamp-groups && 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`; \ rootme=`pwd`; \
destdir=`cd $(top_srcdir) && pwd`; export destdir; \ destdir=`cd $(top_srcdir) && pwd`; export destdir; \
builddir=`cd $(top_builddir) && pwd`; export builddir; \ builddir=`cd $(top_builddir) && pwd`; export builddir; \
......
...@@ -63,7 +63,7 @@ http://git.gnome.org/browse/gimp/tree/tools/pdbgen/pdb[tools/pdbgen/pdb]. ...@@ -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 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 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 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] [source,perl]
---- ----
...@@ -337,7 +337,7 @@ this can be done automatically for you if the desired enum is one of the ...@@ -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. enums which are already used by GIMP.
To make it clearer, let's take a look at +layer_get_mode+ in 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] [source,perl]
---- ----
...@@ -388,7 +388,7 @@ function, and by that we can make sure it won't be called with values ...@@ -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 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 range before it calls our function). To see an example, let's take look
at the procedure image_new from 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] [source,perl]
---- ----
...@@ -435,7 +435,7 @@ function which receives an array. Array arguments are specified in a ...@@ -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 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+ how array arguments are specified, let's take a look at the +@outargs+
of +vectors_stroke_get_points+ from 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] [source,perl]
---- ----
......
...@@ -89,7 +89,7 @@ $evalcode = <<'CODE'; ...@@ -89,7 +89,7 @@ $evalcode = <<'CODE';
foreach (@groupvars) { eval "undef $_" } foreach (@groupvars) { eval "undef $_" }
# Load the file in and get the group info # 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 # Save these for later
&$copyvars(\$grp{$file}, @groupvars); &$copyvars(\$grp{$file}, @groupvars);
...@@ -120,7 +120,7 @@ CODE ...@@ -120,7 +120,7 @@ CODE
# Slurp in the PDB defs # Slurp in the PDB defs
foreach $file (@groups) { foreach $file (@groups) {
print "Processing $srcdir/pdb/$file.pdb...\n"; print "Processing $srcdir/groups/$file.pdb...\n";
eval "package Gimp::CodeGen::Safe::$file; $evalcode;"; eval "package Gimp::CodeGen::Safe::$file; $evalcode;";
die $@ if $@; die $@ if $@;
} }
......
#!/usr/bin/perl -w #!/usr/bin/perl -w
use lib '../../tools/pdbgen'; use lib '../../pdb';
require 'util.pl'; require 'util.pl';
......
...@@ -2,12 +2,6 @@ ...@@ -2,12 +2,6 @@
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
if WITH_PDBGEN
PDBGEN = pdbgen
endif
SUBDIRS = $(PDBGEN)
if OS_WIN32 if OS_WIN32
bin_PROGRAMS = \ bin_PROGRAMS = \
...@@ -94,4 +88,3 @@ EXTRA_DIST = \ ...@@ -94,4 +88,3 @@ EXTRA_DIST = \
gimp-mkenums \ gimp-mkenums \
gimppath2svg.py \ gimppath2svg.py \
invert-svg.c invert-svg.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment