From: Jiri Olsa Date: Sun, 31 Jul 2016 14:49:33 +0000 (+0200) Subject: tools lib traceevent: Add do_install_mkdir Makefile function X-Git-Tag: v5.15~12347^2~12^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c121bdbb870b5c75a66a0df628ceb68a2b176c59;p=platform%2Fkernel%2Flinux-starfive.git tools lib traceevent: Add do_install_mkdir Makefile function Decompose the do_install function to ease up the following patch a little. Signed-off-by: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Link: http://lkml.kernel.org/n/tip-zzs19yx8seyors532vuer37w@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index 8e44bea..deeae52 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -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