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

Side by Side Diff: native_client_sdk/src/tools/common.mk

Issue 86053005: [NaCl SDK] Fix "make debug" and "make run" on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | native_client_sdk/src/tools/getos.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # 5 #
6 # GNU Make based build file. For details on GNU Make see: 6 # GNU Make based build file. For details on GNU Make see:
7 # http://www.gnu.org/software/make/manual/make.html 7 # http://www.gnu.org/software/make/manual/make.html
8 # 8 #
9 9
10 # 10 #
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 ifndef STANDALONE 467 ifndef STANDALONE
468 # 468 #
469 # Assign a sensible default to CHROME_PATH. 469 # Assign a sensible default to CHROME_PATH.
470 # 470 #
471 CHROME_PATH ?= $(shell $(GETOS) --chrome 2> $(DEV_NULL)) 471 CHROME_PATH ?= $(shell $(GETOS) --chrome 2> $(DEV_NULL))
472 472
473 # 473 #
474 # Verify we can find the Chrome executable if we need to launch it. 474 # Verify we can find the Chrome executable if we need to launch it.
475 # 475 #
476
477 NULL :=
478 SPACE := $(NULL) # one space after NULL is required
479 CHROME_PATH_ESCAPE := $(subst $(SPACE),\ ,$(CHROME_PATH))
480
476 .PHONY: check_for_chrome 481 .PHONY: check_for_chrome
477 check_for_chrome: 482 check_for_chrome:
478 ifeq (,$(wildcard $(CHROME_PATH))) 483 ifeq (,$(wildcard $(CHROME_PATH_ESCAPE)))
479 $(warning No valid Chrome found at CHROME_PATH=$(CHROME_PATH)) 484 $(warning No valid Chrome found at CHROME_PATH=$(CHROME_PATH))
480 $(error Set CHROME_PATH via an environment variable, or command-line.) 485 $(error Set CHROME_PATH via an environment variable, or command-line.)
481 else 486 else
482 $(warning Using chrome at: $(CHROME_PATH)) 487 $(warning Using chrome at: $(CHROME_PATH))
483 endif 488 endif
484 PAGE ?= index.html 489 PAGE ?= index.html
485 PAGE_TC_CONFIG ?= "$(PAGE)?tc=$(TOOLCHAIN)&config=$(CONFIG)" 490 PAGE_TC_CONFIG ?= "$(PAGE)?tc=$(TOOLCHAIN)&config=$(CONFIG)"
486 491
487 .PHONY: run 492 .PHONY: run
488 run: check_for_chrome all $(PAGE) 493 run: check_for_chrome all $(PAGE)
489 $(RUN_PY) -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ 494 $(RUN_PY) -C $(CURDIR) -P $(PAGE_TC_CONFIG) \
490 » $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH) $(CHROME_ARGS) \ 495 » $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH_ESCAPE) \
491 » --no-sandbox --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEA SE)" 496 » $(CHROME_ARGS) --no-sandbox \
497 » --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)"
492 498
493 .PHONY: run_package 499 .PHONY: run_package
494 run_package: check_for_chrome all 500 run_package: check_for_chrome all
495 @echo "$(TOOLCHAIN) $(CONFIG)" > $(CURDIR)/run_package_config 501 @echo "$(TOOLCHAIN) $(CONFIG)" > $(CURDIR)/run_package_config
496 » $(CHROME_PATH) --load-and-launch-app=$(CURDIR) $(CHROME_ARGS) 502 » $(CHROME_PATH_ESCAPE) --load-and-launch-app=$(CURDIR) $(CHROME_ARGS)
497 503
498 GDB_ARGS += -D $(TC_PATH)/$(OSNAME)_x86_newlib/bin/$(SYSARCH)-nacl-gdb 504 GDB_ARGS += -D $(TC_PATH)/$(OSNAME)_x86_newlib/bin/x86_64-nacl-gdb
499 GDB_ARGS += -D --eval-command="nacl-manifest $(abspath $(OUTDIR))/$(TARGET).nmf" 505 GDB_ARGS += -D --eval-command="nacl-manifest $(abspath $(OUTDIR))/$(TARGET).nmf"
500 GDB_ARGS += -D $(GDB_DEBUG_TARGET) 506 GDB_ARGS += -D $(GDB_DEBUG_TARGET)
501 507
502 .PHONY: debug 508 .PHONY: debug
503 debug: check_for_chrome all $(PAGE) 509 debug: check_for_chrome all $(PAGE)
504 $(RUN_PY) $(GDB_ARGS) \ 510 $(RUN_PY) $(GDB_ARGS) \
505 -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ 511 -C $(CURDIR) -P $(PAGE_TC_CONFIG) \
506 » $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH) $(CHROME_ARGS) \ 512 » $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH_ESCAPE) \
507 » --enable-nacl-debug \ 513 » $(CHROME_ARGS) --enable-nacl-debug \
508 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" 514 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)"
509 515
510 .PHONY: serve 516 .PHONY: serve
511 serve: all 517 serve: all
512 $(HTTPD_PY) -C $(CURDIR) 518 $(HTTPD_PY) -C $(CURDIR)
513 endif 519 endif
514 520
515 # uppercase aliases (for backward compatibility) 521 # uppercase aliases (for backward compatibility)
516 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN 522 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN
517 CHECK_FOR_CHROME: check_for_chrome 523 CHECK_FOR_CHROME: check_for_chrome
518 DEBUG: debug 524 DEBUG: debug
519 LAUNCH: run 525 LAUNCH: run
520 RUN: run 526 RUN: run
521 527
522 endif # TOOLCHAIN is valid... 528 endif # TOOLCHAIN is valid...
523 529
524 endif # TOOLCHAIN=all 530 endif # TOOLCHAIN=all
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/tools/getos.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698