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

Unified Diff: native_client_sdk/src/examples/Makefile

Issue 15017017: [NaCl SDK] Before bundling, clean all built libraries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: parallel builds Created 7 years, 7 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 | « native_client_sdk/src/build_tools/build_sdk.py ('k') | native_client_sdk/src/tools/common.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/examples/Makefile
diff --git a/native_client_sdk/src/examples/Makefile b/native_client_sdk/src/examples/Makefile
index 6ca12be8a48d0d3466b70947babf863baeb1f9cd..e21cbe814de267ba8cf196fe887d3b4ed6fdc1f6 100644
--- a/native_client_sdk/src/examples/Makefile
+++ b/native_client_sdk/src/examples/Makefile
@@ -14,6 +14,10 @@ PROJECTS:= \
HTTPD:={{rel_sdk}}/tools/httpd.py
+ifeq ($(TOOLCHAIN),all)
+TOOLCHAIN_ARG:=TOOLCHAIN=all
+endif
+
# Define the default target
all:
@@ -23,41 +27,37 @@ all:
# Macro defines a phony target for each example, and adds it to a list of
# targets.
#
+# Note: We use targets for each project (instead of an explicit recipe) so
+# each project can be built in parallel.
+#
define TARGET
TARGET_LIST+=$(1)_TARGET
.PHONY: $(1)_TARGET
$(1)_TARGET:
- +$(MAKE) -C $(1)
-
-VERSIONS_LIST+=$(1)_VERSIONS
-.PHONY: $(1)_VERSIONS
-$(1)_VERSIONS:
- +$(MAKE) -C $(1) all_versions
-
-CLEAN_LIST+=$(1)_CLEAN
-.PHONY: $(1)_CLEAN
-$(1)_CLEAN:
- +$(MAKE) -C $(1) clean
+ +$(MAKE) -C $(1) $(TOOLCHAIN_ARG) $(MAKECMDGOALS)
endef
# Define the various targets via the Macro
$(foreach proj,$(PROJECTS),$(eval $(call TARGET,$(proj))))
+.PHONY: all
all: $(TARGET_LIST)
@echo Done building targets.
-all_versions: $(VERSIONS_LIST)
- @echo Done building all versions.
-
-clean: $(CLEAN_LIST)
+.PHONY: clean
+clean: $(TARGET_LIST)
@echo Done cleaning targets.
+.PHONY: run
run: all
@echo Starting up python webserver.
python $(HTTPD)
-# uppercase aliases (for backward compatibility)
+# Phony aliases for backward compatibility
RUN: run
-.PHONY: RUN run
+all_versions:
+ +$(MAKE) TOOLCHAIN=all
+
+.PHONY: RUN all_versions
« no previous file with comments | « native_client_sdk/src/build_tools/build_sdk.py ('k') | native_client_sdk/src/tools/common.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698