summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 17:30:14 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 17:30:14 +0000
commit9d5b049276645363a9d9fd38b0fb5717a1fe69a0 (patch)
treebcac7e02b7e14218f9f47f059e2f38ba8ffd6f69
parent3be605aa031a5d3fe5922fadeafd01918a0e190a (diff)
downloadchromium_src-9d5b049276645363a9d9fd38b0fb5717a1fe69a0.zip
chromium_src-9d5b049276645363a9d9fd38b0fb5717a1fe69a0.tar.gz
chromium_src-9d5b049276645363a9d9fd38b0fb5717a1fe69a0.tar.bz2
[NaCl SDK] "make run" should make all, then run webserver.
This was broken recently when I tried to use MAKECMDGOALS to generate the same target for "make all" and "make clean". Because "make run" depends on the all target, it was recursively running "make run" on all subdirectories. This CL also fixes the path to httpd.py. BUG=241610 R=sbc@chromium.org Review URL: https://codereview.chromium.org/15331004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201327 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--native_client_sdk/src/build_tools/generate_make.py2
-rw-r--r--native_client_sdk/src/examples/Makefile17
2 files changed, 12 insertions, 7 deletions
diff --git a/native_client_sdk/src/build_tools/generate_make.py b/native_client_sdk/src/build_tools/generate_make.py
index c5d8e91..452300c 100644
--- a/native_client_sdk/src/build_tools/generate_make.py
+++ b/native_client_sdk/src/build_tools/generate_make.py
@@ -226,7 +226,7 @@ def GenerateMasterMakefile(pepperdir, out_path, targets):
"""
in_path = os.path.join(SDK_EXAMPLE_DIR, 'Makefile')
out_path = os.path.join(out_path, 'Makefile')
- rel_path = os.path.relpath(pepperdir, out_path)
+ rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path))
template_dict = {
'projects': targets,
'rel_sdk' : rel_path,
diff --git a/native_client_sdk/src/examples/Makefile b/native_client_sdk/src/examples/Makefile
index e21cbe8..84110b5 100644
--- a/native_client_sdk/src/examples/Makefile
+++ b/native_client_sdk/src/examples/Makefile
@@ -31,10 +31,15 @@ all:
# each project can be built in parallel.
#
define TARGET
-TARGET_LIST+=$(1)_TARGET
-.PHONY: $(1)_TARGET
-$(1)_TARGET:
- +$(MAKE) -C $(1) $(TOOLCHAIN_ARG) $(MAKECMDGOALS)
+ALL_TARGET_LIST+=$(1)_ALL_TARGET
+.PHONY: $(1)_ALL_TARGET
+$(1)_ALL_TARGET:
+ +$(MAKE) -C $(1) $(TOOLCHAIN_ARG) all
+
+CLEAN_TARGET_LIST+=$(1)_CLEAN_TARGET
+.PHONY: $(1)_CLEAN_TARGET
+$(1)_CLEAN_TARGET:
+ +$(MAKE) -C $(1) $(TOOLCHAIN_ARG) clean
endef
@@ -42,11 +47,11 @@ endef
$(foreach proj,$(PROJECTS),$(eval $(call TARGET,$(proj))))
.PHONY: all
-all: $(TARGET_LIST)
+all: $(ALL_TARGET_LIST)
@echo Done building targets.
.PHONY: clean
-clean: $(TARGET_LIST)
+clean: $(CLEAN_TARGET_LIST)
@echo Done cleaning targets.
.PHONY: run