androidmk: clean up nested comparisons for local variable names
Change-Id: If84dbce05f1a28a562c8dba3eceedfe92b8d5ba5
This commit is contained in:
@@ -236,24 +236,21 @@ func handleAssignment(file *bpFile, assignment mkparser.Assignment, c *condition
|
||||
} else if _, ok := deleteProperties[name]; ok {
|
||||
return
|
||||
} else {
|
||||
if name == "LOCAL_PATH" {
|
||||
switch {
|
||||
case name == "LOCAL_PATH":
|
||||
// Nothing to do, except maybe avoid the "./" in paths?
|
||||
} else if name == "LOCAL_ARM_MODE" {
|
||||
case name == "LOCAL_ARM_MODE":
|
||||
// This is a hack to get the LOCAL_ARM_MODE value inside
|
||||
// of an arch: { arm: {} } block.
|
||||
armModeAssign := assignment
|
||||
armModeAssign.Name = mkparser.SimpleMakeString("LOCAL_ARM_MODE_HACK_arm", assignment.Name.Pos)
|
||||
handleAssignment(file, armModeAssign, c)
|
||||
} else if strings.HasPrefix(name, "LOCAL_") {
|
||||
//setVariable(file, assignment, name, bpparser.String, true)
|
||||
switch name {
|
||||
case "LOCAL_ADDITIONAL_DEPENDENCIES":
|
||||
// TODO: check for only .mk files?
|
||||
default:
|
||||
file.errorf(assignment, "unsupported assignment to %s", name)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
case name == "LOCAL_ADDITIONAL_DEPENDENCIES":
|
||||
// TODO: check for only .mk files?
|
||||
case strings.HasPrefix(name, "LOCAL_"):
|
||||
file.errorf(assignment, "unsupported assignment to %s", name)
|
||||
return
|
||||
default:
|
||||
err = setVariable(file, assignment.Value, assignment.Type == "+=", name, bpparser.List, false, class, suffix)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user