lkml.org 
[lkml]   [2004]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: config language shortcomings in 2.4
Hi,

On Thu, Aug 19, 2004 at 12:12:29AM -0700, Joshua Kwan wrote:

> Eventually we continued droning through the corner cases until reaching
>
> if [ "$CONFIG_EXPERIMENTAL" = "y" -a \
> "$CONFIG_HOTPLUG" = "y" -a \
> "$CONFIG_FW_LOADER" = "y" -o "$CONFIG_FW_LOADER" = "m" -a \
> "$CONFIG_CRC32" = "y" -o "$CONFIG_CRC32" = "m" ]; then
> dep_tristate 'Broadcom Tigon3 support' CONFIG_TIGON3 $CONFIG_PCI $CONFIG_FW_LOADER $CONFIG_CRC32
> fi
>
> which finally has the desired effect.

I'm surprized, because I think you have a precedence problem here. Your 'if'
condition will be true if either :
CONFIG_CRC32 = m
or
CONFIG_CRC32 = y and CONFIG_FW_LOADER = m
or
CONFIG_FW_LOADER = y and CONFIG_HOTPLUG = y and CONFIG_EXPERIMENTAL = y

Anyway, I believe that you have no other choice due to the way dep_tristate
works. What would you expect it to do when it depends on 3 variables which
are respectively 'n', 'm' and 'y' ? Honnestly, without looking closer at its
implementation, I would not be able to give a valid response.

BTW, have you tried defining a temporary variable somewhere ? There are
portions of config where you see things such as :

if [ CONFIG_XX = "y" -o CONFIG_YY = "m" -a CONFIG_ZZ = "y" ]; then
TEMP=y
fi
dep_tristate "cool feature" CONFIG_COOL $TEMP

Perhaps it could help you define complex combinations.

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.066 / U:12.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site