From 848b082605fafa27b61f61aa6cec759014ad283a Mon Sep 17 00:00:00 2001 From: JP Appel Date: Wed, 23 Sep 2026 12:27:28 -0400 Subject: Add dry run flag; Update makefile --- makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 5af28d0..273f1f1 100644 --- a/makefile +++ b/makefile @@ -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) ######## # -- cgit v1.2.3