make: move bash/zsh completions to separate directories
Consequently, simplify the install target. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
560c00c9c2
commit
6468bafc5e
18
Makefile
18
Makefile
@ -13,6 +13,7 @@ MANS = \
|
|||||||
doc/pacstrap.8
|
doc/pacstrap.8
|
||||||
|
|
||||||
BASH = bash
|
BASH = bash
|
||||||
|
BASHCOMP := $(wildcard completion/bash/*)
|
||||||
|
|
||||||
all: $(BINPROGS) man
|
all: $(BINPROGS) man
|
||||||
man: $(MANS)
|
man: $(MANS)
|
||||||
@ -37,14 +38,13 @@ check: all
|
|||||||
@r=0; for t in test/test_*; do $(BASH) $$t || { echo $$t fail; r=1; }; done; exit $$r
|
@r=0; for t in test/test_*; do $(BASH) $$t || { echo $$t fail; r=1; }; done; exit $$r
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
install -dm755 $(DESTDIR)$(PREFIX)/bin
|
install -d $(DESTDIR)$(PREFIX)/bin
|
||||||
install -m755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin
|
install -m 0755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin
|
||||||
install -Dm644 completion/_archinstallscripts.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_archinstallscripts
|
install -d $(DESTDIR)$(PREFIX)/share/zsh/site-functions
|
||||||
cd completion; for comp in *.bash; do \
|
install -m 0644 completion/zsh/_archinstallscripts $(DESTDIR)$(PREFIX)/share/zsh/site-functions
|
||||||
install -Dm644 $$comp $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$${comp%%.*}; \
|
install -d $(DESTDIR)$(PREFIX)/share/bash-completion/completions
|
||||||
done;
|
install -m 0644 $(BASHCOMP) $(DESTDIR)$(PREFIX)/share/bash-completion/completions
|
||||||
for manfile in $(MANS); do \
|
install -d $(DESTDIR)$(PREFIX)/share/man/man8
|
||||||
install -Dm644 $$manfile -t $(DESTDIR)$(PREFIX)/share/man/man$${manfile##*.}; \
|
install -m 0644 $(MANS) $(DESTDIR)$(PREFIX)/share/man/man8
|
||||||
done;
|
|
||||||
|
|
||||||
.PHONY: all clean install uninstall
|
.PHONY: all clean install uninstall
|
||||||
|
Loading…
Reference in New Issue
Block a user