# Written by Jerry James # December 13, 2002 # Find undefined function messages in the smoketest log and try to match them # against the macro list. # # Read macro.list into an array and save RS and FS BEGIN { OrigRS = RS OrigFS = FS while ((getline < "macro.list") > 0) macro[$1] = $2 close("macro.list") } # Track the current package/file name from the log /Compiling .*\.\.\./ { fields = split($0, path, "[\/.]") - 1 if (path[fields - 4] == "lisp") fil = path[fields - 5] "/" path[fields - 4] "/" path[fields - 3] ".el" else fil = path[fields - 4] "/" path[fields - 3] ".el" } # Find single undefined functions /is not known to be defined/ { if ($4 in macro) printf("%s: def in %s, bad use in %s\n", $4, macro[$4], fil) } # Find multiple undefined functions /are not known to be defined/ { RS = "Wrote" FS = ",?[ \t\n\f]+" getline for (i = 1; i <= NF; i++) if ($i !~ "^[ \t\n\f]*$" && $i in macro) printf("%s: def in %s, bad use in %s\n", $i, macro[$i], fil) RS = OrigRS FS = OrigFS }