[jhbuild] make: Add meson support for unknown modules
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] make: Add meson support for unknown modules
- Date: Sun, 1 Apr 2018 12:48:23 +0000 (UTC)
commit 1aa92aed2e7431b247e09fe63e43fa85931f26c5
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 8 17:32:04 2018 +0100
make: Add meson support for unknown modules
When "jhbuild make" encounters an unknown module, try to see whether
the Meson build system should be used rather than automatically using
autotools.
https://bugzilla.gnome.org/show_bug.cgi?id=794179
jhbuild/commands/make.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/commands/make.py b/jhbuild/commands/make.py
index 1d72637..9864989 100644
--- a/jhbuild/commands/make.py
+++ b/jhbuild/commands/make.py
@@ -89,8 +89,16 @@ class cmd_make(Command):
if not default_repo:
logging.error(_('No module matching current directory %r in the moduleset') % (modname, ))
return False
- from jhbuild.modtypes.autotools import AutogenModule
- module = AutogenModule(modname, default_repo.branch(modname))
+
+ # Try meson first, then autotools
+ print (os.path.join(self.get_cwd(), 'meson.build'))
+ if os.path.exists(os.path.join(self.get_cwd(), 'meson.build')):
+ from jhbuild.modtypes.meson import MesonModule
+ module = MesonModule(modname, default_repo.branch(modname))
+ else:
+ from jhbuild.modtypes.autotools import AutogenModule
+ module = AutogenModule(modname, default_repo.branch(modname))
+
module.config = config
logging.info(_('module "%(modname)s" does not exist, created automatically using repository
"%(reponame)s"') % \
{'modname': modname, 'reponame': default_repo.name})
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]