diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-07-31 10:49:33 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-10-24 10:07:31 -0400 |
commit | c121bdbb870b5c75a66a0df628ceb68a2b176c59 (patch) | |
tree | cc26234301e95fdc23b9a4aa0f7e928e9bfa6795 /tools/lib/traceevent | |
parent | 722a4984079c1237681742bfbc0cd2de99a8b17b (diff) |
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 <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-zzs19yx8seyors532vuer37w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent')
-rw-r--r-- | tools/lib/traceevent/Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index 8e44bea646ee..deeae5201ec9 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile | |||
@@ -236,10 +236,14 @@ TAGS: force | |||
236 | find . -name '*.[ch]' | xargs etags \ | 236 | find . -name '*.[ch]' | xargs etags \ |
237 | --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' | 237 | --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' |
238 | 238 | ||
239 | define do_install_mkdir | ||
240 | if [ ! -d '$(DESTDIR_SQ)$1' ]; then \ | ||
241 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \ | ||
242 | fi | ||
243 | endef | ||
244 | |||
239 | define do_install | 245 | define do_install |
240 | if [ ! -d '$(DESTDIR_SQ)$2' ]; then \ | 246 | $(call do_install_mkdir,$2); \ |
241 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \ | ||
242 | fi; \ | ||
243 | $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' | 247 | $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' |
244 | endef | 248 | endef |
245 | 249 | ||