From b2cd8661e19c693c9d8cfd59c6ac5e786e540618 Mon Sep 17 00:00:00 2001 From: Kevin Mills Date: Fri, 21 Jun 2019 09:23:28 -0700 Subject: Allow list-* targets to work without specifying a valid TARGET --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index aa1839e..8c795d4 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,11 @@ PROGRAM_LST = $(SRC_DIR)/$(CONFIGURATION)/$(PROGRAM).lst # Finds the directory in which this BSP is located, ensuring that there is # exactly one. BSP_DIR := $(wildcard $(TARGET_ROOT)/bsp/$(TARGET)) + +# Only perform these error checks and include the standalone.mk fragment +# if we're not processing one of the "list-" targets +ifneq ($@,$(filter $@, list-targets list-target-tags list-programs list-options)) + ifeq ($(words $(BSP_DIR)),0) $(error Unable to find BSP for $(TARGET), expected to find "bsp/$(TARGET)") endif @@ -77,6 +82,9 @@ endif include scripts/standalone.mk +# End of exclusion when procesinng "list-" targets. +endif + ############################################################# # Prints help message ############################################################# -- cgit v1.2.3