From 2cb10dbc84b18536f49ae2492d12b72fbeac807b Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 4 May 2017 18:30:56 +0000 Subject: Simplify PATH handling. Use full pkgsrc path for cwrappers, but skip the cwrapper directory itself. --- mk/bsd.pkg.mk | 14 +++----------- mk/cwrappers.mk | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'mk') diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index d4e4e916aa4..6173a0befa8 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -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 @@ _PATH_ORIG:= ${PATH} 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 --git a/mk/cwrappers.mk b/mk/cwrappers.mk index e807114f36a..b24918d8f18 100644 --- a/mk/cwrappers.mk +++ b/mk/cwrappers.mk @@ -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 @@ generate-cwrappers: .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} -- cgit v1.2.3