batman-adv: Generate config compatible with kbuild macros
PATCH 1/1 batman-adv: Generate config compatible with kbuild macros
Linux 3.0-rc1-30-g2a11c8e introduced the macros IS_ENABLED, IS_BUILTIN and IS_MODULE that can be used to identify which state a tristate option had. The compat-autoconf.h needs to provide additional precompiler variables that these marcros can use.
Signed-off-by Sven Eckelmann <[email protected]>
--- gen-compat-autoconf.sh | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
gen-compat-autoconf.sh +8 -1
@@ -12,15 +12,22 @@ gen_config() { VALUE="${2}" echo "#undef ${KEY}" + echo "#undef __enabled_${KEY}" + echo "#undef __enabled_${KEY}_MODULE" case "${VALUE}" in y) echo "#define ${KEY} 1" + echo "#define __enabled_${KEY} 1" + echo "#define __enabled_${KEY}_MODULE 0" ;; m) echo "#define ${KEY} 1" + echo "#define __enabled_${KEY} 0" + echo "#define __enabled_${KEY}_MODULE 1" ;; n) - # leave it undefined + echo "#define __enabled_${KEY} 0" + echo "#define __enabled_${KEY}_MODULE 0" ;; *) echo "#define ${KEY} \"${VALUE}\""
Signature · 1 line
1.7.7.3
Marek Lindner
AppliedQuoted 4 lines · On Friday, December 09, 2011 17:18:27 Sven Eckelmann wrote:
Linux 3.0-rc1-30-g2a11c8e introduced the macros
IS_ENABLED,IS_BUILTINandIS_MODULEthat can be used to identify which state a tristate option had. Thecompat-autoconf.hneeds to provide additional precompiler variables that these marcros can use.
Applied in revision 24d65d3.
Thanks,
Marek