Closed astralchan closed 3 years ago
I like to keep config.mk as the file the user or packager should edit to set the variables that fits the system, and keep it unrelated to the actual build/installation process.
So setting
PREFIX = /path/to/system/usr
is more user-friendly than making the user deal with a prefix in the value of PREFIX
:
PREFIX = ${DESTDIR}/path/to/system/usr
If the issue is to not include ${DESTDIR}
so many times in Makefile
, I'd do the following changes:
config.mk
as it is.Makefile
, set bindir
and mandir
to ${DESTDIR}${PREFIX}
and ${DESTDIR}${MANPREFIX}
respectivelly.${bindir}
and ${mandir}
.Thus we reduce the number of references to ${DESTDIR}
from 6 to 2 in Makefile
while keeping config.mk
with just what the user needs to set (and nothing more).
Okay, defined bindir
and mandir
in an amended commit.
Merged! Thanks for the PR!
You can include DESTDIR when you define PATH, and everything will inherit it - no need to include DESTDIR repeatedly.