diff options
author | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2015-03-23 02:16:41 +0300 |
---|---|---|
committer | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2015-03-23 02:17:15 +0300 |
commit | e2b63141d08d3317b32acf8af7ce0854c7ffb1ee (patch) | |
tree | 8578e5c7eb640d9bfc4d3330a362ac957712ec0d /modules | |
parent | 888945ac2e6e212ee06ec7eaa6607b0faf1a2743 (diff) | |
download | meson-e2b63141d08d3317b32acf8af7ce0854c7ffb1ee.zip meson-e2b63141d08d3317b32acf8af7ce0854c7ffb1ee.tar.gz meson-e2b63141d08d3317b32acf8af7ce0854c7ffb1ee.tar.bz2 |
modules/gnome: use custom classes for targets. Closes #62
To easy identify which target we're building (for making files section
in rpm)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gnome.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/gnome.py b/modules/gnome.py index 53e26ee..80ee5fb 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -66,7 +66,7 @@ class GnomeModule: if kwargs.get('install'): scankwargs['install'] = kwargs['install'] scankwargs['install_dir'] = os.path.join(state.environment.get_datadir(), 'gir-1.0') - scan_target = build.CustomTarget(scan_name, state.subdir, scankwargs) + scan_target = GirTarget(scan_name, state.subdir, scankwargs) typelib_name = girtarget.name + '-typelib' typelib_output = '%s-%s.typelib' % (ns, nsversion) @@ -74,7 +74,7 @@ class GnomeModule: kwargs['output'] = typelib_output kwargs['command'] = typelib_cmd kwargs['install_dir'] = os.path.join(state.environment.get_libdir(), 'girepository-1.0') - typelib_target = build.CustomTarget(typelib_name, state.subdir, kwargs) + typelib_target = TypelibTarget(typelib_name, state.subdir, kwargs) return [scan_target, typelib_target] def compile_schemas(self, state, args, kwargs): @@ -115,3 +115,11 @@ def initialize(): mlog.log('Warning, glib compiled dependencies will not work until this upstream issue is fixed:', mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=745754')) return GnomeModule() + +class GirTarget(build.CustomTarget): + def __init__(self, name, subdir, kwargs): + super().__init__(name, subdir, kwargs) + +class TypelibTarget(build.CustomTarget): + def __init__(self, name, subdir, kwargs): + super().__init__(name, subdir, kwargs) |