androidmk: add support for ifdef USE_MINGW
Change-Id: Ib3436cb4fd2469f5be2f7ee1525709eb1e143dbf
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 9396afe..8bbd4e3 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -102,6 +102,7 @@
"($(BUILD_OS), darwin)": {"target", "darwin"},
"($(BUILD_OS),linux)": {"target", "linux"},
"($(BUILD_OS), linux)": {"target", "linux"},
+ "USE_MINGW": {"target", "windows"},
}
func mydir(args []string) string {
diff --git a/androidmk/cmd/androidmk/androidmk.go b/androidmk/cmd/androidmk/androidmk.go
index 178ce09..555e593 100644
--- a/androidmk/cmd/androidmk/androidmk.go
+++ b/androidmk/cmd/androidmk/androidmk.go
@@ -117,9 +117,9 @@
file.errorf(directive, "unsupported include")
continue
}
- case "ifeq", "ifneq":
+ case "ifeq", "ifneq", "ifdef", "ifndef":
args := directive.Args.Dump()
- eq := directive.Name == "ifeq"
+ eq := directive.Name == "ifeq" || directive.Name == "ifdef"
if _, ok := conditionalTranslations[args]; ok {
newCond := conditional{args, eq}
conds = append(conds, &newCond)