Tag sdksyms.c entries with source file and line number

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Aaron Plattner 2010-08-23 11:37:46 -07:00 committed by Keith Packard
parent 9ef6241c23
commit 6edbdb7f9e

View File

@ -345,11 +345,14 @@ BEGIN {
if (sdk && $3 ~ /\.h"$/) { if (sdk && $3 ~ /\.h"$/) {
# remove quotes # remove quotes
gsub(/"/, "", $3); gsub(/"/, "", $3);
line = $2;
header = $3;
if (! headers[$3]) { if (! headers[$3]) {
printf(" \\\n %s", $3) >> "sdksyms.dep"; printf(" \\\n %s", $3) >> "sdksyms.dep";
headers[$3] = 1; headers[$3] = 1;
} }
} }
next;
} }
/^extern[ ]/ { /^extern[ ]/ {
@ -398,10 +401,14 @@ BEGIN {
sub(/[^a-zA-Z0-9_].*/, "", symbol); sub(/[^a-zA-Z0-9_].*/, "", symbol);
#print; #print;
printf(" (void *) &%s,\n", symbol); printf(" (void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
} }
} }
{
line++;
}
END { END {
print("};"); print("};");