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)))
|
$(shell [ -d $(BUILD)/$(d) ] || mkdir -p $(BUILD)/$(d)))
|
||||||
|
|
||||||
# First target
|
# First target
|
||||||
|
.PHONY: all
|
||||||
all: fwlib $(if $(FIRMWARE_ARCH),,host_stuff)
|
all: fwlib $(if $(FIRMWARE_ARCH),,host_stuff)
|
||||||
|
|
||||||
# Host targets
|
# Host targets
|
||||||
|
.PHONY: host_stuff
|
||||||
host_stuff: fwlib hostlib cgpt utils tests
|
host_stuff: fwlib hostlib cgpt utils tests
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(Q)/bin/rm -rf ${BUILD}
|
$(Q)/bin/rm -rf ${BUILD}
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
install: cgpt_install utils_install
|
install: cgpt_install utils_install
|
||||||
|
|
||||||
# Coverage
|
# Coverage
|
||||||
COV_INFO = $(BUILD)/coverage.info
|
COV_INFO = $(BUILD)/coverage.info
|
||||||
#coverage: runtests
|
#coverage: runtests
|
||||||
|
.PHONY: coverage
|
||||||
coverage:
|
coverage:
|
||||||
rm -f $(COV_INFO)*
|
rm -f $(COV_INFO)*
|
||||||
lcov --capture --directory . --base-directory . -o $(COV_INFO).1
|
lcov --capture --directory . --base-directory . -o $(COV_INFO).1
|
||||||
@@ -254,6 +259,7 @@ endif
|
|||||||
FWLIB_OBJS = $(FWLIB_SRCS:%.c=${BUILD}/%.o)
|
FWLIB_OBJS = $(FWLIB_SRCS:%.c=${BUILD}/%.o)
|
||||||
ALL_OBJS += ${FWLIB_OBJS}
|
ALL_OBJS += ${FWLIB_OBJS}
|
||||||
|
|
||||||
|
.PHONY: fwlib
|
||||||
ifeq ($(FIRMWARE_ARCH),)
|
ifeq ($(FIRMWARE_ARCH),)
|
||||||
# Link test ensures firmware lib doesn't rely on outside libraries
|
# Link test ensures firmware lib doesn't rely on outside libraries
|
||||||
${BUILD}/firmware/linktest/main: LIBS = $(FWLIB)
|
${BUILD}/firmware/linktest/main: LIBS = $(FWLIB)
|
||||||
@@ -272,6 +278,7 @@ $(FWLIB) : $(FWLIB_OBJS)
|
|||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Host library
|
# Host library
|
||||||
|
|
||||||
|
.PHONY: hostlib
|
||||||
hostlib: $(HOSTLIB) ${BUILD}/host/linktest/main
|
hostlib: $(HOSTLIB) ${BUILD}/host/linktest/main
|
||||||
|
|
||||||
${BUILD}/host/% ${HOSTLIB}: INCLUDES += \
|
${BUILD}/host/% ${HOSTLIB}: INCLUDES += \
|
||||||
@@ -350,9 +357,10 @@ CGPTLIB_OBJS = $(filter %.o, \
|
|||||||
$(CGPTLIB_SRCS:%.cc=${BUILD}/%.o))
|
$(CGPTLIB_SRCS:%.cc=${BUILD}/%.o))
|
||||||
ALL_OBJS += $(CGPTLIB_OBJS)
|
ALL_OBJS += $(CGPTLIB_OBJS)
|
||||||
|
|
||||||
cgpt : $(CGPT)
|
|
||||||
.PHONY: cgpt
|
.PHONY: cgpt
|
||||||
|
cgpt: $(CGPT)
|
||||||
|
|
||||||
|
.PHONY: libcgpt_cc
|
||||||
libcgpt_cc: $(CGPTLIB)
|
libcgpt_cc: $(CGPTLIB)
|
||||||
|
|
||||||
$(CGPTLIB): INCLUDES += -Ifirmware/lib/cgptlib/include
|
$(CGPTLIB): INCLUDES += -Ifirmware/lib/cgptlib/include
|
||||||
@@ -369,6 +377,7 @@ $(CGPT) : $(CGPT_OBJS) $$(LIBS)
|
|||||||
@printf " LDcgpt $(subst $(BUILD)/,,$(@))\n"
|
@printf " LDcgpt $(subst $(BUILD)/,,$(@))\n"
|
||||||
$(Q)$(LD) -o $(CGPT) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(LDLIBS)
|
$(Q)$(LD) -o $(CGPT) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(LDLIBS)
|
||||||
|
|
||||||
|
.PHONY: cgpt_install
|
||||||
cgpt_install: $(CGPT)
|
cgpt_install: $(CGPT)
|
||||||
mkdir -p $(DESTDIR)
|
mkdir -p $(DESTDIR)
|
||||||
cp -f $^ $(DESTDIR)
|
cp -f $^ $(DESTDIR)
|
||||||
@@ -429,11 +438,13 @@ endif
|
|||||||
UTIL_BINS = $(addprefix ${BUILD}/utility/,$(UTIL_NAMES))
|
UTIL_BINS = $(addprefix ${BUILD}/utility/,$(UTIL_NAMES))
|
||||||
ALL_DEPS += $(addsuffix .d,${UTIL_BINS})
|
ALL_DEPS += $(addsuffix .d,${UTIL_BINS})
|
||||||
|
|
||||||
|
.PHONY: utils
|
||||||
utils: $(UTIL_BINS) $(UTIL_SCRIPTS)
|
utils: $(UTIL_BINS) $(UTIL_SCRIPTS)
|
||||||
# TODO: change ebuild to pull scripts directly out of utility dir
|
# TODO: change ebuild to pull scripts directly out of utility dir
|
||||||
$(Q)cp -f $(UTIL_SCRIPTS) $(BUILD)/utility
|
$(Q)cp -f $(UTIL_SCRIPTS) $(BUILD)/utility
|
||||||
$(Q)chmod a+rx $(patsubst %,$(BUILD)/%,$(UTIL_SCRIPTS))
|
$(Q)chmod a+rx $(patsubst %,$(BUILD)/%,$(UTIL_SCRIPTS))
|
||||||
|
|
||||||
|
.PHONY: utils_install
|
||||||
utils_install: $(UTIL_BINS) $(UTIL_SCRIPTS)
|
utils_install: $(UTIL_BINS) $(UTIL_SCRIPTS)
|
||||||
mkdir -p $(DESTDIR)
|
mkdir -p $(DESTDIR)
|
||||||
cp -f $(UTIL_BINS) $(DESTDIR)
|
cp -f $(UTIL_BINS) $(DESTDIR)
|
||||||
@@ -505,6 +516,7 @@ ${BUILD}/utility/tlcl_generator : LIBS =
|
|||||||
STRUCTURES_TMP=${BUILD}/tlcl_structures.tmp
|
STRUCTURES_TMP=${BUILD}/tlcl_structures.tmp
|
||||||
STRUCTURES_SRC=firmware/lib/tpm_lite/include/tlcl_structures.h
|
STRUCTURES_SRC=firmware/lib/tpm_lite/include/tlcl_structures.h
|
||||||
|
|
||||||
|
.PHONY: update_tlcl_structures
|
||||||
update_tlcl_structures: ${BUILD}/utility/tlcl_generator
|
update_tlcl_structures: ${BUILD}/utility/tlcl_generator
|
||||||
@printf " Rebuilding TLCL structures\n"
|
@printf " Rebuilding TLCL structures\n"
|
||||||
$(Q)${BUILD}/utility/tlcl_generator > $(STRUCTURES_TMP)
|
$(Q)${BUILD}/utility/tlcl_generator > $(STRUCTURES_TMP)
|
||||||
@@ -516,6 +528,7 @@ update_tlcl_structures: ${BUILD}/utility/tlcl_generator
|
|||||||
# Library to dump kernel config
|
# Library to dump kernel config
|
||||||
# Used by platform/installer
|
# Used by platform/installer
|
||||||
|
|
||||||
|
.PHONY: libdump_kernel_config
|
||||||
libdump_kernel_config: $(DUMPKERNELCONFIGLIB)
|
libdump_kernel_config: $(DUMPKERNELCONFIGLIB)
|
||||||
|
|
||||||
$(DUMPKERNELCONFIGLIB): ${BUILD}/utility/dump_kernel_config_lib.o
|
$(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))
|
TEST_BINS = $(addprefix ${BUILD}/tests/,$(TEST_NAMES))
|
||||||
ALL_DEPS += $(addsuffix .d,${TEST_BINS})
|
ALL_DEPS += $(addsuffix .d,${TEST_BINS})
|
||||||
|
|
||||||
tests : $(TEST_BINS)
|
|
||||||
.PHONY: tests
|
.PHONY: tests
|
||||||
|
tests: $(TEST_BINS)
|
||||||
|
|
||||||
${TEST_LIB}: \
|
${TEST_LIB}: \
|
||||||
${BUILD}/tests/test_common.o \
|
${BUILD}/tests/test_common.o \
|
||||||
@@ -596,6 +609,7 @@ ${BUILD}/tests/rollback_index2_tests: OBJS += \
|
|||||||
${BUILD}/tests/vboot_audio_tests: OBJS += \
|
${BUILD}/tests/vboot_audio_tests: OBJS += \
|
||||||
${BUILD}/firmware/lib/vboot_audio_for_test.o
|
${BUILD}/firmware/lib/vboot_audio_for_test.o
|
||||||
|
|
||||||
|
.PHONY: cgptmanager_tests
|
||||||
cgptmanager_tests: ${BUILD}/tests/CgptManagerTests
|
cgptmanager_tests: ${BUILD}/tests/CgptManagerTests
|
||||||
|
|
||||||
${BUILD}/tests/CgptManagerTests: CFLAGS += $(PC_CFLAGS)
|
${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
|
# Targets to run tests
|
||||||
|
|
||||||
# Frequently-run tests
|
# Frequently-run tests
|
||||||
|
.PHONY: runtests
|
||||||
runtests: runbmptests runcgpttests runfuzztests runmisctests
|
runtests: runbmptests runcgpttests runfuzztests runmisctests
|
||||||
|
|
||||||
# Generate test keys
|
# Generate test keys
|
||||||
|
.PHONY: genkeys
|
||||||
genkeys:
|
genkeys:
|
||||||
tests/gen_test_keys.sh
|
tests/gen_test_keys.sh
|
||||||
|
|
||||||
# Generate test cases for fuzzing
|
# Generate test cases for fuzzing
|
||||||
|
.PHONY: genfuzztestcases
|
||||||
genfuzztestcases:
|
genfuzztestcases:
|
||||||
tests/gen_fuzz_test_cases.sh
|
tests/gen_fuzz_test_cases.sh
|
||||||
|
|
||||||
|
.PHONY: runbmptests
|
||||||
runbmptests: utils
|
runbmptests: utils
|
||||||
cd tests/bitmaps && BMPBLK=${BUILD}/utility/bmpblk_utility \
|
cd tests/bitmaps && BMPBLK=${BUILD}/utility/bmpblk_utility \
|
||||||
./TestBmpBlock.py -v
|
./TestBmpBlock.py -v
|
||||||
|
|
||||||
|
.PHONY: runcgpttests
|
||||||
runcgpttests: cgpt tests
|
runcgpttests: cgpt tests
|
||||||
${BUILD}/tests/cgptlib_test
|
${BUILD}/tests/cgptlib_test
|
||||||
tests/run_cgpt_tests.sh ${BUILD}/cgpt/cgpt
|
tests/run_cgpt_tests.sh ${BUILD}/cgpt/cgpt
|
||||||
@@ -651,10 +670,12 @@ ifneq ($(IN_CHROOT),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Exercise vbutil_kernel and vbutil_firmware
|
# Exercise vbutil_kernel and vbutil_firmware
|
||||||
|
.PHONY: runfuzztests
|
||||||
runfuzztests: genfuzztestcases utils tests
|
runfuzztests: genfuzztestcases utils tests
|
||||||
tests/run_preamble_tests.sh
|
tests/run_preamble_tests.sh
|
||||||
tests/run_vbutil_kernel_arg_tests.sh
|
tests/run_vbutil_kernel_arg_tests.sh
|
||||||
|
|
||||||
|
.PHONY: runmisctests
|
||||||
runmisctests: tests utils
|
runmisctests: tests utils
|
||||||
${BUILD}/tests/rollback_index2_tests
|
${BUILD}/tests/rollback_index2_tests
|
||||||
${BUILD}/tests/rsa_utility_tests
|
${BUILD}/tests/rsa_utility_tests
|
||||||
@@ -675,6 +696,7 @@ runmisctests : tests utils
|
|||||||
# Run long tests, including all permutations of encryption keys (instead of
|
# 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).
|
# just the ones we use) and tests of currently-unused code (e.g. vboot_ec).
|
||||||
# Not run by automated build.
|
# Not run by automated build.
|
||||||
|
.PHONY: runlongtests
|
||||||
runlongtests: genkeys genfuzztestcases tests utils
|
runlongtests: genkeys genfuzztestcases tests utils
|
||||||
tests/run_preamble_tests.sh --all
|
tests/run_preamble_tests.sh --all
|
||||||
tests/run_vboot_common_tests.sh --all
|
tests/run_vboot_common_tests.sh --all
|
||||||
|
|||||||
Reference in New Issue
Block a user