diff options
author | agc <agc@pkgsrc.org> | 1998-09-16 08:46:58 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 1998-09-16 08:46:58 +0000 |
commit | a42523279cd3ed6fd4130673633bb5395ae2ce13 (patch) | |
tree | feb325eaa1f9b20e8915e9dcefe363bed6c60c74 /mk | |
parent | 8b11e5b45011ea1082f4a0cf1c264572bb258abf (diff) | |
download | pkgsrc-a42523279cd3ed6fd4130673633bb5395ae2ce13.tar.gz |
If WRKOBJDIR is set, try to create a symbolic link to the working
directory, but fail silently if we can't (for read-only pkgsrc use).
Also clean up properly if WRKOBJDIR is set.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index a8adf4319bf..dd7828f02d7 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.162 1998/09/15 17:28:34 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.163 1998/09/16 08:46:58 agc Exp $ # # This file is in the public domain. # @@ -838,6 +838,11 @@ do-extract: .ifndef NO_WRKDIR @${RM} -rf ${WRKDIR} @${MKDIR} ${WRKDIR} +.ifdef WRKOBJDIR + @if ${LN} -fs ${WRKDIR} ${WRKDIR_BASENAME} 2>/dev/null; then \ + ${ECHO} "${WRKDIR_BASENAME} -> ${WRKDIR}"; \ + fi +.endif # WRKOBJDIR .endif @for file in ${EXTRACT_ONLY}; do \ if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ @@ -1320,9 +1325,9 @@ clean: pre-clean .endif @${ECHO_MSG} "===> Cleaning for ${PKGNAME}" .if !defined(NO_WRKDIR) -.if defined(WRKOBJDIR) +.ifdef WRKOBJDIR @${RM} -rf ${WRKOBJDIR}/${PKGSRC_SUBDIR} - @${RM} -f ${WRKDIR} + @${RM} -f ${WRKDIR_BASENAME} .else @if [ -d ${WRKDIR} ]; then \ if [ -w ${WRKDIR} ]; then \ |