aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--androidmk/cmd/androidmk/android.go10
-rw-r--r--androidmk/cmd/androidmk/androidmk.go6
2 files changed, 8 insertions, 8 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 7fd9919d..71c58321 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -87,10 +87,12 @@ var conditionalTranslations = map[string]struct {
class string
suffix string
}{
- "($(HOST_OS),darwin)": {"host_os", "darwin"},
- "($(HOST_OS), darwin)": {"host_os", "darwin"},
- "($(HOST_OS),windows)": {"host_os", "windows"},
- "($(HOST_OS), windows)": {"host_os", "windows"},
+ "($(HOST_OS),darwin)": {"target", "darwin"},
+ "($(HOST_OS), darwin)": {"target", "darwin"},
+ "($(HOST_OS),windows)": {"target", "windows"},
+ "($(HOST_OS), windows)": {"target", "windows"},
+ "($(HOST_OS),linux)": {"target", "linux"},
+ "($(HOST_OS), linux)": {"target", "linux"},
}
func mydir(args []string) string {
diff --git a/androidmk/cmd/androidmk/androidmk.go b/androidmk/cmd/androidmk/androidmk.go
index 03888fe3..22b29b24 100644
--- a/androidmk/cmd/androidmk/androidmk.go
+++ b/androidmk/cmd/androidmk/androidmk.go
@@ -125,9 +125,7 @@ func main() {
case "ifeq", "ifneq":
args := directive.Args.Dump()
eq := directive.Name == "ifeq"
- switch args {
- case "($(HOST_OS),windows)", "($(HOST_OS), windows)",
- "($(HOST_OS),darwin)", "($(HOST_OS), darwin)":
+ if _, ok := conditionalTranslations[args]; ok {
newCond := conditional{args, eq}
conds = append(conds, &newCond)
if cond == nil {
@@ -135,7 +133,7 @@ func main() {
} else {
file.errorf(directive, "unsupported nested conditional")
}
- default:
+ } else {
file.errorf(directive, "unsupported conditional")
conds = append(conds, nil)
continue