summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-06-16 21:30:54 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-18 09:23:02 +0000
commit9b9b7f97a6120a296959323f728c51c1ac7a45af (patch)
tree086f58632a5119ca460d1c6c5af4a91ad3a7620c
parent54097db36ddc667d3c662ec5631f6204b5ffb23c (diff)
downloadchrome-ec-9b9b7f97a6120a296959323f728c51c1ac7a45af.tar.gz
cleanup: Update Makefile's .PHONY targets
This puts the .PHONY declaration next to the target, so that we don't overlook any. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: I944537fdc3a90691a7f2de0bff9d7f9df4898cf8 Reviewed-on: https://chromium-review.googlesource.com/278019 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--Makefile7
-rw-r--r--Makefile.rules13
2 files changed, 12 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 1cfe28a964..2555ef0180 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,6 @@ SYMLINK := $(shell readlink $(lastword $(MAKEFILE_LIST)))
ifneq (,$(SYMLINK))
.PHONY: restart
-
restart: .DEFAULT
@true
@@ -38,10 +37,10 @@ PEM ?= board/$(BOARD)/dev_key.pem
include Makefile.toolchain
-# Define the traditional first target. The dependencies of this are near the bottom
-# as they can be altered by chip and board files.
-all:
+# Define the traditional first target. The dependencies of this are near the
+# bottom as they can be altered by chip and board files.
.PHONY: all
+all:
# The board makefile sets $CHIP and the chip makefile sets $CORE.
# Include those now, since they must be defined for _flag_cfg below.
diff --git a/Makefile.rules b/Makefile.rules
index dad3533803..a1199bbd7d 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -74,8 +74,7 @@ cmd_etags = etags -o $@ $(shell cat $<)
cmd_ctags = ctags -o $@ $(shell cat $<)
targ_if_prog = $(if $(shell which $(1) 2>/dev/null),$(2),)
-.PHONY: all tests utils utils-host utils-build hosttests
-
+.PHONY: buildall
buildall: $(foreach b, $(boards), proj-$(b)) runtests
@touch .tests-passed
@echo "$@ completed successfully!"
@@ -87,14 +86,19 @@ proj-%:
dis-y = $(out)/$(PROJECT).RW.dis
dis-$(CONFIG_FW_INCLUDE_RO) += $(out)/$(PROJECT).RO.dis
dis: $(dis-y)
+.PHONY: dis
hex-y = $(out)/$(PROJECT).RO.hex $(out)/$(PROJECT).RW.hex $(out)/$(PROJECT).hex
hex: $(hex-y)
+.PHONY: hex
+.PHONY: utils-host
utils-host: $(host-utils)
+.PHONY: utils-build
utils-build: $(build-utils)
+.PHONY: utils
utils: utils-host utils-build
# On board test binaries
@@ -110,6 +114,7 @@ $(test-targets): test-%:
cp $(out)/$*/$*.bin $(out)/test-$*.bin
endif
+.PHONY: tests
tests: $(test-targets)
# Emulator test executables
@@ -127,6 +132,7 @@ $(host-test-targets): host-%:
$(run-test-targets): run-%: host-%
$(call quiet,host_test,TEST )
+.PHONY: hosttests runtests
hosttests: $(host-test-targets)
runtests: $(run-test-targets)
@@ -142,12 +148,11 @@ cmd_report_cov=genhtml -q -o build/host/coverage_rpt -t \
build/host/%.info: run-%
$(call quiet,lcov,COV )
+.PHONY: coverage
coverage: TEST_FLAG=TEST_COVERAGE=y
coverage: $(cov-test-targets)
$(call quiet,report_cov,REPORT )
-.PHONY: coverage
-
$(out)/firmware_image.lds: common/firmware_image.lds.S
$(call quiet,lds,LDS )
$(out)/%.lds: core/$(CORE)/ec.lds.S