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