From d9db84676635eeda22edee7ac601213579362001 Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Wed, 29 May 2024 21:57:48 +0000 Subject: [PATCH] build(romlib): de-duplicate ROMLib wrapper sources The `romlib_generator.py` script may generate duplicate wrapper sources, which is undesirable when using them to generate Makefile rules as Make will warn about duplicated targets. This change sorts the wrapper sources returned from this script, which has the effect of also de-duplicating them. Change-Id: I109607ef94f77113a48cc0d6e07877efd1971dbc Signed-off-by: Chris Kay --- lib/romlib/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/romlib/Makefile b/lib/romlib/Makefile index 1293f061d..438cf839e 100644 --- a/lib/romlib/Makefile +++ b/lib/romlib/Makefile @@ -23,8 +23,10 @@ OBJS = $(BUILD_DIR)/jmptbl.o $(BUILD_DIR)/init.o MAPFILE = $(BUILD_PLAT)/romlib/romlib.map ifneq ($(PLAT_DIR),) - WRAPPER_SOURCES = $(shell $(ROMLIB_GEN) genwrappers -b $(WRAPPER_DIR) --list ../../$(PLAT_DIR)/jmptbl.i) - WRAPPER_OBJS = $(WRAPPER_SOURCES:.s=.o) + WRAPPER_SOURCES = $(sort $(shell $(ROMLIB_GEN) genwrappers -b $\ + $(WRAPPER_DIR) --list ../../$(PLAT_DIR)/jmptbl.i)) + + WRAPPER_OBJS = $(WRAPPER_SOURCES:.s=.o) endif V ?= 0