From: Luis R. Rodriguez Date: Tue, 4 Aug 2009 22:42:44 +0000 (-0700) Subject: When something is set to 'n' on config.mk try to disable it X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9402a32b1e8bf98fd68e590157a9bede2b18b1d9;p=openwrt%2Fstaging%2Fblogic.git When something is set to 'n' on config.mk try to disable it This doens't work, but at least we tried. This means if we ever do want to disable something which an old kernel enabled we'll need to relabelt the kconfig option. Signed-off-by: Luis R. Rodriguez --- diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh index d7fad822f5b8..6c7cae72f962 100755 --- a/scripts/gen-compat-autoconf.sh +++ b/scripts/gen-compat-autoconf.sh @@ -42,23 +42,28 @@ DATE=$(date) function define_config { VAR=$1 VALUE=$2 - echo "#ifndef $VAR" case $VALUE in - n) # Do nothing + n) # Try to undefine it + echo "#undef $VAR" ;; y) + echo "#ifndef $VAR" echo "#define $VAR 1" + echo "#endif /* $VAR */ " ;; m) + echo "#ifndef $VAR" echo "#define $VAR 1" + echo "#endif /* $VAR */ " ;; *) # Assume string # XXX: add better checks to make sure what was on # the right was indeed a string + echo "#ifndef $VAR" echo "#define $VAR \"$VALUE\"" + echo "#endif /* $VAR */ " ;; esac - echo "#endif /* $VAR */ " } # This deals with core compat-wireless kernel requirements.