Always define and use PROGNAME

This avoids having separate cases in the install rule for PROGNAME set and
not set.  This is a minor cleanup in advance of further support for
standalone debug files.
This commit is contained in:
Ed Maste 2013-03-26 20:32:46 +00:00
parent f5678b698a
commit a0dc59709c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248753

View File

@ -41,6 +41,7 @@ PROG= ${PROG_CXX}
.endif
.if defined(PROG)
PROGNAME?= ${PROG}
.if defined(SRCS)
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
@ -153,13 +154,8 @@ realinstall: _proginstall
.ORDER: beforeinstall _proginstall
_proginstall:
.if defined(PROG)
.if defined(PROGNAME)
${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
.else
${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
.endif
.endif
.endif # !target(realinstall)