Skip to contentSkip to conversation

Makefile: Use Kbuild style for system_map.o generation step

PATCH In review Vasili Galka 2 participants 2 messages Aug 14, 2014 – Aug 23, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Use Kbuild style for system_map.o generation step

The command generating the "common/system_map.o" file was always shown during the build making the output messy. Now it is called using the Kbuild "cmd" macro, so that the full command is shown only when building in verbose mode.

---
 Makefile |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
Makefile +7 -3
index b5d5e01..7c0352c 100644
@@ -1006,13 +1006,17 @@ quiet_cmd_u-boot__ ?= LD      $@
       --start-group $(u-boot-main) --end-group                 \
       $(PLATFORM_LIBS) -Map u-boot.map
 
-u-boot:	$(u-boot-init) $(u-boot-main) u-boot.lds
-	$(call if_changed,u-boot__)
-ifeq ($(CONFIG_KALLSYMS),y)
+quiet_cmd_smap = GEN     common/system_map.o
+cmd_smap = \
 	smap=`$(call SYSTEM_MAP,u-boot) | \
 		awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
 	$(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
 		-c $(srctree)/common/system_map.c -o common/system_map.o
+
+u-boot:	$(u-boot-init) $(u-boot-main) u-boot.lds
+	$(call if_changed,u-boot__)
+ifeq ($(CONFIG_KALLSYMS),y)
+	$(call cmd,smap)
 	$(call cmd,u-boot__) common/system_map.o
 endif
 
Signature · 1 line
1.7.9
#1 lore raw
Quoted 6 lines · Vasili Galka

The command generating the "common/system_map.o" file was always shown during the build making the output messy. Now it is called using the Kbuild "cmd" macro, so that the full command is shown only when building in verbose mode.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140823/f5e067b4/attachment.pgp>