diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/coredata.py | 12 | ||||
-rw-r--r-- | mesonbuild/mconf.py | 1 | ||||
-rw-r--r-- | mesonbuild/mesonmain.py | 1 |
3 files changed, 9 insertions, 5 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 29ea1bf..1a5abcc 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -212,15 +212,17 @@ builtin_options = { 'datadir' : [ UserStringOption, 'Data file directory.', 'share' ], 'mandir' : [ UserStringOption, 'Manual page directory.', 'share/man' ], 'localedir' : [ UserStringOption, 'Locale data directory.', 'share/locale' ], - # Sysconfdir is a bit special. It defaults to ${prefix}/etc but nobody - # uses that. Instead they always set it manually to /etc. This default - # value is thus pointless and not really used but we set it to this + # sysconfdir and localstatedir are a bit special. These defaults to ${prefix}/etc and + # ${prefix}/var but nobody uses that. Instead they always set it manually to /etc and /var. + # This default values is thus pointless and not really used but we set it to this # for consistency with other systems. # - # Projects installing to sysconfdir probably want to set the following in project(): + # Projects installing to sysconfdir and/or localstatedir probably want + # to set the following in project(): # - # default_options : ['sysconfdir=/etc'] + # default_options : ['sysconfdir=/etc', 'localstatedir=/var'] 'sysconfdir' : [ UserStringOption, 'Sysconf data directory.', 'etc' ], + 'localstatedir' : [ UserStringOption, 'Localstate data directory.', 'var' ], 'werror' : [ UserBooleanOption, 'Treat warnings as errors.', False ], 'warning_level' : [ UserComboOption, 'Compiler warning level to use.', [ '1', '2', '3' ], '1'], 'layout' : [ UserComboOption, 'Build directory layout.', ['mirror', 'flat' ], 'mirror' ], diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 4ef8d92..6061d48 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -174,6 +174,7 @@ class Conf: 'mandir', 'localedir', 'sysconfdir', + 'localstatedir', ]: parr.append([key, coredata.get_builtin_option_description(key), self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)]) diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 71d42e3..4f31496 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -46,6 +46,7 @@ add_builtin_argument('datadir') add_builtin_argument('mandir') add_builtin_argument('localedir') add_builtin_argument('sysconfdir') +add_builtin_argument('localstatedir') add_builtin_argument('backend') add_builtin_argument('buildtype') add_builtin_argument('strip', action='store_true') |