# <http://www.gnu.org/licenses/>.
# This Awk script reads in the option records generated from
-# opt-gather.awk, combines the flags of duplicat options and generates a
+# opt-gather.awk, combines the flags of duplicate options and generates a
# C file.
#
# This program uses functions from opt-functions.awk
# Dump that array of options into a C file.
END {
-print "/* This file is auto-generated by opts.sh. */"
+print "/* This file is auto-generated by optc-gen.awk. */"
print ""
n_headers = split(header_name, headers, " ")
for (i = 1; i <= n_headers; i++)
len = length (opts[i]);
enum = "OPT_" opts[i]
- if (opts[i] == "finline-limit=")
+ if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=")
enum = enum "eq"
gsub ("[^A-Za-z0-9]", "_", enum)
idx = -1;
}
}
- printf(" { %c-%s%c,\n %s,\n %s, %u, %d,\n",
- quote, opts[i], quote, hlp, back_chain[i], len, idx)
+ # Split the printf after %u to work around an ia64-hp-hpux11.23
+ # awk bug.
+ printf(" { %c-%s%c,\n %s,\n %s, %u,",
+ quote, opts[i], quote, hlp, back_chain[i], len)
+ printf(" %d,\n", idx)
condition = opt_args("Condition", flags[i])
cl_flags = switch_flags(flags[i])
if (condition != "")