From 85503313beb03b5b4f3904ee7ab8be97e7d070c2 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Thu, 13 Apr 2023 03:21:47 -0400 Subject: [PATCH] Makefile: clean up seds for completions should happen during build not install --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 49ea941..efd3c20 100644 --- a/Makefile +++ b/Makefile @@ -3,19 +3,21 @@ DESTDIR ?= PREFIX ?= /usr/local MIRRORURL ?= https://xmirror.voidlinux.org/raw/mirrors.lst -.PHONY: completions install clean deploy +.PHONY: all completions install clean deploy + +all: xmirror completions xmirror: xmirror.in sed -e "s/@@VERSION@@/$(VERSION)/g; s,@@MIRRORURL@@,$(MIRRORURL),g" $< >$@+ chmod +x $@+ mv $@+ $@ -completions/_xmirror: completions/_xmirror.in - sed -e "s,@@PREFIX@@,$(PREFIX),g" $< >$@ - completions: completions/_xmirror -install: xmirror completions +completions/%: completions/%.in + sed -e "s,@@PREFIX@@,$(PREFIX),g" $< >$@ + +install: all install -Dm 755 xmirror -t $(DESTDIR)$(PREFIX)/bin install -Dm 644 mirrors.lst -t $(DESTDIR)$(PREFIX)/share/xmirror install -Dm 644 completions/_xmirror -t $(DESTDIR)$(PREFIX)/share/zsh/site-functions