2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-23 18:29:27 +01:00

Remove other options if necessary

This commit is contained in:
Waf Project 2024-11-12 07:50:26 +08:00
parent 1ecad4f34a
commit 7c73e0b4dd
2 changed files with 4 additions and 4 deletions

View File

@ -194,17 +194,17 @@ class ConfigurationContext(Context.Context):
:param env: a ConfigSet, usually ``conf.env``
"""
if not env.PREFIX:
if Options.options.prefix or Utils.is_win32:
if getattr(Options.options, 'prefix', None):
env.PREFIX = Options.options.prefix
else:
env.PREFIX = '/'
if not env.BINDIR:
if Options.options.bindir:
if getattr(Options.options, 'bindir', None):
env.BINDIR = Options.options.bindir
else:
env.BINDIR = Utils.subst_vars('${PREFIX}/bin', env)
if not env.LIBDIR:
if Options.options.libdir:
if getattr(Options.options, 'libdir', None):
env.LIBDIR = Options.options.libdir
else:
env.LIBDIR = Utils.subst_vars('${PREFIX}/lib%s' % Utils.lib64(), env)

View File

@ -174,7 +174,7 @@ class OptionsContext(Context.Context):
gr = self.add_option_group('Installation and uninstallation options')
gr.add_option('--destdir', help='installation root [default: %r]' % default_destdir, default=default_destdir, dest='destdir')
gr.add_option('-f', '--force', dest='force', default=False, action='store_true', help='force file installation')
gr.add_option('-f', '--force', dest='force', default=False, action='store_true', help='disable file installation caching')
gr.add_option('--distcheck-args', metavar='ARGS', help='arguments to pass to distcheck', default=None, action='store')
def jobs(self):