Make d1x=value imply d2x=0 and vice versa
This commit is contained in:
parent
d1b60c2324
commit
13d85fa38e
11
SConstruct
11
SConstruct
|
@ -2137,17 +2137,17 @@ class D2XProgram(DXXProgram):
|
||||||
def objects_editor(self):
|
def objects_editor(self):
|
||||||
return self.__objects_editor + DXXProgram.objects_editor.fget(self)
|
return self.__objects_editor + DXXProgram.objects_editor.fget(self)
|
||||||
|
|
||||||
variables = Variables(['site-local.py'], ARGUMENTS)
|
variables = Variables([v for (k,v) in ARGLIST if k == 'site'] or ['site-local.py'], ARGUMENTS)
|
||||||
filtered_help = FilterHelpText()
|
filtered_help = FilterHelpText()
|
||||||
variables.FormatVariableHelpText = filtered_help.FormatVariableHelpText
|
variables.FormatVariableHelpText = filtered_help.FormatVariableHelpText
|
||||||
def _filter_duplicate_prefix_elements(e,s):
|
def _filter_duplicate_prefix_elements(e,s):
|
||||||
r = e not in s
|
r = e not in s
|
||||||
s.add(e)
|
s.add(e)
|
||||||
return r
|
return r
|
||||||
def register_program(program):
|
def register_program(program,other_program):
|
||||||
s = program.shortname
|
s = program.shortname
|
||||||
import itertools
|
import itertools
|
||||||
l = [v for (k,v) in ARGLIST if k == s or k == 'dxx'] or [1]
|
l = [v for (k,v) in ARGLIST if k == s or k == 'dxx'] or [other_program.shortname not in ARGUMENTS]
|
||||||
# Fallback case: build the regular configuration.
|
# Fallback case: build the regular configuration.
|
||||||
if len(l) == 1:
|
if len(l) == 1:
|
||||||
try:
|
try:
|
||||||
|
@ -2169,8 +2169,8 @@ def register_program(program):
|
||||||
prefix = ['%s%s%s' % (s, '_' if p else '', p) for p in prefix] + list(prefix)
|
prefix = ['%s%s%s' % (s, '_' if p else '', p) for p in prefix] + list(prefix)
|
||||||
r.append(program(prefix, variables))
|
r.append(program(prefix, variables))
|
||||||
return r
|
return r
|
||||||
d1x = register_program(D1XProgram)
|
d1x = register_program(D1XProgram, D2XProgram)
|
||||||
d2x = register_program(D2XProgram)
|
d2x = register_program(D2XProgram, D1XProgram)
|
||||||
|
|
||||||
# show some help when running scons -h
|
# show some help when running scons -h
|
||||||
h = 'DXX-Rebirth, SConstruct file help:' + """
|
h = 'DXX-Rebirth, SConstruct file help:' + """
|
||||||
|
@ -2197,6 +2197,7 @@ unknown = variables.UnknownVariables()
|
||||||
unknown.pop('d1x', None)
|
unknown.pop('d1x', None)
|
||||||
unknown.pop('d2x', None)
|
unknown.pop('d2x', None)
|
||||||
unknown.pop('dxx', None)
|
unknown.pop('dxx', None)
|
||||||
|
unknown.pop('site', None)
|
||||||
ignore_unknown_variables = unknown.pop('ignore_unknown_variables', '0')
|
ignore_unknown_variables = unknown.pop('ignore_unknown_variables', '0')
|
||||||
if unknown:
|
if unknown:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue