diff options
author | hubertf <hubertf@pkgsrc.org> | 1998-07-03 19:27:39 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1998-07-03 19:27:39 +0000 |
commit | 49e451283d4c9d5b62bc7a961fa8698e79c84784 (patch) | |
tree | 82eecadd930b371f5f97b4d8d1d1e90e6ff9ab64 /mk | |
parent | 1f1bdf4e1ba6c31fa874d3d2593461f310862dea (diff) | |
download | pkgsrc-49e451283d4c9d5b62bc7a961fa8698e79c84784.tar.gz |
When OBJMACHINE and WRKOBJDIR set, be sure to also add the arch name to
the directory created in $WRKOBJDIR, to allow using the same obj-dir for
several architectures at once (e.g. via NFS or with cross compiling).
Inspired by Bill Studenmund <skippy@macro.stanford.edu>.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 8bede9c2fcd..ca0bbe4eae6 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.106 1998/06/29 21:52:20 hubertf Exp $ +# $NetBSD: bsd.pkg.mk,v 1.107 1998/07/03 19:27:39 hubertf Exp $ # # This file is in the public domain. # @@ -255,18 +255,19 @@ SHAREMODE = ${DOCMODE} .if !defined(NO_WRKDIR) .if defined(OBJMACHINE) -WRKDIR?= ${.CURDIR}/work.${MACHINE_ARCH} -.else -WRKDIR?= ${.CURDIR}/work -.endif -.else +WRKDIR_BASENAME?= work.${MACHINE_ARCH} +.else # OBJMACHINE +WRKDIR_BASENAME?= work +.endif # OBJMACHINE +WRKDIR?= ${.CURDIR}/${WRKDIR_BASENAME} +.else # !NO_WRKDIR WRKDIR?= ${.CURDIR} -.endif +.endif # !NO_WRKDIR .if defined(NO_WRKSUBDIR) WRKSRC?= ${WRKDIR} -.else +.else # NO_WRKSUBDIR WRKSRC?= ${WRKDIR}/${DISTNAME} -.endif +.endif # NO_WRKSUBDIR .if defined(WRKOBJDIR) # XXX Is pwd -P available in FreeBSD's /bin/sh? @@ -768,11 +769,11 @@ mirror-distfiles: do-extract: .if !defined(NO_WRKDIR) .if defined(WRKOBJDIR) - @${RM} -rf ${WRKOBJDIR}/${PORTSUBDIR} - @${MKDIR} -p ${WRKOBJDIR}/${PORTSUBDIR} - @echo "${WRKDIR} -> ${WRKOBJDIR}/${PORTSUBDIR}" + @${RM} -rf ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME} + @${MKDIR} -p ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME} + @echo "${WRKDIR} -> ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME}" @# XXX whatif a build is going on right now? Is this wise? - @${LN} -sf ${WRKOBJDIR}/${PORTSUBDIR} ${WRKDIR} + @${LN} -sf ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME} ${WRKDIR} .else @${RM} -rf ${WRKDIR} @${MKDIR} ${WRKDIR} |