Skip to contentSkip to conversation

tools lib traceevent: Add do_install_mkdir Makefile function

tip:perf/core tip-bot for Jiri Olsa 1 participant 1 message Oct 24, 2016

lore
Share & tools
lore

tip-bot for Jiri Olsa

author merge bot
#0 lore raw
Commit-ID:  c121bdbb870b5c75a66a0df628ceb68a2b176c59
Gitweb:     http://git.kernel.org/tip/c121bdbb870b5c75a66a0df628ceb68a2b176c59
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 31 Jul 2016 16:49:33 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 24 Oct 2016 11:07:31 -0300

tools lib traceevent: Add do_install_mkdir Makefile function

Decompose the do_install function to ease up the following patch a little.

---
 tools/lib/traceevent/Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
tools/lib/traceevent/Makefile +7 -3
index 8e44bea..deeae52 100644
@@ -236,10 +236,14 @@ TAGS:	force
 	find . -name '*.[ch]' | xargs etags \
 	--regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
 
+define do_install_mkdir
+	if [ ! -d '$(DESTDIR_SQ)$1' ]; then		\
+		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1';	\
+	fi
+endef
+
 define do_install
-	if [ ! -d '$(DESTDIR_SQ)$2' ]; then		\
-		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2';	\
-	fi;						\
+	$(call do_install_mkdir,$2);			\
 	$(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2'
 endef