Update of /cvsroot/alsa/alsa-driver/utils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18514
Modified Files:
mod-deps.c
Log Message:
Fixed dependency generation for single cards
Index: mod-deps.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/utils/mod-deps.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod-deps.c 15 Mar 2004 08:05:20 -0000 1.6
+++ mod-deps.c 18 Mar 2004 09:56:50 -0000 1.7
@@ -47,6 +47,7 @@
struct sel {
char *name; /* dependency name */
+ int hitflag;
struct dep *dep; /* dependency pointer */
struct sel *next;
};
@@ -61,6 +62,8 @@
struct dep *next;
// bool?
int is_bool;
+ // hitflag?
+ int hitflag;
};
// Prototypes
@@ -831,6 +834,42 @@
}
}
+// acinclude.m4 helpers
+static void sel_remove_hitflags(void)
+{
+ struct dep * dep;
+ struct sel * nsel;
+
+ for (dep = all_deps; dep; dep = dep->next) {
+ dep->hitflag = 0;
+ for (nsel = dep->sel; nsel; nsel = nsel->next)
+ nsel->hitflag = 0;
+ }
+}
+
+static void sel_print_acinclude(struct sel *sel)
+{
+ struct dep * dep;
+ struct sel * nsel;
+
+ dep = sel->dep;
+ if (dep == NULL)
+ return;
+ if (dep->hitflag)
+ return;
+ dep->hitflag = 1;
+ for (nsel = dep->sel; nsel; nsel = nsel->next) {
+ if (nsel->hitflag)
+ continue;
+ nsel->hitflag = 1;
+ sel_print_acinclude(nsel);
+ printf("\t\tCONFIG_%s=\"%c\"\n", nsel->name,
+ (nsel->dep && nsel->dep->is_bool) ? 'y' : 'm');
+ printf("\t\tAC_DEFINE(CONFIG_%s%s)\n", nsel->name,
+ (nsel->dep && nsel->dep->is_bool) ? "" : "_MODULE");
+ }
+}
+
// Output in acinlude.m4
static void output_acinclude(void)
{
@@ -930,6 +969,22 @@
if (text) {
printf("\t%s)\n", text);
free(text);
+ printf("\t\tCONFIG_SND=\"m\"\n");
+ printf("\t\tAC_DEFINE(CONFIG_SND_MODULE)\n");
+ sel_remove_hitflags();
+ for (sel = tempdep->sel; sel; sel = sel->next)
+ sel_print_acinclude(sel);
+#if 0
+ for (cond = tempdep->cond; cond; cond = cond->next) {
+ if (is_always_true(cond->dep) &&
+ strcmp(cond->name, "SND"))
+ continue;
+ printf("\t\tCONFIG_%s=\"%c\"\n", cond->name,
+ (cond->dep && cond->dep->is_bool) ? 'y' : 'm');
+ printf("\t\tAC_DEFINE(CONFIG_%s%s)\n", cond->name,
+ (cond->dep && cond->dep->is_bool) ? "" :
"_MODULE");
+ }
+#endif
for (sel = tempdep->sel; sel; sel = sel->next) {
if (is_always_true(sel->dep))
continue;
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog