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 <chris.kay@arm.com>
diff --git a/lib/romlib/Makefile b/lib/romlib/Makefile
index 1293f06..438cf83 100644
--- a/lib/romlib/Makefile
+++ b/lib/romlib/Makefile
@@ -23,8 +23,10 @@
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