A difference between waf 1.x and 2.x is that we gained 0 as an undefined
variable in the cache file. This does not allow to differentiate unset
and set to 0 defines.
Force to use empty tuple () to signify unset defines.
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
exec_args=exec_args,
define_ret=define_ret)
except Exception:
+ # Even when exception happened, conf.check might have set the define
+ # already to int(ret). We want to undefine it in the case of 'always'.
+ # Otherwise, we'd get defines set to 0 when they should be undefined
+ # and it foils #ifdef check
if always:
- conf.DEFINE(define, 0)
+ conf.undefine(define)
conf.COMPOUND_END(False)
if mandatory:
raise