mirror of https://gitlab.com/ita1024/waf.git
Remove atleast-version, exact-version and max-version from conf.check_cfg
This commit is contained in:
parent
ac2ebb2ccc
commit
ceedab882d
|
@ -7,3 +7,4 @@ NEW IN WAF 2.0.0
|
||||||
* Remove Node.sig and Node.cache_sig
|
* Remove Node.sig and Node.cache_sig
|
||||||
* Remove the BuildContext.rule decorator
|
* Remove the BuildContext.rule decorator
|
||||||
* Remove Task.update_outputs, Task.always_run
|
* Remove Task.update_outputs, Task.always_run
|
||||||
|
* Remove atleast-version, exact-version and max-version from conf.check_cfg
|
||||||
|
|
1
TODO
1
TODO
|
@ -5,4 +5,5 @@ Merge mem_reducer.py in the mainline
|
||||||
Improve the sorting in TaskGen.post()
|
Improve the sorting in TaskGen.post()
|
||||||
Remove ut_exec, ut_cmd from waf_unit_test.py
|
Remove ut_exec, ut_cmd from waf_unit_test.py
|
||||||
Better logging?
|
Better logging?
|
||||||
|
Utils.exc_stack
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,6 @@ WAF_CONFIG_H = 'config.h'
|
||||||
DEFKEYS = 'define_key'
|
DEFKEYS = 'define_key'
|
||||||
INCKEYS = 'include_key'
|
INCKEYS = 'include_key'
|
||||||
|
|
||||||
cfg_ver = {
|
|
||||||
'atleast-version': '>=',
|
|
||||||
'exact-version': '==',
|
|
||||||
'max-version': '<=',
|
|
||||||
}
|
|
||||||
|
|
||||||
SNIP_FUNCTION = '''
|
SNIP_FUNCTION = '''
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
void (*p)();
|
void (*p)();
|
||||||
|
@ -269,19 +263,6 @@ def validate_cfg(self, kw):
|
||||||
if not 'msg' in kw:
|
if not 'msg' in kw:
|
||||||
kw['msg'] = 'Checking for %r' % (kw['package'] or kw['path'])
|
kw['msg'] = 'Checking for %r' % (kw['package'] or kw['path'])
|
||||||
|
|
||||||
for x in cfg_ver:
|
|
||||||
# Gotcha: only one predicate is allowed at a time
|
|
||||||
# TODO remove in waf 2.0
|
|
||||||
y = x.replace('-', '_')
|
|
||||||
if y in kw:
|
|
||||||
package = kw['package']
|
|
||||||
if Logs.verbose:
|
|
||||||
Logs.warn('Passing %r to conf.check_cfg() is obsolete, pass parameters directly, eg:', y)
|
|
||||||
Logs.warn(" conf.check_cfg(package='%s', args=['--libs', '--cflags', '%s >= 1.6'])", package, package)
|
|
||||||
if not 'msg' in kw:
|
|
||||||
kw['msg'] = 'Checking for %r %s %s' % (package, cfg_ver[x], kw[y])
|
|
||||||
break
|
|
||||||
|
|
||||||
@conf
|
@conf
|
||||||
def exec_cfg(self, kw):
|
def exec_cfg(self, kw):
|
||||||
"""
|
"""
|
||||||
|
@ -333,16 +314,6 @@ def exec_cfg(self, kw):
|
||||||
kw['okmsg'] = 'yes'
|
kw['okmsg'] = 'yes'
|
||||||
return
|
return
|
||||||
|
|
||||||
for x in cfg_ver:
|
|
||||||
# TODO remove in waf 2.0
|
|
||||||
y = x.replace('-', '_')
|
|
||||||
if y in kw:
|
|
||||||
self.cmd_and_log(path + ['--%s=%s' % (x, kw[y]), kw['package']], env=env)
|
|
||||||
if not 'okmsg' in kw:
|
|
||||||
kw['okmsg'] = 'yes'
|
|
||||||
define_it()
|
|
||||||
break
|
|
||||||
|
|
||||||
# single version for a module
|
# single version for a module
|
||||||
if 'modversion' in kw:
|
if 'modversion' in kw:
|
||||||
version = self.cmd_and_log(path + ['--modversion', kw['modversion']], env=env).strip()
|
version = self.cmd_and_log(path + ['--modversion', kw['modversion']], env=env).strip()
|
||||||
|
|
Loading…
Reference in New Issue