Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: native_client_sdk/src/tools/common.mk

Issue 12220085: [NaCl SDK] Print nice error if host build can't find gcc or cl.exe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/tools/oshelpers.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/common.mk
diff --git a/native_client_sdk/src/tools/common.mk b/native_client_sdk/src/tools/common.mk
index 1a340fb72bf38ed3e896ad6bca33184461e90df8..909fcf6f674ccc22e02af421e960ab38449e13b5 100644
--- a/native_client_sdk/src/tools/common.mk
+++ b/native_client_sdk/src/tools/common.mk
@@ -69,6 +69,7 @@ CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp
MKDIR:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir
MV:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mv
RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm
+WHICH:=python $(NACL_SDK_ROOT)/tools/oshelpers.py which
#
@@ -107,8 +108,25 @@ endef
# The target for all versions
#
USABLE_TOOLCHAINS=$(filter $(OSNAME) newlib glibc pnacl,$(VALID_TOOLCHAINS))
+
+ifeq (1,$(NO_HOST_BUILDS))
+USABLE_TOOLCHAINS:=$(filter-out $(OSNAME),$(USABLE_TOOLCHAINS))
noelallen_use_chromium 2013/02/09 00:55:57 $(warning Skipping host builds)
+endif
+
+.PHONY: CHECK_FOR_CL_EXE
+CHECK_FOR_CL_EXE:
+ifneq (,$(findstring win,$(USABLE_TOOLCHAINS)))
+ifeq (,$(findstring cl.exe,$(shell $(WHICH) cl.exe)))
+ $(warning To skip the host build use:)
+ $(warning "make all_versions NO_HOST_BUILDS=1")
+ $(error Unable to find cl.exe in PATH while building Windows host build)
+endif
+endif
noelallen_use_chromium 2013/02/09 00:55:57 Won't this generate an empty target warning/error
+
$(foreach tool,$(USABLE_TOOLCHAINS),$(eval $(call TOOLCHAIN_RULE,$(tool),$(dep))))
-all_versions: $(TOOLCHAIN_LIST)
+
+.PHONY: all_versions
+all_versions: CHECK_FOR_CL_EXE $(TOOLCHAIN_LIST)
#
# Target to remove temporary files
« no previous file with comments | « no previous file | native_client_sdk/src/tools/oshelpers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698