From 0dfb7ef6ae79ca50ce3bc51b5c4c69aa9e9d5c99 Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Wed, 23 Jan 2013 00:47:43 +0000 Subject: [PATCH] If PROGNAME is set, we need to use stage_as rather than stage_files to control the name in the stage tree. --- share/mk/bsd.prog.mk | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 82a3b07c7cf..b5b093fe863 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -241,12 +241,24 @@ stage_files stage_as: .else # normally only libs and includes are staged .if ${MK_STAGING_PROG:Uno} != "no" -STAGE_SETS+= prog STAGE_DIR.prog= ${STAGE_OBJTOP}${BINDIR} +STAGE_SYMLINKS_DIR.prog= ${STAGE_OBJTOP} + +.if defined(PROGNAME) +STAGE_AS_SETS+= prog +STAGE_AS_${PROG}= ${PROGNAME} +stage_as.prog: ${PROG} +.if !empty(PROG) +all: stage_as +.endif +.else +STAGE_SETS+= prog +stage_files.prog: ${PROG} .if !empty(PROG) all: stage_files -stage_files.prog: ${PROG} .endif +.endif + .if !empty(SYMLINKS) all: stage_symlinks STAGE_SYMLINKS.prog= ${SYMLINKS}