3 # This file is part of XEmacs.
5 # XEmacs is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2, or (at your option) any
10 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # You should have received a copy of the GNU General Public License
16 # along with XEmacs; see the file COPYING. If not, write to
17 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 # Boston, MA 02110-1301, USA.
20 # Written by Jerry James
23 # Updated January 14, 2004 to also report the type of definition miscompiled
24 # (defmacro, defsubst, etc.).
26 # Updated May 22, 2007 to take macro names to be suppressed from the file
29 # Find undefined function messages in the smoketest log and try to match them
30 # against the macro list. Invoke this script in a directory containing
31 # macro.list, the output of gen-macro-list.awk.
32 # Usage: awk -f find-macro-err.awk < $package_build_log
34 # Read macro.list into an array and save RS and FS
38 while ((getline < "macro.list") > 0) {
43 while ((getline < "macro.suppress") > 0) {
47 close("macro.suppress")
49 # Track the current package/file name from the log
50 /Compiling .*\.\.\./ {
51 # Get rid of the trailing dots
52 split($2, path, "[ .]") - 1
53 fil = substr(path[1], match(path[1], "(xemacs|mule)-packages")) ".el"
55 # Find single undefined functions
56 /is not known to be defined/ {
58 printf("%s (%s)\n Definition: %s\n Miscompile: %s\n",
59 $4, macrotype[$4], macro[$4], fil)
61 # Find multiple undefined functions
62 /are not known to be defined/ {
66 for (i = 1; i <= NF; i++)
67 if ($i !~ "^[ \t\n\f]*$" && $i in macro)
68 printf("%s (%s)\n Definition: %s\n Miscompile: %s\n",
69 $i, macrotype[$i], macro[$i], fil)