summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6c985ce..3d9dfbe 100644
--- a/Makefile
+++ b/Makefile
@@ -24,9 +24,12 @@ COMPDIR = $(shell pkg-config --variable=completionsdir bash-completion)
VERSION = 0.0
-all:
+all: completions/mupdf-gl completions/mupdf-x11
-.PHONY: install dist
+completions/mupdf-%: completions/mupdf
+ sed 's/mupdf/$(notdir $@)/' "$<" > "$@"
+
+.PHONY: all dist install
install: all
install -D -m0644 -t $(DESTDIR)$(COMPDIR) completions/*