mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Add .PHONY targets for phony targets
We have a bunch of manual dependency targets. They need to be marked as .PHONY so that they'll always work. Also made the spacing around the ':' more consistent so it's easier to find specific instances. BUG=chromium-os:26317 BRANCH=none TEST=manual sudo emerge vboot_reference emerge-link vboot_reference chromeos-u-boot chromeos-installer emerge-daisy vboot_reference chromeos-u-boot chromeos-installer Change-Id: I00a1b8abcd588bdbab33b172c64a4b305b6d7237 Reviewed-on: https://gerrit.chromium.org/gerrit/41185 Commit-Queue: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
ChromeBot
parent
3428b4bcd9
commit
acb2ee977b
26
Makefile
26
Makefile
@@ -133,19 +133,24 @@ _dir_create := $(foreach d, \
|
||||
$(shell [ -d $(BUILD)/$(d) ] || mkdir -p $(BUILD)/$(d)))
|
||||
|
||||
# First target
|
||||
.PHONY: all
|
||||
all: fwlib $(if $(FIRMWARE_ARCH),,host_stuff)
|
||||
|
||||
# Host targets
|
||||
.PHONY: host_stuff
|
||||
host_stuff: fwlib hostlib cgpt utils tests
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(Q)/bin/rm -rf ${BUILD}
|
||||
|
||||
.PHONY: install
|
||||
install: cgpt_install utils_install
|
||||
|
||||
# Coverage
|
||||
COV_INFO = $(BUILD)/coverage.info
|
||||
#coverage: runtests
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
rm -f $(COV_INFO)*
|
||||
lcov --capture --directory . --base-directory . -o $(COV_INFO).1
|
||||
@@ -254,6 +259,7 @@ endif
|
||||
FWLIB_OBJS = $(FWLIB_SRCS:%.c=${BUILD}/%.o)
|
||||
ALL_OBJS += ${FWLIB_OBJS}
|
||||
|
||||
.PHONY: fwlib
|
||||
ifeq ($(FIRMWARE_ARCH),)
|
||||
# Link test ensures firmware lib doesn't rely on outside libraries
|
||||
${BUILD}/firmware/linktest/main: LIBS = $(FWLIB)
|
||||
@@ -272,6 +278,7 @@ $(FWLIB) : $(FWLIB_OBJS)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Host library
|
||||
|
||||
.PHONY: hostlib
|
||||
hostlib: $(HOSTLIB) ${BUILD}/host/linktest/main
|
||||
|
||||
${BUILD}/host/% ${HOSTLIB}: INCLUDES += \
|
||||
@@ -350,9 +357,10 @@ CGPTLIB_OBJS = $(filter %.o, \
|
||||
$(CGPTLIB_SRCS:%.cc=${BUILD}/%.o))
|
||||
ALL_OBJS += $(CGPTLIB_OBJS)
|
||||
|
||||
cgpt : $(CGPT)
|
||||
.PHONY: cgpt
|
||||
cgpt: $(CGPT)
|
||||
|
||||
.PHONY: libcgpt_cc
|
||||
libcgpt_cc: $(CGPTLIB)
|
||||
|
||||
$(CGPTLIB): INCLUDES += -Ifirmware/lib/cgptlib/include
|
||||
@@ -369,6 +377,7 @@ $(CGPT) : $(CGPT_OBJS) $$(LIBS)
|
||||
@printf " LDcgpt $(subst $(BUILD)/,,$(@))\n"
|
||||
$(Q)$(LD) -o $(CGPT) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(LDLIBS)
|
||||
|
||||
.PHONY: cgpt_install
|
||||
cgpt_install: $(CGPT)
|
||||
mkdir -p $(DESTDIR)
|
||||
cp -f $^ $(DESTDIR)
|
||||
@@ -429,11 +438,13 @@ endif
|
||||
UTIL_BINS = $(addprefix ${BUILD}/utility/,$(UTIL_NAMES))
|
||||
ALL_DEPS += $(addsuffix .d,${UTIL_BINS})
|
||||
|
||||
.PHONY: utils
|
||||
utils: $(UTIL_BINS) $(UTIL_SCRIPTS)
|
||||
# TODO: change ebuild to pull scripts directly out of utility dir
|
||||
$(Q)cp -f $(UTIL_SCRIPTS) $(BUILD)/utility
|
||||
$(Q)chmod a+rx $(patsubst %,$(BUILD)/%,$(UTIL_SCRIPTS))
|
||||
|
||||
.PHONY: utils_install
|
||||
utils_install: $(UTIL_BINS) $(UTIL_SCRIPTS)
|
||||
mkdir -p $(DESTDIR)
|
||||
cp -f $(UTIL_BINS) $(DESTDIR)
|
||||
@@ -505,6 +516,7 @@ ${BUILD}/utility/tlcl_generator : LIBS =
|
||||
STRUCTURES_TMP=${BUILD}/tlcl_structures.tmp
|
||||
STRUCTURES_SRC=firmware/lib/tpm_lite/include/tlcl_structures.h
|
||||
|
||||
.PHONY: update_tlcl_structures
|
||||
update_tlcl_structures: ${BUILD}/utility/tlcl_generator
|
||||
@printf " Rebuilding TLCL structures\n"
|
||||
$(Q)${BUILD}/utility/tlcl_generator > $(STRUCTURES_TMP)
|
||||
@@ -516,6 +528,7 @@ update_tlcl_structures: ${BUILD}/utility/tlcl_generator
|
||||
# Library to dump kernel config
|
||||
# Used by platform/installer
|
||||
|
||||
.PHONY: libdump_kernel_config
|
||||
libdump_kernel_config: $(DUMPKERNELCONFIGLIB)
|
||||
|
||||
$(DUMPKERNELCONFIGLIB): ${BUILD}/utility/dump_kernel_config_lib.o
|
||||
@@ -578,8 +591,8 @@ TEST_NAMES += $(addprefix tpm_lite/,$(TLCL_TEST_NAMES))
|
||||
TEST_BINS = $(addprefix ${BUILD}/tests/,$(TEST_NAMES))
|
||||
ALL_DEPS += $(addsuffix .d,${TEST_BINS})
|
||||
|
||||
tests : $(TEST_BINS)
|
||||
.PHONY: tests
|
||||
tests: $(TEST_BINS)
|
||||
|
||||
${TEST_LIB}: \
|
||||
${BUILD}/tests/test_common.o \
|
||||
@@ -596,6 +609,7 @@ ${BUILD}/tests/rollback_index2_tests: OBJS += \
|
||||
${BUILD}/tests/vboot_audio_tests: OBJS += \
|
||||
${BUILD}/firmware/lib/vboot_audio_for_test.o
|
||||
|
||||
.PHONY: cgptmanager_tests
|
||||
cgptmanager_tests: ${BUILD}/tests/CgptManagerTests
|
||||
|
||||
${BUILD}/tests/CgptManagerTests: CFLAGS += $(PC_CFLAGS)
|
||||
@@ -629,20 +643,25 @@ ${BUILD}/tests/tpm_lite/tpmtest_% : OBJS += ${BUILD}/tests/tpm_lite/tlcl_tests.o
|
||||
# Targets to run tests
|
||||
|
||||
# Frequently-run tests
|
||||
.PHONY: runtests
|
||||
runtests: runbmptests runcgpttests runfuzztests runmisctests
|
||||
|
||||
# Generate test keys
|
||||
.PHONY: genkeys
|
||||
genkeys:
|
||||
tests/gen_test_keys.sh
|
||||
|
||||
# Generate test cases for fuzzing
|
||||
.PHONY: genfuzztestcases
|
||||
genfuzztestcases:
|
||||
tests/gen_fuzz_test_cases.sh
|
||||
|
||||
.PHONY: runbmptests
|
||||
runbmptests: utils
|
||||
cd tests/bitmaps && BMPBLK=${BUILD}/utility/bmpblk_utility \
|
||||
./TestBmpBlock.py -v
|
||||
|
||||
.PHONY: runcgpttests
|
||||
runcgpttests: cgpt tests
|
||||
${BUILD}/tests/cgptlib_test
|
||||
tests/run_cgpt_tests.sh ${BUILD}/cgpt/cgpt
|
||||
@@ -651,10 +670,12 @@ ifneq ($(IN_CHROOT),)
|
||||
endif
|
||||
|
||||
# Exercise vbutil_kernel and vbutil_firmware
|
||||
.PHONY: runfuzztests
|
||||
runfuzztests: genfuzztestcases utils tests
|
||||
tests/run_preamble_tests.sh
|
||||
tests/run_vbutil_kernel_arg_tests.sh
|
||||
|
||||
.PHONY: runmisctests
|
||||
runmisctests: tests utils
|
||||
${BUILD}/tests/rollback_index2_tests
|
||||
${BUILD}/tests/rsa_utility_tests
|
||||
@@ -675,6 +696,7 @@ runmisctests : tests utils
|
||||
# Run long tests, including all permutations of encryption keys (instead of
|
||||
# just the ones we use) and tests of currently-unused code (e.g. vboot_ec).
|
||||
# Not run by automated build.
|
||||
.PHONY: runlongtests
|
||||
runlongtests: genkeys genfuzztestcases tests utils
|
||||
tests/run_preamble_tests.sh --all
|
||||
tests/run_vboot_common_tests.sh --all
|
||||
|
||||
Reference in New Issue
Block a user