diff options
author | ru <ru@FreeBSD.org> | 2001-04-02 11:44:20 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-04-02 11:44:20 +0000 |
commit | 755e4fa30b416226748e41463a162a6b7bab955d (patch) | |
tree | b8f8aac04c7f38a23d0654dd275d7b25851ed7e2 /share | |
parent | a24ec299ea9604c83b151707b8879b3ef69b50d4 (diff) | |
download | FreeBSD-src-755e4fa30b416226748e41463a162a6b7bab955d.zip FreeBSD-src-755e4fa30b416226748e41463a162a6b7bab955d.tar.gz |
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
Diffstat (limited to 'share')
-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}) |