From: Michael Stapelberg Date: Sat, 24 Jul 2010 10:21:33 +0000 (+0200) Subject: Makefile: don’t set PREFIX/SYSCONFDIR (necessary for OpenBSD ports framework) (Thanks... X-Git-Tag: 4.0~51 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ca8d775487354447dde2b2c5c8c5c82c230fab43;p=i3%2Fi3 Makefile: don’t set PREFIX/SYSCONFDIR (necessary for OpenBSD ports framework) (Thanks madroach) --- diff --git a/common.mk b/common.mk index 349da32f..7ba03769 100644 --- a/common.mk +++ b/common.mk @@ -1,11 +1,15 @@ UNAME=$(shell uname) DEBUG=1 INSTALL=install -PREFIX=/usr -ifeq ($(PREFIX),/usr) -SYSCONFDIR=/etc -else -SYSCONFDIR=$(PREFIX)/etc +ifndef PREFIX + PREFIX=/usr +endif +ifndef SYSCONFDIR + ifeq ($(PREFIX),/usr) + SYSCONFDIR=/etc + else + SYSCONFDIR=$(PREFIX)/etc + endif endif # The escaping is absurd, but we need to escape for shell, sed, make, define GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch $(shell [ -f .git/HEAD ] && sed 's/ref: refs\/heads\/\(.*\)/\\\\\\"\1\\\\\\"/g' .git/HEAD || echo 'unknown'))"