diff options
author | joerg <joerg@pkgsrc.org> | 2017-05-04 18:30:56 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2017-05-04 18:30:56 +0000 |
commit | 2cb10dbc84b18536f49ae2492d12b72fbeac807b (patch) | |
tree | de37379bb87f383e4a4c2f5f115c2c007835648b /mk | |
parent | 0954f7227011493010e17b39812752863804dc56 (diff) | |
download | pkgsrc-2cb10dbc84b18536f49ae2492d12b72fbeac807b.tar.gz |
Simplify PATH handling. Use full pkgsrc path for cwrappers, but skip the
cwrapper directory itself.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 14 | ||||
-rw-r--r-- | mk/cwrappers.mk | 4 |
2 files changed, 5 insertions, 13 deletions
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} |