[gtk+/wip/baedert/meson] build: Generate gtktypebuiltinsprivate.{c, h}
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/meson] build: Generate gtktypebuiltinsprivate.{c, h}
- Date: Tue, 23 Aug 2016 06:21:49 +0000 (UTC)
commit ac5019745d83cfe4be9f520ed984018acc82ea67
Author: Timm Bäder <mail baedert org>
Date: Tue Aug 23 08:21:54 2016 +0200
build: Generate gtktypebuiltinsprivate.{c,h}
gdk/build_enum.py => build_enum.py | 17 +++++------------
gdk/meson.build | 11 +++--------
meson.build | 4 ++++
3 files changed, 12 insertions(+), 20 deletions(-)
---
diff --git a/gdk/build_enum.py b/build_enum.py
similarity index 61%
rename from gdk/build_enum.py
rename to build_enum.py
index 9705497..c8e8322 100755
--- a/gdk/build_enum.py
+++ b/build_enum.py
@@ -6,21 +6,14 @@
# backends is a fool's errand.
import sys, os, shutil, subprocess
-
-# HORRIBLE, use current_source_dir() as an argument instead.
-h_array = ['--template', '../gdk/gdkenumtypes.h.template']
-
-c_array = ['--template', '../gdk/gdkenumtypes.c.template']
-
# [perl, glib-mkenums]
cmd = [sys.argv[1], sys.argv[2]]
-ofilename = sys.argv[3]
-headers = sys.argv[4:]
+template = sys.argv[3]
+ofilename = sys.argv[4]
+headers = sys.argv[5:]
+
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
+arg_array = ['--template', template];
pc = subprocess.Popen(cmd + arg_array + headers, stdout=subprocess.PIPE)
(stdo, _) = pc.communicate()
diff --git a/gdk/meson.build b/gdk/meson.build
index 8165a01..ef193d2 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -220,21 +220,16 @@ deprecated_h_sources = ['deprecated/gdkcolor.h']
gdk_headers = gdk_public_h_sources + deprecated_h_sources
-mkenum = find_program('build_enum.py')
-perl = find_program('perl')
-glib_mkenums = find_program('glib-mkenums')
-
-
gdkenum_h = custom_target('gdkenum_h',
output : 'gdkenumtypes.h',
input : gdk_headers,
- command : [mkenum, perl, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+ command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.h.template',
'@OUTPUT@', '@INPUT@'])
gdkenum_c = custom_target('gdkenum_c',
output : 'gdkenumtypes.c',
input : gdk_headers,
- depends : [gdkenum_h],
- command : [mkenum, perl, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+ depends : gdkenum_h,
+ command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.c.template',
'@OUTPUT@', '@INPUT@'])
gdkmarshal_h = custom_target('gdkmarshal_h',
output : 'gdkmarshall.h',
diff --git a/meson.build b/meson.build
index d70de78..379cdfe 100644
--- a/meson.build
+++ b/meson.build
@@ -26,6 +26,10 @@ broadway_enabled = get_option('enable-broadway-backend')
mkmarshal = find_program('build_marshal.py')
glib_marshal = find_program('glib-genmarshal')
+mkenum = find_program('build_enum.py')
+perl = find_program('perl')
+glib_mkenums = find_program('glib-mkenums')
+
cc = meson.get_compiler('c')
cdata = configuration_data()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]