Introduce ${PROGNAME}, the name that the program will be installed as,

if different from ${PROG}.  (The name PROGNAME was stolen from NetBSD.)

Reviewed by:	bde
This commit is contained in:
Ruslan Ermilov 2001-04-02 11:44:20 +00:00
parent 581a68a232
commit 95f8c8262a
2 changed files with 8 additions and 0 deletions

View File

@ -217,6 +217,9 @@ MAN Manual pages (should end in .1 - .9). If no MAN variable
PROG The name of the program to build. If not supplied, nothing
is built.
PROGNAME The name that the above program will be installed as, if
different from ${PROG}.
SRCS List of source files to build the program. If SRCS is not
defined, it's assumed to be ${PROG}.c.

View File

@ -97,9 +97,14 @@ _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
realinstall: beforeinstall
.if defined(PROG)
.if defined(PROGNAME)
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
.else
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
.endif
.endif
.if defined(HIDEGAME)
(cd ${DESTDIR}/${GBINDIR}; rm -f ${PROG}; ln -s dm ${PROG}; \
chown games:bin ${PROG})