From 95122204f4a1e193b4cccd2a7bdebb4000e65570 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Wed, 7 May 2014 13:01:07 -0600 Subject: [PATCH] add sanity checks for makefile parameters --- makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/makefile b/makefile index 560364a5a4..6039c2a475 100755 --- a/makefile +++ b/makefile @@ -50,6 +50,22 @@ ifeq ($(codegen-targets),all) options := $(options)-all endif +ifeq ($(filter debug debug-fast fast small,$(mode)),) + x := $(error "'$(mode)' is not a valid mode (choose one of: debug debug-fast fast small)") +endif + +ifeq ($(filter compile interpret,$(process)),) + x := $(error "'$(process)' is not a valid process (choose one of: compile interpret)") +endif + +ifeq ($(filter x86_64 i386 arm,$(arch)),) + x := $(error "'$(arch)' is not a supported architecture (choose one of: x86_64 i386 arm)") +endif + +ifeq ($(filter linux windows darwin freebsd,$(platform)),) + x := $(error "'$(platform)' is not a supported platform (choose one of: linux windows darwin freebsd)") +endif + aot-only = false root := $(shell (cd .. && pwd)) build = build/$(platform)-$(arch)$(options) @@ -107,6 +123,10 @@ ifneq ($(openjdk),) openjdk-arch = amd64 endif + ifneq ($(android),) + x := $(error "android and openjdk are incompatible") + endif + ifneq ($(openjdk-src),) include openjdk-src.mk options := $(options)-openjdk-src