From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> The do_install_* macros are in the main Makefile, and they overwrite some of the same macros in utils.mk. Move those macros into the utils.mk and delete the ones that were not used. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- Makefile | 19 ------------------- scripts/utils.mk | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 5e7831407427..5a9d33455143 100644 --- a/Makefile +++ b/Makefile @@ -206,25 +206,6 @@ endef $(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template $(Q) $(call do_make_pkgconfig_file,$(prefix)) -define do_install_mkdir - if [ ! -d '$(DESTDIR_SQ)$1' ]; then \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \ - fi -endef - -define do_install - $(call do_install_mkdir,$2); \ - $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' -endef - -define do_install_pkgconfig_file - if [ -n "${pkgconfig_dir}" ]; then \ - $(call do_install,$(PKG_CONFIG_FILE),$(pkgconfig_dir),644); \ - else \ - (echo Failed to locate pkg-config directory) 1>&2; \ - fi -endef - tags: force $(RM) tags $(call find_tag_files) | xargs ctags --extra=+f --c-kinds=+px diff --git a/scripts/utils.mk b/scripts/utils.mk index 7967a4f290d2..71985e6a28b1 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -119,18 +119,21 @@ define update_dir fi); endef +define do_install_mkdir + if [ ! -d '$(DESTDIR_SQ)$1' ]; then \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \ + fi +endef + define do_install - $(print_install) \ - if [ ! -d '$(DESTDIR_SQ)$2' ]; then \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \ - fi; \ - $(INSTALL) $1 '$(DESTDIR_SQ)$2' + $(call do_install_mkdir,$2); \ + $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' endef -define do_install_data - $(print_install) \ - if [ ! -d '$(DESTDIR_SQ)$2' ]; then \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \ - fi; \ - $(INSTALL) -m 644 $1 '$(DESTDIR_SQ)$2' +define do_install_pkgconfig_file + if [ -n "${pkgconfig_dir}" ]; then \ + $(call do_install,$(PKG_CONFIG_FILE),$(pkgconfig_dir),644); \ + else \ + (echo Failed to locate pkg-config directory) 1>&2; \ + fi endef -- 2.29.2