FreeBSD Bugzilla – Attachment 163363 Details for
Bug 204708
Mk/bsd.option.mk: variable expansion difference between _(ON|OFF) and _(WITH|ENABLE)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
bsd.option.mk incomplete patch as there're more cases with premature expansion
options.patch (text/plain), 2.21 KB, created by
Jason Unovitch
on 2015-11-21 03:23:34 UTC
(
hide
)
Description:
bsd.option.mk incomplete patch as there're more cases with premature expansion
Filename:
MIME Type:
Creator:
Jason Unovitch
Created:
2015-11-21 03:23:34 UTC
Size:
2.21 KB
patch
obsolete
>Jason Unovitch <junovitch@FreeBSD.org> writes: > >> PERL_USES= perl5 >> PERL_CONFIGURE_ENABLE= perl >> PERL_CONFIGURE_WITH= perl=${PERL} perl-bindings >> PYTHON_USES= python:2 >> PYTHON_CONFIGURE_ENABLE= python >> PYTHON_CONFIGURE_WITH= python=${PYTHON_CMD} >[...] >> % make -VCONFIGURE_ARGS >> "--enable-python --with-python= " >> "--enable-perl --with-perl= --with-perl-bindings" > >It appears bsd.option.mk expands _WITH and _ENABLE twice unlike _ON/_OFF: >once in .for loop and once (lazily) when CONFIGURE_ARGS is referenced. >Try using $${PERL} and $${PYTHON_CMD} or the following patch: > ># XXX incomplete as there're more cases with premature expansion >Index: Mk/bsd.options.mk >=================================================================== >--- Mk/bsd.options.mk (revision 401846) >+++ Mk/bsd.options.mk (working copy) >@@ -491,16 +491,8 @@ ${_u:tu}= ${${opt}_VARS:M${var}=*:C/[^=]*=//:C/^" > . endif > . endfor > . endif >-. if defined(${opt}_CONFIGURE_ENABLE) >-. for iopt in ${${opt}_CONFIGURE_ENABLE} >-CONFIGURE_ARGS+= --enable-${iopt} >-. endfor >-. endif >-. if defined(${opt}_CONFIGURE_WITH) >-. for iopt in ${${opt}_CONFIGURE_WITH} >-CONFIGURE_ARGS+= --with-${iopt} >-. endfor >-. endif >+CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:C/.+/--enable-&/} >+CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:C/.+/--with-&/} > . for configure in CONFIGURE CMAKE QMAKE > . if defined(${opt}_${configure}_ON) > ${configure}_ARGS+= ${${opt}_${configure}_ON} >@@ -539,16 +531,8 @@ ${_u:tu}= ${${opt}_VARS_OFF:M${var}=*:C/[^=]*=//: > . endif > . endfor > . endif >-. if defined(${opt}_CONFIGURE_ENABLE) >-. for iopt in ${${opt}_CONFIGURE_ENABLE} >-CONFIGURE_ARGS+= --disable-${iopt:C/=.*//} >-. endfor >-. endif >-. if defined(${opt}_CONFIGURE_WITH) >-. for iopt in ${${opt}_CONFIGURE_WITH} >-CONFIGURE_ARGS+= --without-${iopt:C/=.*//} >-. endfor >-. endif >+CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:C/=.*//:C/.+/--disable-&/} >+CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:C/=.*//:C/.+/--without-&/} > . for configure in CONFIGURE CMAKE QMAKE > . if defined(${opt}_${configure}_OFF) > ${configure}_ARGS+= ${${opt}_${configure}_OFF}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 204708
: 163363