2003-03-28 Roland McGrath <roland@redhat.com>
+ * scripts/abilist.awk: If given -v filename_regexp and/or -v
+ libname_regexp when parsing names, then produce output only
+ for those matching the given regexps. In combine mode, save all
+ stanzas for a final sorting by stanza header at the end.
+ Emit a blank line between stanzas.
+
* scripts/abilist.awk: When given -v combine=1, do parse_names and
emit a single output stream with lib name in stanza header lines.
# Per-file header.
/[^ :]+\.so\.[0-9]+:[ ]+.file format .*$/ {
- if (parse_names && soname != "")
- emit(1);
+ emit(0);
sofullname = $1;
sub(/:$/, "", sofullname);
sub(/^.*\//, "", soname);
sub(/\.so\.[0-9]+$/, "", soname);
+ suppress = ((filename_regexp != "" && sofullname !~ filename_regexp) \
+ || (libname_regexp != "" && soname !~ libname_regexp));
+
next
}
+suppress { next }
+
# Normalize columns.
/^[0-9a-fA-F]+ / { sub(/ /, " - ") }
if (desc == "")
desc = " " symbol " " type size;
+ if (combine)
+ version = soname " " version (combine_fullname ? " " sofullname : "");
+
if (version in versions) {
versions[version] = versions[version] "\n" desc;
}
print "Don't grok this line:", $0
}
-function emit(tofile) {
+function emit(end) {
+ if (! parse_names || soname == "")
+ return;
+ if (combine && !end)
+ return;
+ tofile = !combine;
+
nverslist = 0;
for (version in versions) {
if (nverslist == 0) {
++nverslist;
}
- if (combine)
- tofile = 0;
-
if (tofile) {
out = prefix soname ".symlist";
if (soname in outfiles)
outpipe = "sort >> " out;
}
else {
- if (combine_fullname)
- print prefix soname, version, sofullname;
- else if (combine)
- print prefix soname, version;
- else
- print version;
+ if (combine)
+ print "";
+ print prefix version;
outpipe = "sort";
}
print versions[version] | outpipe;
}
END {
- if (! parse_names)
- emit(0);
- else if (soname != "") {
- emit(1);
- }
+ emit(1);
}