bsd.port.mk INSTALL_* option

In /usr/ports/Mk/bsd.port.mk there's a INSTALL_SCRIPT def as:
INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE}
I was trying to understand what each option behind the vars does like

/usr/ports/bsd.port.mk
INSTALL="/usr/bin/install -c"

/usr/share/mk/bsd.own.mk
BINMODE?= 555

I was searching where is ${COPY} variable set and i didn't find it anywhere in the current source tree so extend my search into the commits and found that this option was removed in FreeBSD 4.5 as the install now by default "copy" the files instead of moving them to the new location. So my question is why there's still ${COPY} option in /usr/ports/Mk/bsd.port.mk ? Is it for compatibility reason with NetBSD which still have ${COPY} defined in they bsd.own.mk file?

# A few aliases for *-install targets
INSTALL_PROGRAM= ${INSTALL} ${COPY} ${STRIP} -m ${BINMODE}
INSTALL_KLD= ${INSTALL} ${COPY} -m ${BINMODE}
INSTALL_LIB= ${INSTALL} ${COPY} ${STRIP} -m ${_SHAREMODE}
INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE}
INSTALL_DATA= ${INSTALL} ${COPY} -m ${_SHAREMODE}
INSTALL_MAN= ${INSTALL} ${COPY} -m ${MANMODE}

Here's the link to the commit from 2002 for dropping the support of COPY, -c has been the default mode of install(1)
 
Just a prediction, but maybe it is kept for flexibility and sanity.
Imagine some port overrides ${INSTALL} and it is defaulting "move" operation, and the porter wants something to move but something to copy for staging. Unlikely, but possible.
 
Back
Top