pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Simplify PATH handling. Use full pkgsrc path for cw...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cd03f6543a49
branches:  trunk
changeset: 362088:cd03f6543a49
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu May 04 18:30:56 2017 +0000

description:
Simplify PATH handling. Use full pkgsrc path for cwrappers, but skip the
cwrapper directory itself.

diffstat:

 mk/bsd.pkg.mk   |  14 +++-----------
 mk/cwrappers.mk |   4 ++--
 2 files changed, 5 insertions(+), 13 deletions(-)

diffs (46 lines):

diff -r 8907a040a8cf -r cd03f6543a49 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Thu May 04 18:29:48 2017 +0000
+++ b/mk/bsd.pkg.mk     Thu May 04 18:30:56 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.2021 2016/08/26 16:51:56 joerg Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.2022 2017/05/04 18:30:56 joerg Exp $
 #
 # This file is in the public domain.
 #
@@ -431,16 +431,8 @@
 MAKEFLAGS+=            _PATH_ORIG=${_PATH_ORIG:Q}
 .endif
 
-.if !empty(PREPEND_PATH:M*)
-# This is very Special.  Because PREPEND_PATH is set with += in reverse order,
-# this command reverses the order again (since bootstrap bmake doesn't
-# yet support the :[-1..1] construct).
-_PATH_CMD= \
-       path=${_PATH_ORIG:Q};                                           \
-       for i in ${PREPEND_PATH}; do path="$$i:$$path"; done;           \
-       ${ECHO} "$$path"
-PATH=  ${_PATH_CMD:sh} # DOES NOT use :=, to defer evaluation
-.endif
+_PATH_COMPONENTS=      ${PREPEND_PATH:[-1..1]} ${_PATH_ORIG:C,:, ,}
+PATH=  ${_PATH_COMPONENTS:ts:}
 
 ################################################################
 # Many ways to disable a package.
diff -r 8907a040a8cf -r cd03f6543a49 mk/cwrappers.mk
--- a/mk/cwrappers.mk   Thu May 04 18:29:48 2017 +0000
+++ b/mk/cwrappers.mk   Thu May 04 18:30:56 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cwrappers.mk,v 1.27 2016/10/05 12:46:43 joerg Exp $
+# $NetBSD: cwrappers.mk,v 1.28 2017/05/04 18:30:56 joerg Exp $
 #
 # This Makefile fragment implements integration of pkgtools/cwrappers.
 
@@ -67,7 +67,7 @@
 .for wrappee in as cxx cc cpp f77 imake ld libtool shlibtool
        ${RUN}echo worklog=${WRKLOG:Q} > ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
        ${RUN}echo wrksrc=${WRKSRC:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
-       ${RUN}case ${wrappee} in *libtool) ;; *) echo path=${_PATH_ORIG:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}};; esac
+       ${RUN}case ${wrappee} in *libtool) ;; *) echo path=${_PATH_COMPONENTS:N${WRAPPER_BINDIR}:ts::Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}};; esac
        ${RUN}echo exec_path=${WRAPPER_BINDIR}/${CWRAPPERS_ALIASES.${wrappee}:[1]} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
        ${RUN}echo exec=${CWRAPPERS_WRAPPEE.${wrappee}:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
 .  for cmd in ${WRAPPER_REORDER_CMDS}



Home | Main Index | Thread Index | Old Index