diff options
author | Colin Cross <ccross@android.com> | 2015-04-16 13:33:59 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-04-16 14:06:12 -0700 |
commit | d560a9e192694f4edf37364c6995627918efaafd (patch) | |
tree | e03279646e2a53cbb270e9dee0374e78c1e95b7b /androidmk/cmd | |
parent | d0a3da2d88ed9f4cc2e2ae4387a1ec9236ef760c (diff) | |
download | build_soong-d560a9e192694f4edf37364c6995627918efaafd.tar.gz build_soong-d560a9e192694f4edf37364c6995627918efaafd.tar.bz2 build_soong-d560a9e192694f4edf37364c6995627918efaafd.zip |
androidmk: add support for ifdef USE_MINGW
Change-Id: Ib3436cb4fd2469f5be2f7ee1525709eb1e143dbf
Diffstat (limited to 'androidmk/cmd')
-rw-r--r-- | androidmk/cmd/androidmk/android.go | 1 | ||||
-rw-r--r-- | androidmk/cmd/androidmk/androidmk.go | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 9396afe3..8bbd4e35 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -102,6 +102,7 @@ var conditionalTranslations = map[string]struct { "($(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 178ce093..555e5930 100644 --- a/androidmk/cmd/androidmk/androidmk.go +++ b/androidmk/cmd/androidmk/androidmk.go @@ -117,9 +117,9 @@ func main() { 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) |