Merge branch 'tylerjw-macos-install'

This commit is contained in:
poljar (Damir Jelić) 2018-04-02 20:58:32 +02:00
commit 35c610d2cf

View file

@ -1,4 +1,4 @@
.PHONY: install install-lib phony test
.PHONY: install install-lib install-dir uninstall phony test
WEECHAT_HOME ?= $(HOME)/.weechat
PREFIX ?= $(WEECHAT_HOME)
@ -7,15 +7,21 @@ PYTHON ?= python
lib := $(patsubst matrix/%.py, $(DESTDIR)$(PREFIX)/python/matrix/%.py, \
$(wildcard matrix/*.py))
install: install-lib
install -Dm644 main.py $(DESTDIR)$(PREFIX)/python/matrix.py
install: install-dir install-lib
install -m644 main.py $(DESTDIR)$(PREFIX)/python/matrix.py
install-lib: $(lib)
install-dir:
install -d $(DESTDIR)$(PREFIX)/python/matrix
uninstall:
rm $(DESTDIR)$(PREFIX)/python/matrix.py $(DESTDIR)$(PREFIX)/python/matrix/*
rmdir $(DESTDIR)$(PREFIX)/python/matrix
phony:
$(DESTDIR)$(PREFIX)/python/matrix/%.py: matrix/%.py phony
install -Dm644 $< $@
install -m644 $< $@
test:
python3 -m pytest