Skip to content

Commit

Permalink
make: add LOCALSTATEDIR
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Oct 26, 2015
1 parent c8a5784 commit 0e1b70d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ LIBEXECDIR = ${EPREFIX}/libexec
DATADIR = ${PREFIX}/share
MANDIR = ${DATADIR}/man
SYSCONFDIR = ${PREFIX}/etc
LOCALSTATEDIR = ${PREFIX}/var

DESTDIR=

Expand All @@ -43,6 +44,11 @@ ifneq (, $(filter /usr /usr/local, ${PREFIX}))
SYSCONFDIR = /etc
endif

### set localstatedir /var if prefix /usr || /usr/local
ifneq (, $(filter /usr /usr/local, ${PREFIX}))
LOCALSTATEDIR = /var
endif

########################################################################

### strip /mxq from SYSCONFDIR if set
Expand Down Expand Up @@ -125,6 +131,7 @@ CFLAGS += -DLIBEXECDIR=\"${LIBEXECDIR}\"
CFLAGS += -DDATADIR=\"${DATADIR}\"
CFLAGS += -DMANDIR=\"${MANDIR}\"
CFLAGS += -DSYSCONFDIR=\"${SYSCONFDIR}\"
CFLAGS += -DLOCALSTATEDIR=\"${LOCALSTATEDIR}\"
CFLAGS += $(EXTRA_CFLAGS)

########################################################################
Expand Down

0 comments on commit 0e1b70d

Please sign in to comment.