aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-06-02 09:55:30 +0200
committerTakashi Iwai <tiwai@suse.de>2010-06-02 09:55:30 +0200
commitcb93c45fc2915e5f8148da0cf41f0306ffe7724e (patch)
tree08bcfb47f390cfb7bfca66157ebda23510c86c30
parent61b898e82e30d50e5da3ed64e79ec9d04fe7ee93 (diff)
downloadalsa-driver-build-unstable-cb93c45fc2915e5f8148da0cf41f0306ffe7724e.tar.gz
mod-deps - Don't put unrelated kconfigs in config1.h.in
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--utils/mod-deps.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/utils/mod-deps.c b/utils/mod-deps.c
index e30a9f1cc..4960c71e6 100644
--- a/utils/mod-deps.c
+++ b/utils/mod-deps.c
@@ -173,6 +173,9 @@ static char *kernel_deps[] = {
"%BITREVERSE",
/* used in core/pcm_timer.c, a wrapper present */
"%GCD",
+ /* others */
+ "%HAS_IOMEM",
+ "!M68K",
NULL
};
@@ -181,10 +184,8 @@ static char *kernel_deps[] = {
/* # -> menuconfig */
static char *no_cards[] = {
"%SOUND",
- "%HAS_IOMEM",
"SOUND_PRIME",
"%SND",
- "!M68K",
/* options given as configure options */
"SND_DYNAMIC_MINORS",
"SND_DEBUG",
@@ -999,13 +1000,13 @@ static int is_toplevel(struct dep *dep)
return 1;
}
-static int check_in_no_cards(struct dep *dep, char flag)
+static int check_in_list(struct dep *dep, char flag, char **list)
{
char **p;
if (!dep)
return 0;
- for (p = no_cards; *p; p++) {
+ for (p = list; *p; p++) {
if (**p != flag)
continue;
if (!strcmp(*p + 1, dep->name))
@@ -1013,6 +1014,13 @@ static int check_in_no_cards(struct dep *dep, char flag)
}
return 0;
}
+
+static int check_in_no_cards(struct dep *dep, char flag)
+{
+ return check_in_list(dep, flag, no_cards) ||
+ check_in_list(dep, flag, kernel_deps);
+}
+
// is CONFIG_ variable is always true
static int is_always_true(struct dep *dep)
{
@@ -1504,6 +1512,8 @@ static void output_include(void)
printf("/* Copyright (c) by Jaroslav Kysela <perex@perex.cz>, */\n");
printf("/* Anders Semb Hermansen <ahermans@vf.telia.no> */\n\n");
for (tempdep = all_deps; tempdep; tempdep = tempdep->next) {
+ if (is_kernel_deps(tempdep->name))
+ continue;
text = convert_to_config_uppercase("CONFIG_", tempdep->name);
printf("#undef %s%s\n", text,
tempdep->type == TYPE_TRISTATE ? "_MODULE" : "");