From: Pavel Hrdina Date: Wed, 17 Jun 2020 23:53:04 +0000 (+0200) Subject: meson: tools: install bash-completion files X-Git-Tag: v6.7.0-rc1~335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37423c6892f80b4b7c16eb11b1cd13b4769e066e;p=thirdparty%2Flibvirt.git meson: tools: install bash-completion files Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- diff --git a/tools/Makefile.am b/tools/Makefile.am index ba3b0bbc12..9c91cac9cc 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -23,32 +23,9 @@ STANDALONE_CPPFLAGS = -I$(top_srcdir) noinst_LTLIBRARIES = -install-data-local: install-nss \ - install-bash-completion - -uninstall-local: uninstall-nss \ - uninstall-bash-completion - -if WITH_BASH_COMPLETION -install-bash-completion: - $(MKDIR_P) "$(DESTDIR)$(BASH_COMPLETIONS_DIR)" - $(INSTALL_DATA) $(srcdir)/bash-completion/vsh \ - "$(DESTDIR)$(BASH_COMPLETIONS_DIR)/vsh" - ( cd $(DESTDIR)$(BASH_COMPLETIONS_DIR) && \ - rm -f virsh virt-admin && \ - $(LN_S) vsh virsh && \ - $(LN_S) vsh virt-admin ) - -uninstall-bash-completion: - rm -f $(DESTDIR)$(BASH_COMPLETIONS_DIR)/vsh \ - $(DESTDIR)$(BASH_COMPLETIONS_DIR)/virsh \ - $(DESTDIR)$(BASH_COMPLETIONS_DIR)/virt-admin - rmdir $(DESTDIR)$(BASH_COMPLETIONS_DIR) ||: -else ! WITH_BASH_COMPLETION -install-bash-completion: -uninstall-bash-completion: -endif ! WITH_BASH_COMPLETION +install-data-local: install-nss +uninstall-local: uninstall-nss if WITH_WIRESHARK_DISSECTOR diff --git a/tools/bash-completion/meson.build b/tools/bash-completion/meson.build new file mode 100644 index 0000000000..8924c93adf --- /dev/null +++ b/tools/bash-completion/meson.build @@ -0,0 +1,11 @@ +install_data('vsh', install_dir: bash_completion_dir) + +meson.add_install_script( + meson_python_prog.path(), python3_prog.path(), meson_install_symlink_prog.path(), + bash_completion_dir, 'vsh', 'virsh', +) + +meson.add_install_script( + meson_python_prog.path(), python3_prog.path(), meson_install_symlink_prog.path(), + bash_completion_dir, 'vsh', 'virt-admin', +) diff --git a/tools/meson.build b/tools/meson.build index 12594a8a76..765532f3b1 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -286,3 +286,7 @@ if init_script == 'systemd' install_dir: prefix / 'lib' / 'systemd' / 'system', ) endif + +if bash_completion_dep.found() + subdir('bash-completion') +endif