[gimp] enums: run gimp-mkenums from the build dir
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] enums: run gimp-mkenums from the build dir
- Date: Tue, 23 May 2017 00:31:17 +0000 (UTC)
commit 5bcde32caf227ec4b1b1efdf0b7f33589a67943f
Author: Ell <ell_se yahoo com>
Date: Mon May 22 20:12:50 2017 -0400
enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1bf999f602eee54f1a3ae0271b63b49 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files. This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.
Switch back to running gimp-mkenums from the build directory. To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
app/config/Makefile.am | 6 +++---
app/core/Makefile.am | 6 +++---
app/display/Makefile.am | 6 +++---
app/gegl/Makefile.am | 6 +++---
app/operations/Makefile.am | 6 +++---
app/paint/Makefile.am | 6 +++---
app/plug-in/Makefile.am | 6 +++---
app/text/Makefile.am | 6 +++---
app/tools/Makefile.am | 6 +++---
app/widgets/Makefile.am | 6 +++---
libgimp/Makefile.am | 2 +-
libgimpbase/Makefile.am | 12 ++++++------
libgimpconfig/Makefile.am | 6 +++---
libgimpthumb/Makefile.am | 2 +-
libgimpwidgets/Makefile.am | 6 +++---
tools/gimp-mkenums | 5 +++++
16 files changed, 49 insertions(+), 44 deletions(-)
---
diff --git a/app/config/Makefile.am b/app/config/Makefile.am
index f6f3d00..588fa9f 100644
--- a/app/config/Makefile.am
+++ b/app/config/Makefile.am
@@ -136,16 +136,16 @@ gen_sources = xgen-cec
CLEANFILES += $(gen_sources)
xgen-cec: $(srcdir)/config-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"config-enums.h\"\n#include\"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- config-enums.h) > $@
+ $< > $@
$(srcdir)/config-enums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index 63e734d..9e5a679 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -451,16 +451,16 @@ gimpmarshal.c: gimpmarshal.h
&& rm -f xgen-gmc xgen-gmc~
xgen-cec: $(srcdir)/core-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"core-enums.h\"\n#include \"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- core-enums.h) > $@
+ $< > $@
$(srcdir)/core-enums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/display/Makefile.am b/app/display/Makefile.am
index 46acb10..c9a9300 100644
--- a/app/display/Makefile.am
+++ b/app/display/Makefile.am
@@ -179,16 +179,16 @@ gen_sources = xgen-dec
CLEANFILES = $(gen_sources)
xgen-dec: $(srcdir)/display-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"display-enums.h\"\n#include\"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- display-enums.h) > $@
+ $< > $@
$(srcdir)/display-enums.c: xgen-dec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/gegl/Makefile.am b/app/gegl/Makefile.am
index a6a7f4f..2eb150d 100644
--- a/app/gegl/Makefile.am
+++ b/app/gegl/Makefile.am
@@ -53,16 +53,16 @@ gen_sources = xgen-ggec
CLEANFILES = $(gen_sources)
xgen-ggec: $(srcdir)/gimp-gegl-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"core/core-enums.h\"\n#include \"gimp-gegl-enums.h\"\n#include
\"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- gimp-gegl-enums.h) > $@
+ $< > $@
$(srcdir)/gimp-gegl-enums.c: xgen-ggec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am
index 2abca9e..5eef0a3 100644
--- a/app/operations/Makefile.am
+++ b/app/operations/Makefile.am
@@ -112,16 +112,16 @@ gen_sources = xgen-oec
CLEANFILES = $(gen_sources)
xgen-oec: $(srcdir)/operations-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"operations-enums.h\"\n#include \"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- operations-enums.h) > $@
+ $< > $@
$(srcdir)/operations-enums.c: xgen-oec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/paint/Makefile.am b/app/paint/Makefile.am
index 66df99f..f93619f 100644
--- a/app/paint/Makefile.am
+++ b/app/paint/Makefile.am
@@ -99,16 +99,16 @@ gen_sources = xgen-pec
CLEANFILES = $(gen_sources)
xgen-pec: $(srcdir)/paint-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"paint-enums.h\"\n#include \"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- paint-enums.h) > $@
+ $< > $@
$(srcdir)/paint-enums.c: xgen-pec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/plug-in/Makefile.am b/app/plug-in/Makefile.am
index 471bf9a..208adea 100644
--- a/app/plug-in/Makefile.am
+++ b/app/plug-in/Makefile.am
@@ -82,16 +82,16 @@ gen_sources = xgen-pec
CLEANFILES = $(EXTRA_PROGRAMS) $(gen_sources)
xgen-pec: $(srcdir)/plug-in-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"plug-in-enums.h\"\n#include \"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- plug-in-enums.h) > $@
+ $< > $@
$(srcdir)/plug-in-enums.c: xgen-pec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/text/Makefile.am b/app/text/Makefile.am
index 44966e1..c0a5a91 100644
--- a/app/text/Makefile.am
+++ b/app/text/Makefile.am
@@ -58,16 +58,16 @@ gen_sources = xgen-tec
CLEANFILES = $(gen_sources)
xgen-tec: $(srcdir)/text-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"text-enums.h\"\n#include \"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- text-enums.h) > $@
+ $< > $@
$(srcdir)/text-enums.c: xgen-tec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/tools/Makefile.am b/app/tools/Makefile.am
index 73adcc3..3748f8a 100644
--- a/app/tools/Makefile.am
+++ b/app/tools/Makefile.am
@@ -235,16 +235,16 @@ gen_sources = xgen-tec
CLEANFILES = $(gen_sources)
xgen-tec: $(srcdir)/tools-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"core/core-enums.h\"\n#include \"tools-enums.h\"\n#include
\"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- tools-enums.h) > $@
+ $< > $@
$(srcdir)/tools-enums.c: xgen-tec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am
index 66e0994..8eb0df7 100644
--- a/app/widgets/Makefile.am
+++ b/app/widgets/Makefile.am
@@ -463,16 +463,16 @@ gen_sources = xgen-wec
CLEANFILES = $(gen_sources)
xgen-wec: $(srcdir)/widgets-enums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gtk/gtk.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"widgets-enums.h\"\n#include \"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- widgets-enums.h) > $@
+ $< > $@
$(srcdir)/widgets-enums.c: xgen-wec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/libgimp/Makefile.am b/libgimp/Makefile.am
index 5ae5e6a..cc31d3a 100644
--- a/libgimp/Makefile.am
+++ b/libgimp/Makefile.am
@@ -453,7 +453,7 @@ gimpenums.c: $(srcdir)/gimpenums.h $(srcdir)/gimpenums.c.tail $(GIMP_MKENUMS) Ma
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- $(srcdir)/gimpenums.h > xgen-cec \
+ $< > xgen-cec \
&& cat $(srcdir)/gimpenums.c.tail >> xgen-cec \
&& cp xgen-cec $(@F) \
&& rm -f xgen-cec
diff --git a/libgimpbase/Makefile.am b/libgimpbase/Makefile.am
index fff0dd3..12bcfd6 100644
--- a/libgimpbase/Makefile.am
+++ b/libgimpbase/Makefile.am
@@ -202,16 +202,16 @@ gen_sources = xgen-bec xgen-cec
CLEANFILES = $(EXTRA_PROGRAMS) $(gen_sources)
xgen-bec: $(srcdir)/gimpbaseenums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#undef
GIMP_DISABLE_DEPRECATED\n#include \"gimpbasetypes.h\"\n#include \"libgimp/libgimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- gimpbaseenums.h) > $@
+ $< > $@
$(srcdir)/gimpbaseenums.c: xgen-bec
$(AM_V_GEN) if ! cmp -s $< $@; then \
@@ -225,16 +225,16 @@ $(srcdir)/gimpbaseenums.c: xgen-bec
fi
xgen-cec: $(srcdir)/gimpcompatenums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include
\"gimpbasetypes.h\"\n#include \"gimpcompatenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- gimpcompatenums.h) > $@
+ $< > $@
$(srcdir)/gimpcompatenums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/libgimpconfig/Makefile.am b/libgimpconfig/Makefile.am
index 1464686..9c052c9 100644
--- a/libgimpconfig/Makefile.am
+++ b/libgimpconfig/Makefile.am
@@ -139,16 +139,16 @@ gen_sources = xgen-cec
CLEANFILES = $(gen_sources)
xgen-cec: $(srcdir)/gimpconfigenums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"gimpconfigenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- gimpconfigenums.h) > $@
+ $< > $@
$(srcdir)/gimpconfigenums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/libgimpthumb/Makefile.am b/libgimpthumb/Makefile.am
index 267f1aa..ecb9933 100644
--- a/libgimpthumb/Makefile.am
+++ b/libgimpthumb/Makefile.am
@@ -118,6 +118,6 @@ gimpthumb-enums.c: $(srcdir)/gimpthumb-enums.h $(GIMP_MKENUMS) Makefile.am
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n type = g_@type@_register_static (\"@EnumName@\", values);\n\n return type;\n}\n" \
- $(srcdir)/gimpthumb-enums.h > xgen-tec \
+ $< > xgen-tec \
&& cp xgen-tec $(@F) \
&& rm -f xgen-tec
diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am
index 0ad3e55..dd7b855 100644
--- a/libgimpwidgets/Makefile.am
+++ b/libgimpwidgets/Makefile.am
@@ -308,16 +308,16 @@ gen_sources = xgen-wec xgen-wmh xgen-wmc
CLEANFILES = $(gen_sources)
xgen-wec: $(srcdir)/gimpwidgetsenums.h $(GIMP_MKENUMS) Makefile.am
- $(AM_V_GEN) (cd $(srcdir) && $(GIMP_MKENUMS) \
+ $(AM_V_GEN) $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include
\"libgimpbase/gimpbase.h\"\n#include \"gimpwidgetsenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
+ --fprod "\n/* enumerations from \"@basename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (!
type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n
gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type,
descs);\n }\n\n return type;\n}\n" \
- gimpwidgetsenums.h) > $@
+ $< > $@
$(srcdir)/gimpwidgetsenums.c: xgen-wec
$(AM_V_GEN) if ! cmp -s $< $@; then \
diff --git a/tools/gimp-mkenums b/tools/gimp-mkenums
index b78d175..cb919ac 100755
--- a/tools/gimp-mkenums
+++ b/tools/gimp-mkenums
@@ -9,6 +9,7 @@
# value is by default put into the N_() macro.
use Text::ParseWords;
+use File::Basename;
# gimp-mkenums
# Information about the current enumeration
@@ -178,6 +179,7 @@ sub usage {
print STDERR " \@Type\@ either Enum or Flags\n";
print STDERR " \@TYPE\@ either ENUM or FLAGS\n";
print STDERR " \@filename\@ name of current input file\n";
+ print STDERR " \@basename\@ basename of current input file\n";
exit 0;
}
@@ -228,6 +230,7 @@ if (length($fhead)) {
my $prod = $fhead;
$prod =~ s/\@filename\@/$ARGV[0]/g;
+ $prod =~ s/\@basename\@/basename($ARGV[0])/ge;
$prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
$prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
@@ -376,6 +379,7 @@ while (<>) {
my $prod = $fprod;
$prod =~ s/\@filename\@/$ARGV/g;
+ $prod =~ s/\@basename\@/basename($ARGV)/ge;
$prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
$prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
@@ -516,6 +520,7 @@ if (length($ftail)) {
my $prod = $ftail;
$prod =~ s/\@filename\@/$ARGV/g;
+ $prod =~ s/\@basename\@/basename($ARGV)/ge;
$prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
$prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]