* [B.A.T.M.A.N.] [PATCH] batman-adv: Generate config compatible with kbuild macros
@ 2011-12-09 9:18 Sven Eckelmann
2011-12-10 9:34 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2011-12-09 9:18 UTC (permalink / raw)
To: b.a.t.m.a.n
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 <sven@narfation.org>
---
gen-compat-autoconf.sh | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/gen-compat-autoconf.sh b/gen-compat-autoconf.sh
index 440accc..1a020c1 100755
--- a/gen-compat-autoconf.sh
+++ b/gen-compat-autoconf.sh
@@ -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}\""
--
1.7.7.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-10 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09 9:18 [B.A.T.M.A.N.] [PATCH] batman-adv: Generate config compatible with kbuild macros Sven Eckelmann
2011-12-10 9:34 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox