diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-13 21:14:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 21:14:59 +0200 |
commit | 69bd87a71624e2e665c3d43d765a3c5fb1313c96 (patch) | |
tree | a58f541c74a1071ff916611b6316bbc62ab2b563 /mesonbuild/mesonmain.py | |
parent | c6781744cf0ff1c64a18d07a3d32d87a45d2faa7 (diff) | |
parent | 3e0069f65e58175d7979fac687c0bb5b3544b72e (diff) | |
download | meson-69bd87a71624e2e665c3d43d765a3c5fb1313c96.zip meson-69bd87a71624e2e665c3d43d765a3c5fb1313c96.tar.gz meson-69bd87a71624e2e665c3d43d765a3c5fb1313c96.tar.bz2 |
Merge pull request #2511 from jon-turney/prefix-dependent-defaults
Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefix
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index a1e7c1c..8d5fb85 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -37,7 +37,12 @@ def add_builtin_argument(name, **kwargs): h = h.rstrip('.') + ' (default: %s).' % coredata.get_builtin_option_default(k) if c and not b: kwargs['choices'] = c - parser.add_argument('--' + name, default=coredata.get_builtin_option_default(k), help=h, **kwargs) + default = coredata.get_builtin_option_default(k, noneIfSuppress=True) + if default is not None: + kwargs['default'] = default + else: + kwargs['default'] = argparse.SUPPRESS + parser.add_argument('--' + name, help=h, **kwargs) add_builtin_argument('prefix') add_builtin_argument('libdir') |