print_datatables: check and ignore obsoleted providers when printing deps table
This commit is contained in:
parent
4f2abc0fbc
commit
5fa39e3b16
@ -1770,7 +1770,7 @@ print_datatables(struct configTag *ct, int arch) {
|
||||
char obsoletebuf[1024];
|
||||
struct headerList *currheaderlist, *currchild;
|
||||
struct headerSourceList * currheadersourcelist;
|
||||
int i,depscnt;
|
||||
int i, depscnt, nonobsoletednumproviders;
|
||||
|
||||
snprintf(builddeps_filename,1024,"%sbuilddeps-%s",ct->html_dir,ct->arch[arch]);
|
||||
snprintf(deps_filename,1024,"%sdeps-%s",ct->html_dir,ct->arch[arch]);
|
||||
@ -1859,44 +1859,55 @@ print_datatables(struct configTag *ct, int arch) {
|
||||
// write deps file
|
||||
struct providedList* provided = ct->providedlist_idx[arch][0];
|
||||
while (provided) {
|
||||
if (provided->numproviders > 1) {
|
||||
nonobsoletednumproviders=0;
|
||||
for (i = 0; i < provided->numproviders; i++) {
|
||||
if (!provided->provider[i]->obsoleted) nonobsoletednumproviders++;
|
||||
}
|
||||
if (nonobsoletednumproviders > 1) {
|
||||
fprintf(fd,"ifndef ");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,"\n");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd," := ");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,"_to_be_defined # ");
|
||||
fprintf(fd,"\n");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd," := ");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,"_to_be_defined # ");
|
||||
|
||||
fprintf_depstable_filtered_var(fs,provided->name);
|
||||
fprintf(fs,":");
|
||||
for (i = 0; i < provided->numproviders; i++) {
|
||||
fprintf(fd,"%s ",provided->provider[i]->name);
|
||||
fprintf(fs," _%s",provided->provider[i]->sourceheader->name);
|
||||
}
|
||||
fprintf(fs,"\n");
|
||||
fprintf_depstable_filtered_var(fs,provided->name);
|
||||
fprintf(fs,":");
|
||||
for (i = 0; i < provided->numproviders; i++) {
|
||||
if (!provided->provider[i]->obsoleted) {
|
||||
fprintf(fd,"%s ",provided->provider[i]->name);
|
||||
fprintf(fs," _%s",provided->provider[i]->sourceheader->name);
|
||||
}
|
||||
}
|
||||
fprintf(fs,"\n");
|
||||
|
||||
fprintf(fd,"\nendif\n");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,": ");
|
||||
fprintf(fd,"$(");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,")\n");
|
||||
fprintf(fd,"\nendif\n");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,": ");
|
||||
fprintf(fd,"$(");
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,")\n");
|
||||
|
||||
fprintf(fv,"%s= # ",provided->name);
|
||||
for (i = 0; i < provided->numproviders; i++) {
|
||||
fprintf(fv,"%s ",provided->provider[i]->name);
|
||||
}
|
||||
fprintf(fv,"\n");
|
||||
} else if (provided->numproviders == 1 && (strcmp(provided->name,provided->provider[0]->name))) {
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,": ");
|
||||
fprintf(fd,"%s\n",provided->provider[0]->name);
|
||||
|
||||
fprintf_depstable_filtered_var(fs,provided->name);
|
||||
fprintf(fs,": _%s\n",provided->provider[0]->sourceheader->name);
|
||||
|
||||
} else if (provided->numproviders == 0) {
|
||||
for (i = 0; i < provided->numproviders; i++) {
|
||||
if (!provided->provider[i]->obsoleted) {
|
||||
fprintf(fv,"%s ",provided->provider[i]->name);
|
||||
}
|
||||
}
|
||||
fprintf(fv,"\n");
|
||||
} else if (nonobsoletednumproviders == 1) {
|
||||
for (i = 0; i < provided->numproviders; i++) {
|
||||
if (!provided->provider[i]->obsoleted) break;
|
||||
}
|
||||
if (strcmp(provided->name,provided->provider[i]->name)) {
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,": ");
|
||||
fprintf(fd,"%s\n",provided->provider[i]->name);
|
||||
fprintf_depstable_filtered_var(fs,provided->name);
|
||||
fprintf(fs,": _%s\n",provided->provider[i]->sourceheader->name);
|
||||
}
|
||||
} else {
|
||||
fprintf_depstable_filtered_var(fd,provided->name);
|
||||
fprintf(fd,": ");
|
||||
fprintf(fd,"__missing_provider_for_");
|
||||
|
Loading…
Reference in New Issue
Block a user