app, libgimp*: (meson) fix all the generated `*-enums.c`.

More of the files were wrong, or at least not absolutely identical to
the files generated by the autotools. I am not doing any code change
other than trying to make both build systems produce identical files
(except for slight differences on 2 files not worth the effort) even
though maybe some things can be improved (especially on the include
list). Maybe to be improved later.

Also fixing 2 of the previously autotools-generated files because of
space typos which should have been committed earlier.

Finally it is to be noted that there is no logics to copy the generated
files back to the source directory in the meson rules. I am not sure
anyway this is really worth it and maybe we should just stop tracking
these generated files eventually.
This commit is contained in:
Jehan 2019-10-19 22:18:50 +02:00
parent 5d79fba823
commit b8d8424ae0
18 changed files with 154 additions and 49 deletions

View File

@ -5,7 +5,7 @@
#include <gio/gio.h>
#include "libgimpbase/gimpbase.h"
#include "config-enums.h"
#include"gimp-intl.h"
#include "gimp-intl.h"
/* enumerations from "config-enums.h" */
GType

View File

@ -2,7 +2,16 @@
appconfigenums = custom_target('config-enums.c',
input : [ 'config-enums.h', ],
output: [ 'config-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -2,7 +2,16 @@
appcoreenums = custom_target('core-enums',
input : [ 'core-enums.h', ],
output: [ 'core-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -5,7 +5,7 @@
#include <gio/gio.h>
#include "libgimpbase/gimpbase.h"
#include "display-enums.h"
#include"gimp-intl.h"
#include "gimp-intl.h"
/* enumerations from "display-enums.h" */
GType

View File

@ -2,7 +2,16 @@
appdisplayenums = custom_target('display-enums.c',
input : [ 'display-enums.h', ],
output: [ 'display-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -2,7 +2,17 @@
appgeglenums = custom_target('gimp-gegl-enums.c',
input : [ 'gimp-gegl-enums.h', ],
output: [ 'gimp-gegl-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "core/core-enums.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -1,14 +1,21 @@
rootAppInclude = include_directories('.')
app_mkenums_custom_target_command = [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "core/core-enums.h"\n'
+ '#include "@INPUT@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs = [
gimp_mkenums_custom_target_commonargs,
'--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',
]
subdir('actions')

View File

@ -2,7 +2,16 @@
appoperationsenums = custom_target('operations-enums.c',
input : [ 'operations-enums.h', ],
output: [ 'operations-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -2,7 +2,16 @@
apppaintenums = custom_target('paint-enums.c',
input : [ 'paint-enums.h', ],
output: [ 'paint-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -2,7 +2,16 @@
apppluginenums = custom_target('plug-in-enums.c',
input : [ 'plug-in-enums.h', ],
output: [ 'plug-in-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -2,7 +2,16 @@
apptextenums = custom_target('text-enums.c',
input : [ 'text-enums.h', ],
output: [ 'text-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -2,7 +2,17 @@
apptoolsenums = custom_target('tools-enums.c',
input : [ 'tools-enums.h', ],
output: [ 'tools-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "core/core-enums.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -2,7 +2,16 @@
appwidgetsenums = custom_target('widgets-enums.c',
input : [ 'widgets-enums.h', ],
output: [ 'widgets-enums.c', ],
command: app_mkenums_custom_target_command,
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'
+ '#include <gtk/gtk.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@basename@"\n'
+ '#include "gimp-intl.h"\n',
app_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -12,7 +12,8 @@ gimpenums_notail = custom_target('gimpenums.c.notail',
+ '#include "libgimpbase/gimpbase-private.h"\n'
+ '#include "libgimpconfig/gimpconfigenums.h"\n'
+ '#include "gimpenums.h"\n',
gimp_mkenums_custom_target_commonargs,
libgimp_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -16,7 +16,8 @@ gimpbaseenums = custom_target('gimpbaseenums.c',
+ '#undef GIMP_DISABLE_DEPRECATED\n'
+ '#include "gimpbasetypes.h"\n'
+ '#include "libgimp/libgimp-intl.h"\n',
gimp_mkenums_custom_target_commonargs,
libgimp_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)
@ -29,9 +30,10 @@ gimpcompatenums = custom_target('gimpcompatenums.c',
'--fhead','#include "config.h"\n'
+ '#include <glib-object.h>\n'
+ '#include "gimpbasetypes.h"\n'
+ '#include "@INPUT@"\n'
+ '#include "@basename@"\n'
+ '#include "libgimp/libgimp-intl.h"\n',
gimp_mkenums_custom_target_commonargs,
libgimp_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -7,9 +7,10 @@ gimpconfigenums = custom_target('gimpconfigenums.c',
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "@INPUT@"\n'
+ '#include "@basename@"\n'
+ '#include "libgimp/libgimp-intl.h"\n',
gimp_mkenums_custom_target_commonargs,
libgimp_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -7,9 +7,10 @@ gimpwidgetsenums = custom_target('gimpwidgetsenums.c',
'--fhead','#include "config.h"\n'
+ '#include <gio/gio.h>\n'
+ '#include "libgimpbase/gimpbase.h"\n'
+ '#include "gimpwidgetsenums.h"\n'
+ '#include "@basename@"\n'
+ '#include "libgimp/libgimp-intl.h"\n',
gimp_mkenums_custom_target_commonargs,
libgimp_mkenums_custom_target_commonargs,
'@INPUT@',
],
capture: true,
)

View File

@ -1092,30 +1092,31 @@ gimp_mkenums_custom_target_commonargs = [
'--dhead',' static const Gimp@Type@Desc descs[] =\n'+
' {',
'--dprod',' { @VALUENAME@, @valuedesc@, @valuehelp@ },'+
'@if (\'@valueabbrev@\' ne \'NULL\')@ \n'+
' /* Translators:\n'+
' this is an abbreviated version of @valueudesc@.\n'+
'@if (\'@valueabbrev@\' ne \'NULL\')@\n'+
' /* Translators: this is an abbreviated version of @valueudesc@.\n'+
' Keep it short. */\n'+
' { @VALUENAME@, @valueabbrev@, NULL },\n'+
' @endif@',
'--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',
'@INPUT@',
' { @VALUENAME@, @valueabbrev@, NULL },'+
'@endif@',
]
libgimp_mkenums_custom_target_commonargs = [
gimp_mkenums_custom_target_commonargs,
'--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',
]
conf.set('ENABLE_NLS', true)
conf.set('HAVE_GETTEXT', true)