Commit 6c5b1ea6 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: (try 2) 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 682ab691
......@@ -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
......
......@@ -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 \
......
......@@ -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,
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......@@ -2480,7 +2480,7 @@ _______EOF
AC_CONFIG_FILES([
INSTALL
tools/Makefile
tools/pdbgen/Makefile
pdb/Makefile
libgimp/Makefile
libgimpbase/Makefile
libgimpconfig/Makefile
......
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; \
......
......@@ -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]
----
......
......@@ -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 $@;
}
......
#!/usr/bin/perl -w
use lib '../../tools/pdbgen';
use lib '../../pdb';
require 'util.pl';
......
......@@ -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
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