Commit b90d9f49 authored by Jeremy Bicha's avatar Jeremy Bicha 🎹

meson: get filebrowser plugin working again

This won't work on Windows but it's good enough for now.

This functionally matches what autotools did:
cat the 2 mkenums templates together. It feels a
bit messy to me but it seems to make sense.
parent c1307edb
Pipeline #54042 passed with stage
in 8 minutes and 44 seconds
......@@ -5,7 +5,7 @@ gedit_file_browser_enum_and_flag_register_type (GTypeModule * module)
/*** END file-header ***/
/*** BEGIN file-production ***/
/* Enumerations from "@filename@" */
/* Enumerations from "@basename@" */
/*** END file-production ***/
......
......@@ -5,7 +5,7 @@
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
#include "@filename@"
#include "@basename@"
/*** END file-production ***/
......
......@@ -9,7 +9,7 @@ G_BEGIN_DECLS
/*** END file-header ***/
/*** BEGIN file-production ***/
/* Enumerations from "@filename@" */
/* Enumerations from "@basename@" */
/*** END file-production ***/
......
......@@ -29,15 +29,36 @@ libfilebrowser_c_args = [
subdir('messages')
libfilebrowser_enums = gnome.mkenums(
libfilebrowser_register_enums = gnome.mkenums(
'gedit-file-browser-enum-register',
sources: libfilebrowser_public_h,
c_template: 'gedit-file-browser-enum-register.c.template',
)
libfilebrowser_type_enums = gnome.mkenums(
'gedit-file-browser-enum-types',
depends : [libfilebrowser_register_enums],
sources: libfilebrowser_public_h,
h_template: 'gedit-file-browser-enum-types.h.template',
c_template: 'gedit-file-browser-enum-types.c.template',
c_template: 'gedit-file-browser-enum-types-stage1.c.template',
)
# cat won't work on Windows so this
# will need to be reimplemented as a script
cat = find_program('cat')
# Combine the 2 C mkenums templates together before compiling
libfilebrowser_enums_c = custom_target('libfilebrowser_enums_c',
input: [libfilebrowser_type_enums.get(0),
libfilebrowser_register_enums],
output: 'gedit-file-browser-enum-types.c',
command: [cat, '@INPUT0@', '@INPUT1@'],
# redirects the command output since we can't use >> here
capture: true,
)
libfilebrowser_sources += [
libfilebrowser_enums.get(0),
libfilebrowser_enums_c,
]
subdir('resources')
......
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