Build: strip trailing slashes from directory paths more simply
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 Jan 2017 10:31:00 +0000 (19:31 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 Jan 2017 10:36:47 +0000 (19:36 +0900)
Append . then strip /. seems clumsy.  Just use $(patsubst %/,%, ).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
make_helpers/build_macros.mk

index 24d5924ea7dbec4da634c39bab990a3962865dd9..2312d2c920f95664acff2e3ed4f08a7839d803b4 100644 (file)
@@ -300,9 +300,8 @@ define MAKE_BL
         # ordering is not relevant but sort removes duplicates.
         $(eval TEMP_OBJ_DIRS := $(sort $(BUILD_DIR)/ $(dir ${OBJS} ${LINKERFILE})))
         # The $(dir ) function leaves a trailing / on the directory names
-        # We append a . then strip /. from each, to remove the trailing / characters
-        # This gives names suitable for use as make rule targets.
-        $(eval OBJ_DIRS   := $(subst /.,,$(addsuffix .,$(TEMP_OBJ_DIRS))))
+        # Rip off the / to match directory names with make rule targets.
+        $(eval OBJ_DIRS   := $(patsubst %/,%,$(TEMP_OBJ_DIRS)))
 
 # Create generators for object directory structure