diff options
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,13 +1,15 @@ BINS := atlas BUILD_TAGS := icu fts5 SRC := main.go $(wildcard cmd/*.go) $(wildcard pkg/*/*.go) +EMBEDDED_FILES := $(wildcard cmd/completions/*) INSTALL_PATH := ~/.local/bin +COMPLETION_PATHS := ~/.config/zsh/completions/_atlas .PHONY: all install uninstall test info clean all: $(BINS) -atlas: $(SRC) +atlas: $(SRC) $(EMBEDDED_FILES) go build -tags "$(BUILD_TAGS)" -o $@ $< test: @@ -17,13 +19,18 @@ test: # ######## -install: $(INSTALL_PATH)/atlas +install: $(INSTALL_PATH)/atlas $(COMPLETION_PATHS) $(INSTALL_PATH)/atlas: atlas cp atlas $(INSTALL_PATH) -uninstall: $(INSTALL_PATH)/atlas - rm $< +~/.config/zsh/completions/_atlas: atlas + mkdir -p $(dir $@) + $< completions zsh > $@ + +uninstall: + rm -f $(INSTALL_PATH)/atlas + rm -f $(COMPLETION_PATHS) ######## # |
