upd Makefile
This commit is contained in:
parent
a0b5dfe0e6
commit
ea846e9386
10
Makefile
10
Makefile
@ -1,7 +1,7 @@
|
||||
BIN := "nexclamation"
|
||||
SYMLINK := "n!"
|
||||
COMPL := "completion"
|
||||
TMP := "./.installation_prefix"
|
||||
PREF := "./.installation_prefix"
|
||||
|
||||
all:
|
||||
@echo Nothing to do. Available targets: install, uninstall, set-prefix
|
||||
@ -12,7 +12,7 @@ all:
|
||||
@echo make PREFIX=/your/path install
|
||||
|
||||
install: set-prefix
|
||||
$(eval PREFIX := $(shell cat $(TMP)))
|
||||
$(eval PREFIX := $(shell cat $(PREF)))
|
||||
@echo Installation PREFIX $(PREFIX)
|
||||
COMPDIR="$(PREFIX)/share/bash-completion/completions"; \
|
||||
mkdir -p "$(PREFIX)" && \
|
||||
@ -23,7 +23,7 @@ install: set-prefix
|
||||
@echo Successfully installed
|
||||
|
||||
uninstall:
|
||||
$(eval PREFIX := $(shell cat $(TMP)))
|
||||
$(eval PREFIX := $(shell cat $(PREF)))
|
||||
@echo Installation PREFIX $(PREFIX)
|
||||
COMPDIR="$(PREFIX)/share/bash-completion/completions"; \
|
||||
rm -f "$(PREFIX)/bin/$(BIN)" && \
|
||||
@ -33,5 +33,5 @@ uninstall:
|
||||
|
||||
set-prefix:
|
||||
if [ "$$UID" == "0" ]; then \
|
||||
echo $${PREFIX:-/usr/local} > $(TMP); else \
|
||||
echo $${PREFIX:-$$HOME/.local} > $(TMP); fi;
|
||||
echo $${PREFIX:-/usr/local} > $(PREF); else \
|
||||
echo $${PREFIX:-$$HOME/.local} > $(PREF); fi;
|
||||
|
Loading…
Reference in New Issue
Block a user