summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 17:10:12 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 17:10:12 +0000
commit0f2fedde9d05d51f1529710a5a430d9bc05bfccb (patch)
treea293333a97138d31cdb368f43f3585e9d2843329 /native_client_sdk
parentd2415fba6c4c02d6f6d50126cf11af54654c4443 (diff)
downloadchromium_src-0f2fedde9d05d51f1529710a5a430d9bc05bfccb.zip
chromium_src-0f2fedde9d05d51f1529710a5a430d9bc05bfccb.tar.gz
chromium_src-0f2fedde9d05d51f1529710a5a430d9bc05bfccb.tar.bz2
[NaCl SDK] Fix recursive build w/ TOOLCHAIN=pnacl, etc.
We don't want to allow this: > examples/tutorial/dlopen$ make TOOLCHAIN=pnacl This should fail because the dlopen example doesn't support pnacl. But we do want this to work: > examples/tutorial$ make TOOLCHAIN=pnacl Because it should build everything in tutorial that supports pnacl. BUG=225747 R=sbc@chromium.org Review URL: https://codereview.chromium.org/18422002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209711 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rw-r--r--native_client_sdk/src/tools/common.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/native_client_sdk/src/tools/common.mk b/native_client_sdk/src/tools/common.mk
index 3344e08..ae8604d 100644
--- a/native_client_sdk/src/tools/common.mk
+++ b/native_client_sdk/src/tools/common.mk
@@ -78,10 +78,23 @@ else # TOOLCHAIN=all
# Verify we selected a valid toolchain for this example
#
ifeq (,$(findstring $(TOOLCHAIN),$(VALID_TOOLCHAINS)))
+
+# Only fail to build if this is a top-level make. When building recursively, we
+# don't care if an example can't build with this toolchain.
+ifeq ($(MAKELEVEL),0)
$(warning Availbile choices are: $(VALID_TOOLCHAINS))
$(error Can not use TOOLCHAIN=$(TOOLCHAIN) on this example.)
+else
+
+# Dummy targets for recursive make with unsupported toolchain...
+.PHONY: all clean install
+all:
+clean:
+install:
+
endif
+else # TOOLCHAIN is valid...
#
# Build Configuration
@@ -444,4 +457,6 @@ DEBUG: debug
LAUNCH: run
RUN: run
+endif # TOOLCHAIN is valid...
+
endif # TOOLCHAIN=all