pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Most of this file only applies if we're ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/35394dba53e8
branches:  trunk
changeset: 466636:35394dba53e8
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jan 21 18:18:13 2004 +0000

description:
Most of this file only applies if we're in some phase after buildlink, so
enforce that using PHASES_AFTER_BUILDLINK.

Also, transform the physical path to ${WRKDIR} into the value ${WRKDIR} in
the wrapper scripts.  This allows ${WRKDIR} to be a path that traverses a
symlink.  In particular, it allows users to set WRKOBJDIR to point to a
symlink.

diffstat:

 mk/buildlink3/bsd.buildlink3.mk |  20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r 5ed0f6c2c0ab -r 35394dba53e8 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk   Wed Jan 21 18:13:27 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk   Wed Jan 21 18:18:13 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.53 2004/01/21 08:04:29 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.54 2004/01/21 18:18:13 jlam Exp $
 #
 # An example package buildlink3.mk file:
 #
@@ -132,6 +132,7 @@
 .  endif
 .endfor
 
+.if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE})
 # Generate default values for:
 #
 # BUILDLINK_IS_BUILTIN.<pkg>   "yes" or "no" for whether <pkg> is provided
@@ -671,6 +672,16 @@
 #
 _BLNK_PASSTHRU_RPATHDIRS:=     ${_BLNK_PASSTHRU_RPATHDIRS:N/usr/lib}
 
+# Resolve the path to ${WRKDIR} completely in case it's a symlink.
+.if !defined(_BLNK_WRKDIR)
+_BLNK_WRKDIR!= if [ -d ${WRKDIR} ]; then                               \
+                       cd ${WRKDIR}; ${PWD_CMD};                       \
+               else                                                    \
+                       ${ECHO} ${WRKDIR};                              \
+               fi
+MAKEFLAGS+=    _BLNK_WRKDIR="${_BLNK_WRKDIR}"
+.endif
+
 _BLNK_MANGLE_DIRS=     # empty
 _BLNK_MANGLE_DIRS+=    ${BUILDLINK_DIR}
 _BLNK_MANGLE_DIRS+=    ${BUILDLINK_X11_DIR}
@@ -718,6 +729,12 @@
 _BLNK_UNPROTECT_DIRS+= ${BUILDLINK_X11_DIR}
 _BLNK_UNPROTECT_DIRS+= ${BUILDLINK_DIR}
 
+# Transform all references to the physical path to ${WRKDIR} into ${WRKDIR}.
+#
+.if ${_BLNK_WRKDIR} != ${WRKDIR}
+_BLNK_TRANSFORM+=      mangle:${_BLNK_WRKDIR}:${WRKDIR}
+.endif
+#
 # Protect work directories and the dependency directories from all the
 # transformations we're about to do.
 #
@@ -1588,3 +1605,4 @@
        ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
        ${_PKG_SILENT}${_PKG_DEBUG}${_BLNK_GEN_TRANSFORM}               \
                ${_BLNK_TRANSFORM}
+.endif # BUILDLINK_PHASES



Home | Main Index | Thread Index | Old Index