[PATCH] trace-cmd: Install completion script in /usr/share/bash-completion/completions
Steven Rostedt <[email protected]> Fri, 11 Apr 2025 09:03:49 -0400
| Newsgroups | org.kernel.vger.linux-trace-devel |
|---|---|
| Message-ID | <[email protected]> |
From: "Steven Rostedt (Google)" <[email protected]> The meson install installs the bash completion in /usr/share/bash-completion/completions where as the normal "make install" places the script into /etc/bash_completions.d/. The former is actually where it should be installed. Change the make install to place the bash completion script into /usr/share/bash-completion/completions like the meson install does. Signed-off-by: Steven Rostedt (Google) <[email protected]> --- Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e044a0f0..5c0f1a33 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,8 @@ bindir_relative = bin bindir = $(prefix)/$(bindir_relative) man_dir = $(prefix)/share/man man_dir_SQ = '$(subst ','\'',$(man_dir))' +completion_dir = $(prefix)/share/bash-completion/completions +completion_dir_SQ = '$(subst ','\'',$(completion_dir))' html_install_SQ = '$(subst ','\'',$(html_install))' img_install_SQ = '$(subst ','\'',$(img_install))' libdir = $(prefix)/$(libdir_relative) @@ -79,9 +81,6 @@ includedir_SQ = '$(subst ','\'',$(includedir))' pkgconfig_dir ?= $(word 1,$(shell $(PKG_CONFIG) \ --variable pc_path pkg-config | tr ":" " ")) -etcdir ?= /etc -etcdir_SQ = '$(subst ','\'',$(etcdir))' - export man_dir man_dir_SQ html_install html_install_SQ INSTALL export img_install img_install_SQ libdir libdir_SQ includedir_SQ export DESTDIR DESTDIR_SQ @@ -115,8 +114,6 @@ HELP_DIR = -DHELP_DIR=$(html_install) HELP_DIR_SQ = '$(subst ','\'',$(HELP_DIR))' #' emacs highlighting gets confused by the above escaped quote. -BASH_COMPLETE_DIR ?= $(etcdir)/bash_completion.d - export PLUGIN_DIR_TRACECMD export PYTHON_DIR export PYTHON_DIR_SQ @@ -500,7 +497,7 @@ install_python: force $(Q)$(MAKE) -C $(src)/python $@ install_bash_completion: force - $(Q)$(call do_install_data,$(src)/tracecmd/trace-cmd.bash,$(BASH_COMPLETE_DIR)) + $(Q)$(call do_install_data,$(src)/tracecmd/trace-cmd.bash,$(completion_dir)) install_cmd: all_cmd install_plugins install_python install_bash_completion $(Q)$(call do_install,$(obj)/tracecmd/trace-cmd,$(bindir_SQ)) -- 2.47.2