From 7bc58671780b8d78f6d974ba93eb9e0e077b4ad9 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 12 Jan 2014 19:40:16 +0200 Subject: [PATCH] Can print and set paths with mesonconf. --- mesonconf.py | 27 ++++++++++++++++++++++++++- optinterpreter.py | 7 +++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/mesonconf.py b/mesonconf.py index 9f8a15cfd..de0e48826 100755 --- a/mesonconf.py +++ b/mesonconf.py @@ -87,6 +87,20 @@ class Conf: self.coredata.use_pch = self.tobool(v) elif k == 'unity': self.coredata.unity = self.tobool(v) + elif k == 'installprefix': + self.coredata.prefix = v + elif k == 'libdir': + self.coredata.libdir = v + elif k == 'bindir': + self.coredata.bindir = v + elif k == 'includedir': + self.coredata.includedir = v + elif k == 'datadir': + self.coredata.datadir = v + elif k == 'mandir': + self.coredata.mandir = v + elif k == 'localedir': + self.coredata.localedir = v else: if k not in self.coredata.user_options: raise ConfException('Unknown option %s.' % k) @@ -113,11 +127,22 @@ class Conf: carr = [] carr.append(['type', 'Build type', self.coredata.buildtype]) carr.append(['strip', 'Strip on install', self.coredata.strip]) - carr.append(['coverage', 'Coverage', self.coredata.coverage]) + carr.append(['coverage', 'Coverage report', self.coredata.coverage]) carr.append(['pch', 'Precompiled headers', self.coredata.use_pch]) carr.append(['unity', 'Unity build', self.coredata.unity]) self.print_aligned(carr) print('') + print('Directories\n') + parr = [] + parr.append(['installprefix', 'Install prefix', self.coredata.prefix]) + parr.append(['libdir', 'Library directory', self.coredata.libdir]) + parr.append(['bindir', 'Binary directory', self.coredata.bindir]) + parr.append(['includedir', 'Header directory', self.coredata.includedir]) + parr.append(['datadir', 'Data directory', self.coredata.datadir]) + parr.append(['mandir', 'Man page directory', self.coredata.mandir]) + parr.append(['localedir', 'Locale file directory', self.coredata.localedir]) + self.print_aligned(parr) + print('') print('Project options\n') options = self.coredata.user_options keys = list(options.keys()) diff --git a/optinterpreter.py b/optinterpreter.py index 8d42e1f8b..9be32ce06 100644 --- a/optinterpreter.py +++ b/optinterpreter.py @@ -22,6 +22,13 @@ forbidden_option_names = {'type': True, 'coverage': True, 'pch': True, 'unity': True, + 'installprefix': True, + 'libdir' : True, + 'bindir' : True, + 'includedir' : True, + 'datadir' : True, + 'mandir' : True, + 'localedir' : True, } class OptionException(coredata.MesonException):