summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:28:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:28:19 +0000
commit624faf9194e73e0913ccb67bc7154c1b6a2c0aed (patch)
treeb6540eac4774f6fd2a4c52a2ee2a85209e8cd312 /Makefile
parentReleasing progress-linux version 3.5-3~progress7.99u1. (diff)
downloaddmidecode-624faf9194e73e0913ccb67bc7154c1b6a2c0aed.tar.xz
dmidecode-624faf9194e73e0913ccb67bc7154c1b6a2c0aed.zip
Merging upstream version 3.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 16 insertions, 2 deletions
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