On 2 Oct 2024, at 13:35, Ilya Maximets wrote:
> On 9/30/24 16:49, Roi Dayan via dev wrote:
>> Allow passing different DEB_BUILD_OPTIONS to make debian-deb.
>>
>> Signed-off-by: Roi Dayan <[email protected]>
>> ---
>>
>> Notes:
>> v3
>> - Remove unneeded export call.
>> - Move assignment to an existing DPDK_NETDEV check.
>>
>> v2
>> - Fix export of DEB_BUILD_OPTIONS in the Makefile
>>
>> debian/automake.mk | 9 +++------
>> 1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/debian/automake.mk b/debian/automake.mk
>> index 7b2afafae1a2..7607a2cd5b3a 100644
>> --- a/debian/automake.mk
>> +++ b/debian/automake.mk
>> @@ -98,10 +98,12 @@ if DPDK_NETDEV
>> update_deb_control = \
>> $(AM_V_GEN) sed -e 's/^\# DPDK_NETDEV //' \
>> < $(srcdir)/debian/control.in > debian/control
>> +DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
>> else
>> update_deb_control = \
>> $(AM_V_GEN) grep -v '^\# DPDK_NETDEV' \
>> < $(srcdir)/debian/control.in > debian/control
>> +DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
>> endif
>>
>> debian/control: $(srcdir)/debian/control.in Makefile
>> @@ -123,10 +125,5 @@ debian-deb: debian
>> $(update_deb_copyright)
>> $(update_deb_control)
>> $(AM_V_GEN) fakeroot debian/rules clean
>> -if DPDK_NETDEV
>> - $(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc`" \
>> - fakeroot debian/rules binary
>> -else
>> - $(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc` nodpdk" \
>> + $(AM_V_GEN) DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
>
> I think some confusion is coming from env variables vs make variables.
> While make imports all the env variables, the definitions in the file
> may still be a little confusing, since they are not shell definitions
> ( ?= is not a shell operator).
>
> Can we maybe use plain braces $() instead of curly ones here ${} ?
> That may probably make the code a little clearer.
Did a quick test and the $() approach works also. I can apply this during
commit time, Roi please confirm if you are ok with this change.
Cheers,
Eelco
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev