Merge utils: allow install locations to be overridden in Makefile

Instead of setting those variables unconditionally, set them if they
aren't externally set by environment variables. This will allow for usages
like DESTDIR=/some/other/dir make install in the utils directory.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1542
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
This commit is contained in:
John Johansen 2025-02-13 21:52:04 +00:00
commit 49bc2d855f

View file

@ -39,10 +39,10 @@ all: docs
docs: ${MANPAGES} ${HTMLMANPAGES} docs: ${MANPAGES} ${HTMLMANPAGES}
# need some better way of determining this # need some better way of determining this
DESTDIR=/ DESTDIR?=/
BINDIR=${DESTDIR}/usr/sbin BINDIR?=${DESTDIR}/usr/sbin
CONFDIR=${DESTDIR}/etc/apparmor CONFDIR?=${DESTDIR}/etc/apparmor
PYPREFIX=/usr PYPREFIX?=/usr
po/${NAME}.pot: ${TOOLS} ${PYMODULES} po/${NAME}.pot: ${TOOLS} ${PYMODULES}