Linux-Trace-Devel Archive on
 help / color / Atom feed
* [PATCH] trace-cmd: Have /etc paths honor $(prefix) if not the default
@ 2020-01-29 15:43 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2020-01-29 15:43 UTC (permalink / raw)
  To: Linux Trace Devel; +Cc: Julia Lawall

From: "Steven Rostedt (VMware)" <>

As some files need to be placed in the root directory to take effect (like
the bash_completion) and not the normal /usr/local directory, they ignore
the $(prefix) and install directly. Unfortunately, this means that if
someone does a build like "make O=/tmp/mydir install" those files will still
try to be installed in the root "/etc" directory, and that will not work if
the user installing does not have permission.

Have the "/etc" directory change if prefix is something other than

Reported-by: Julia Lawall <>
Fixes: 77bdcb9b2 ("trace-cmd: Install trace-cmd.bash when installing")
Signed-off-by: Steven Rostedt (VMware) <>
 Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 477625f7..d75f1437 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,13 @@ libdir_SQ = '$(subst ','\'',$(libdir))'
 includedir = $(prefix)/include
 includedir_SQ = '$(subst ','\'',$(includedir))'
+ifeq ($(prefix),/usr/local)
+etcdir ?= /etc
+etcdir ?= $(prefix)/etc
+etcdir_SQ = '$(subst ','\'',$(etcdir))'
 export man_dir man_dir_SQ html_install html_install_SQ INSTALL
 export img_install img_install_SQ
@@ -87,8 +94,8 @@ HELP_DIR = -DHELP_DIR=$(html_install)
 HELP_DIR_SQ = '$(subst ','\'',$(HELP_DIR))'
 #' emacs highlighting gets confused by the above escaped quote.
-BASH_COMPLETE_DIR ?= /etc/bash_completion.d
-LD_SO_CONF_DIR ?= /etc/
+BASH_COMPLETE_DIR ?= $(etcdir)/bash_completion.d
+LD_SO_CONF_DIR ?= $(etcdir)/
 TRACE_LD_FILE ?= trace.conf

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 15:43 [PATCH] trace-cmd: Have /etc paths honor $(prefix) if not the default Steven Rostedt

Linux-Trace-Devel Archive on

Archives are clonable:
	git clone --mirror linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ \
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone