diff options
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.README | 3 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/share/mk/bsd.README b/share/mk/bsd.README index f68e31e..3032622 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -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. diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index ffdfd5e..5fcd08a 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -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}) |