Prefer XDG directory for WeeChat if it exists

Closes #306.
This commit is contained in:
nyuszika7h 2022-01-26 12:06:45 +01:00
parent b88614e557
commit 0f4d83078a

View file

@ -1,6 +1,12 @@
.PHONY: install install-lib install-dir uninstall phony test typecheck .PHONY: install install-lib install-dir uninstall phony test typecheck
XDG_DATA_HOME ?= $(HOME)/.local/share
ifneq ("$(wildcard $(XDG_DATA_HOME)/weechat)","")
WEECHAT_HOME ?= $(XDG_DATA_HOME)/weechat
else
WEECHAT_HOME ?= $(HOME)/.weechat WEECHAT_HOME ?= $(HOME)/.weechat
endif
PREFIX ?= $(WEECHAT_HOME) PREFIX ?= $(WEECHAT_HOME)
INSTALLDIR := $(DESTDIR)$(PREFIX)/python/matrix INSTALLDIR := $(DESTDIR)$(PREFIX)/python/matrix