Re: graphics/gpu-firmware-kmod and PORTS_MODULES - how to!?
- In reply to: Tatsuki Makino : "Re: graphics/gpu-firmware-kmod and PORTS_MODULES - how to!?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 28 May 2022 04:06:29 UTC
On Sat, 28 May 2022 09:59:23 +0900 Tatsuki Makino <tatsuki_makino@hotmail.com> wrote: > diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk > index cce9fcfd1c6..f6217d38bb8 100644 > --- a/sys/conf/kern.post.mk > +++ b/sys/conf/kern.post.mk > @@ -95,7 +95,12 @@ PORTSMODULESENV=\ > all: > .for __i in ${PORTS_MODULES} > @${ECHO} "===> Ports module ${__i} (all)" > - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} > ${MAKE} -B clean build > + __i="${__i}" ;\ > + if [ "$${__i%@*}" = "$${__i}" ] ; then\ > + cd $${PORTSDIR:-/usr/ports}/$${__i}; ${PORTSMODULESENV} > ${MAKE} -B clean build ;\ > + else\ > + cd $${PORTSDIR:-/usr/ports}/$${__i%@*}; ${PORTSMODULESENV} > ${MAKE} -B "FLAVOR=$${__i##*@}" clean build ;\ > + fi > .endfor > > .for __target in install reinstall clean Short form using bmake features is: @@ -133,7 +157,8 @@ PORTSMODULESENV=\ all: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (all)" - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean build + ${PORTSMODULESENV} ${MAKE} -C "${PORTSDIR}/${__i:C/@.*//g}" \ + ${__i:M*@*:C/.*@/FLAVOR=/g} clean build .endfor .for __target in install reinstall clean @@ -141,7 +166,9 @@ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (${__target})" - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/(re)?install/deinstall reinstall/} + ${PORTSMODULESENV} ${MAKE} -C "${PORTSDIR}/${__i:C/@.*//g}" \ + ${__i:M*@*:C/.*@/FLAVOR=/g} \ + ${__target:C/(re)?install/deinstall reinstall/} .endfor .endfor .endif