From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 1/3] libtracefs: Move do_install_* macros to utils.mk
Date: Tue, 15 Dec 2020 11:40:31 -0500 [thread overview]
Message-ID: <20201215164107.465848331@goodmis.org> (raw)
In-Reply-To: 20201215164030.520449524@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
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@goodmis.org>
---
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
next prev parent reply other threads:[~2020-12-15 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 16:40 [PATCH 0/3] libtracefs: Cleaning up the build Steven Rostedt
2020-12-15 16:40 ` Steven Rostedt [this message]
2020-12-15 16:40 ` [PATCH 2/3] libtracefs: Print installing messages Steven Rostedt
2020-12-15 16:40 ` [PATCH 3/3] libtracefs: Remove KernelShark relics from build Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201215164107.465848331@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.