From 7cf264f01ce788d09b9cacefb7039a3ac2e0c454 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 26 Aug 2024 12:28:19 +0200 Subject: Adding upstream version 3.6. Signed-off-by: Daniel Baumann --- Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7aa729d..6fc946b 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ sbindir = $(prefix)/sbin mandir = $(prefix)/share/man man8dir = $(mandir)/man8 docdir = $(prefix)/share/doc/dmidecode +compdir = $(shell pkg-config --variable=completionsdir bash-completion 2>/dev/null || echo $(prefix)/etc/bash_completion.d) INSTALL := install INSTALL_DATA := $(INSTALL) -m 644 @@ -113,9 +114,9 @@ util.o : util.c types.h util.h config.h strip : $(PROGRAMS) strip $(PROGRAMS) -install : install-bin install-man install-doc +install : install-bin install-man install-doc install-completion -uninstall : uninstall-bin uninstall-man uninstall-doc +uninstall : uninstall-bin uninstall-man uninstall-doc uninstall-completion install-bin : $(PROGRAMS) $(INSTALL_DIR) $(DESTDIR)$(sbindir) @@ -144,5 +145,18 @@ install-doc : uninstall-doc : $(RM) -r $(DESTDIR)$(docdir) +install-completion : + if [ -d $(compdir) ] ; then \ + $(INSTALL_DIR) $(DESTDIR)$(compdir) ; \ + for program in $(PROGRAMS) ; do \ + $(INSTALL_DATA) completion/$$program.bash $(DESTDIR)$(compdir)/$$program ; done ; \ + fi + +uninstall-completion : + if [ -d $(DESTDIR)$(compdir) ]; then \ + for program in $(PROGRAMS) ; do \ + $(RM) $(DESTDIR)$(compdir)/$$program ; done ; \ + fi + clean : $(RM) *.o $(PROGRAMS) core -- cgit v1.2.3