Re: a problem report

Peter Samuelson (peter@cadcamlab.org)
Wed, 2 Oct 2002 13:49:11 -0500


[Sam Ravnborg]
> --- linux/sound/Config.in 2002-10-01 12:09:44.000000000 +0200
> +++ linux/sound/Config.in 2002-10-01 12:21:05.000000000 +0200
> @@ -31,10 +31,7 @@
> if [ "$CONFIG_SND" != "n" -a "$CONFIG_ARM" = "y" ]; then
> source sound/arm/Config.in
> fi
> -if [ "$CONFIG_SND" != "n" -a "$CONFIG_SPARC32" = "y" ]; then
> - source sound/sparc/Config.in
> -fi
> -if [ "$CONFIG_SND" != "n" -a "$CONFIG_SPARC64" = "y" ]; then
> +if [ "$CONFIG_SND" != "n" -a "$CONFIG_SPARC32" = "y" ] || [ "$CONFIG_SND" != "n" -a "$CONFIG_SPARC64" = "y" ] ; then
> source sound/sparc/Config.in
> fi

That's not right. You can't use '||' in config language. (Try it
with xconfig some time.) You have to either nest if statements or
make use of precedence. Documentation/kbuild/config-language.txt
doesn't actually specify the precedence, but in the Unix test(1) from
which it is derived, AND binds tighter than OR. Thus:

if [ "$CONFIG_SND" != "n" ]; then
if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
source sound/sparc/Config.in
fi
fi

-- or --

if [ "$CONFIG_SND" != "n" -a "$CONFIG_SPARC32" = "y" -o \
"$CONFIG_SND" != "n" -a "$CONFIG_SPARC64" = "y" ]; then
source sound/sparc/Config.in
fi

This 'if' statement syntax has *got* to go. I posted an incomplete
replacement syntax some time ago, but abandoned it because it appeared
Roman was almost ready to merge his new config stuff....

Peter
-
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/