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

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

Issue 272243006: [NaCl SDK] Various fixes so "make debug" works on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge master Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | native_client_sdk/src/tools/run.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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 # Assign a sensible default to CHROME_PATH. 470 # Assign a sensible default to CHROME_PATH.
471 # 471 #
472 CHROME_PATH ?= $(shell $(GETOS) --chrome 2> $(DEV_NULL)) 472 CHROME_PATH ?= $(shell $(GETOS) --chrome 2> $(DEV_NULL))
473 473
474 # 474 #
475 # Verify we can find the Chrome executable if we need to launch it. 475 # Verify we can find the Chrome executable if we need to launch it.
476 # 476 #
477 477
478 NULL := 478 NULL :=
479 SPACE := $(NULL) # one space after NULL is required 479 SPACE := $(NULL) # one space after NULL is required
480 CHROME_PATH_ESCAPE := $(subst $(SPACE),\ ,$(CHROME_PATH)) 480 ifneq ($(OSNAME),win)
481 CHROME_PATH_ESCAPE := $(subst $(SPACE),\ ,$(CHROME_PATH))
482 SANDBOX_ARGS :=
483 else
484 CHROME_PATH_ESCAPE := $(CHROME_PATH)
485 SANDBOX_ARGS := --no-sandbox
486 endif
487
481 GDB_PATH := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=gdb) 488 GDB_PATH := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=gdb)
482 489
483 .PHONY: check_for_chrome 490 .PHONY: check_for_chrome
484 check_for_chrome: 491 check_for_chrome:
485 ifeq (,$(wildcard $(CHROME_PATH_ESCAPE))) 492 ifeq (,$(wildcard $(CHROME_PATH_ESCAPE)))
486 $(warning No valid Chrome found at CHROME_PATH=$(CHROME_PATH)) 493 $(warning No valid Chrome found at CHROME_PATH=$(CHROME_PATH))
487 $(error Set CHROME_PATH via an environment variable, or command-line.) 494 $(error Set CHROME_PATH via an environment variable, or command-line.)
488 else 495 else
489 $(warning Using chrome at: $(CHROME_PATH)) 496 $(warning Using chrome at: $(CHROME_PATH))
490 endif 497 endif
491 PAGE ?= index.html 498 PAGE ?= index.html
492 PAGE_TC_CONFIG ?= "$(PAGE)?tc=$(TOOLCHAIN)&config=$(CONFIG)" 499 PAGE_TC_CONFIG ?= "$(PAGE)?tc=$(TOOLCHAIN)&config=$(CONFIG)"
493 500
494 .PHONY: run 501 .PHONY: run
495 run: check_for_chrome all $(PAGE) 502 run: check_for_chrome all $(PAGE)
496 $(RUN_PY) -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ 503 $(RUN_PY) -C $(CURDIR) -P $(PAGE_TC_CONFIG) \
497 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH_ESCAPE) \ 504 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH_ESCAPE) \
498 » $(CHROME_ARGS) --no-sandbox \ 505 » $(CHROME_ARGS) \
499 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" 506 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)"
500 507
501 .PHONY: run_package 508 .PHONY: run_package
502 run_package: check_for_chrome all 509 run_package: check_for_chrome all
503 @echo "$(TOOLCHAIN) $(CONFIG)" > $(CURDIR)/run_package_config 510 @echo "$(TOOLCHAIN) $(CONFIG)" > $(CURDIR)/run_package_config
504 $(CHROME_PATH_ESCAPE) --load-and-launch-app=$(CURDIR) $(CHROME_ARGS) 511 $(CHROME_PATH_ESCAPE) --load-and-launch-app=$(CURDIR) $(CHROME_ARGS)
505 512
506 GDB_ARGS += -D $(GDB_PATH) 513 GDB_ARGS += -D $(GDB_PATH)
507 # PNaCl's nexe is acquired with "remote get nexe <path>" instead of the NMF. 514 # PNaCl's nexe is acquired with "remote get nexe <path>" instead of the NMF.
508 ifeq (,$(findstring $(TOOLCHAIN),pnacl)) 515 ifeq (,$(findstring $(TOOLCHAIN),pnacl))
509 GDB_ARGS += -D --eval-command="nacl-manifest $(abspath $(OUTDIR))/$(TARGET).nmf" 516 GDB_ARGS += -D --eval-command="nacl-manifest $(abspath $(OUTDIR))/$(TARGET).nmf"
510 GDB_ARGS += -D $(GDB_DEBUG_TARGET) 517 GDB_ARGS += -D $(GDB_DEBUG_TARGET)
511 endif 518 endif
512 519
513 .PHONY: debug 520 .PHONY: debug
514 debug: check_for_chrome all $(PAGE) 521 debug: check_for_chrome all $(PAGE)
515 $(RUN_PY) $(GDB_ARGS) \ 522 $(RUN_PY) $(GDB_ARGS) \
516 -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ 523 -C $(CURDIR) -P $(PAGE_TC_CONFIG) \
517 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH_ESCAPE) \ 524 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH_ESCAPE) \
518 » $(CHROME_ARGS) --enable-nacl-debug \ 525 » $(CHROME_ARGS) $(SANDBOX_ARGS) --enable-nacl-debug \
519 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" 526 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)"
520 527
521 .PHONY: serve 528 .PHONY: serve
522 serve: all 529 serve: all
523 $(HTTPD_PY) -C $(CURDIR) 530 $(HTTPD_PY) -C $(CURDIR)
524 endif 531 endif
525 532
526 # uppercase aliases (for backward compatibility) 533 # uppercase aliases (for backward compatibility)
527 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN 534 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN
528 CHECK_FOR_CHROME: check_for_chrome 535 CHECK_FOR_CHROME: check_for_chrome
529 DEBUG: debug 536 DEBUG: debug
530 LAUNCH: run 537 LAUNCH: run
531 RUN: run 538 RUN: run
532 539
533 endif # TOOLCHAIN is valid... 540 endif # TOOLCHAIN is valid...
534 541
535 endif # TOOLCHAIN=all 542 endif # TOOLCHAIN=all
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/tools/run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698