mirror of https://gitlab.com/ita1024/waf.git
A more robust way of sorting commands in remote.py
This commit is contained in:
parent
6f18c1bd99
commit
c8bc800432
|
@ -125,13 +125,16 @@ class init(Context.Context):
|
||||||
def execute(self):
|
def execute(self):
|
||||||
for x in list(Context.g_module.variants):
|
for x in list(Context.g_module.variants):
|
||||||
self.make_variant(x)
|
self.make_variant(x)
|
||||||
for name in ('configure', 'clean', 'build', 'install'):
|
lst = ['remote']
|
||||||
if ('%s_all' % name) in Options.commands:
|
for k in Options.commands:
|
||||||
Options.commands.remove('%s_all' % name)
|
if k.endswith('_all'):
|
||||||
|
name = k.replace('_all', '')
|
||||||
for x in Context.g_module.variants:
|
for x in Context.g_module.variants:
|
||||||
Options.commands.insert(0, '%s_%s' % (name, x))
|
lst.append('%s_%s' % (name, x))
|
||||||
|
else:
|
||||||
Options.commands.insert(0, 'remote')
|
lst.append(k)
|
||||||
|
del Options.commands[:]
|
||||||
|
Options.commands += lst
|
||||||
|
|
||||||
def make_variant(self, x):
|
def make_variant(self, x):
|
||||||
for y in (BuildContext, CleanContext, InstallContext, UninstallContext):
|
for y in (BuildContext, CleanContext, InstallContext, UninstallContext):
|
||||||
|
@ -143,6 +146,7 @@ class init(Context.Context):
|
||||||
class tmp(ConfigurationContext):
|
class tmp(ConfigurationContext):
|
||||||
cmd = 'configure_' + x
|
cmd = 'configure_' + x
|
||||||
fun = 'configure'
|
fun = 'configure'
|
||||||
|
variant = x
|
||||||
def __init__(self, **kw):
|
def __init__(self, **kw):
|
||||||
ConfigurationContext.__init__(self, **kw)
|
ConfigurationContext.__init__(self, **kw)
|
||||||
self.setenv(x)
|
self.setenv(x)
|
||||||
|
|
Loading…
Reference in New Issue