Closed astralchan closed 3 years ago
${DESTDIR}
should not be inserted at the beginning of ${PREFIX}
because Makefile
already calls
install ... ${DESTDIR}${PREFIX} ...
Having ${DESTDIR}
at the beginning of ${PREFIX}
would make that install
line expand to
install ... ${DESTDIR}${DESTDIR}${OLDPREFIX} ...
Thus including ${DESTDIR}
twice.
install has a -D flag
Some install(1)
s have a -D
flag. Others, such as FreeBSD's, has a -D
flag that behaves differently.
Indeed, I used -D
before (since it works on my OpenBSD system), but after xmenu get into FreeBSD ports, I had to replace it with a mkdir
in order to make things portable, see commit 1ca0d0d6.
Added
DESTIR
variable needed to be included in many distro package manager scripts that build and install packages. See here for more details.install
has a-D
flag to make the directories as needed, preventing redundancy over changes. This is all I can really think of at the moment. For other standards that should probably be followed, see GNU Coding Standards - Release Process, and something that's probably more relavent, see GNU Coding Standards - Makefile Conventions. I'm still learning about Makefiles and package management myself, so I thought I'd link stuff I found helpful. I'll keep an eye out if I messed up. Cheers ~