Skip to content

Commit

Permalink
Makefile: clean up
Browse files Browse the repository at this point in the history
seds for completions should happen during build not install
  • Loading branch information
classabbyamp committed Apr 13, 2023
1 parent 98d1cc1 commit 8550331
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8550331

Please sign in to comment.