Merge "Fix: negate the condition for is-vendor-board-qcom"

This commit is contained in:
Alexander Smundak 2021-11-05 21:30:58 +00:00 committed by Gerrit Code Review
commit d8b1998990
2 changed files with 4 additions and 2 deletions

View file

@ -1169,10 +1169,12 @@ func (ctx *parseContext) parseCheckFunctionCallResult(directive *mkparser.Direct
return ctx.newBadExpr(directive,
fmt.Sprintf("the result of %s can be compared only to empty", x.name)), true
}
// if the expression is ifneq (,$(call is-vendor-board-platform,...)), negate==true,
// so we should set inExpr.isNot to false
return &inExpr{
expr: &variableRefExpr{ctx.addVariable("TARGET_BOARD_PLATFORM"), false},
list: &variableRefExpr{ctx.addVariable("QCOM_BOARD_PLATFORMS"), true},
isNot: negate,
isNot: !negate,
}, true
default:
return ctx.newBadExpr(directive, "Unknown function in ifeq: %s", x.name), true

View file

@ -579,7 +579,7 @@ def init(g, handle):
pass
elif not rblf.board_platform_is(g, "copper"):
pass
elif g.get("TARGET_BOARD_PLATFORM", "") not in g["QCOM_BOARD_PLATFORMS"]:
elif g.get("TARGET_BOARD_PLATFORM", "") in g["QCOM_BOARD_PLATFORMS"]:
pass
`,
},