Skip to contentSkip to conversation

trace-cmd: Make the build messages to show only file names

PATCH Applied Vladislav Valtchev (VMware) 2 participants 2 messages Feb 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd: Make the build messages to show only file names

Currently, the typical trace-cmd build messages like "COMPILE <file>" and "BUILD STATIC LIB <file>" show file's full path, instead of just the file name, as it used to happen before the full support for out-of-tree builds. This simple patch makes the build messages to look exactly like in the past by stripping the directory part of each file path, before printing the message.

---
 scripts/utils.mk | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
scripts/utils.mk +13 -13
index 06e8dc3..ad31f6e 100644
@@ -3,14 +3,14 @@
 
 ifeq ($(BUILDGUI), 1)
   GUI		= 'GUI '
-  GOBJ		= $@
   GSPACE	=
 else
   GUI		=
   GSPACE	= "    "
-  GOBJ		= $(GSPACE)$@
 endif
 
+ GOBJ		= $(GSPACE)$(notdir $(strip $@))
+
 
 ifeq ($(VERBOSE),1)
   Q =
@@ -81,22 +81,22 @@ define make_version.h
 endef
 
 define update_version.h
-	($(call make_version.h, [email protected]);		\
-	if [ -r $@ ] && cmp -s $@ [email protected]; then		\
-		rm -f [email protected];				\
-	else						\
-		echo '  UPDATE                 $@';	\
-		mv -f [email protected] $@;			\
+	($(call make_version.h, [email protected]);				\
+	if [ -r $@ ] && cmp -s $@ [email protected]; then				\
+		rm -f [email protected];						\
+	else								\
+		echo '  UPDATE                 '$(notdir $(strip $@));	\
+		mv -f [email protected] $@;					\
 	fi);
 endef
 
 define update_dir
 	(echo $1 > [email protected];	\
-	if [ -r $@ ] && cmp -s $@ [email protected]; then		\
-		rm -f [email protected];				\
-	else						\
-		echo '  UPDATE                 $@';	\
-		mv -f [email protected] $@;			\
+	if [ -r $@ ] && cmp -s $@ [email protected]; then				\
+		rm -f [email protected];						\
+	else								\
+		echo '  UPDATE                 '$(notdir $(strip $@));	\
+		mv -f [email protected] $@;					\
 	fi);
 endef
 
Signature · 1 line
2.14.1
#1 lore raw
Quoted 8 lines · On Thu, 8 Feb 2018 11:18:20 +0200 "Vladislav Valtchev (VMware)"…

Currently, the typical trace-cmd build messages like "COMPILE <file>" and "BUILD STATIC LIB <file>" show file's full path, instead of just the file name, as it used to happen before the full support for out-of-tree builds. This simple patch makes the build messages to look exactly like in the past by stripping the directory part of each file path, before printing the message.

Thanks, applied!

-- Steve