diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-16 12:30:06 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-16 12:30:06 +0000 |
commit | 5c5ccba291e6d6a7763b8b2a773503c7a0659306 (patch) | |
tree | 1a880bfd7d5dee689ffa88c4d78e2661c5086ffd /gcc/optc-gen.awk | |
parent | b047d60e90a81d9f53fce792fdbfd2d6ec126102 (diff) | |
download | gcc-5c5ccba291e6d6a7763b8b2a773503c7a0659306.tar.gz |
* Makefile.in (options.c): Tell optc-gen.awk to include config.h,
system.h, coretypes.h and tm.h.
(options.o): Update dependencies accordingly.
* optc-gen.awk: Allow header_name to be a list of filenames.
Handle the "Condition" flag.
* opts.h (CL_DISABLED): New flag.
* opts.c (handle_option): Print an error for CL_DISABLED options.
* doc/options.texi: Document the "Condition" option flag.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99774 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r-- | gcc/optc-gen.awk | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 5476674a163..e647cd9ad21 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -57,7 +57,9 @@ END { print "/* This file is auto-generated by opts.sh. */" print "" print "#include <intl.h>" -print "#include " quote header_name quote +n_headers = split(header_name, headers, " ") +for (i = 1; i <= n_headers; i++) + print "#include " quote headers[i] quote print "#include " quote "opts.h" quote print "" @@ -135,10 +137,20 @@ for (i = 0; i < n_opts; i++) { else hlp = quote help[i] quote; - printf(" { %c-%s%c,\n %s,\n %s, %u, %s, %s, %s }%s\n", - quote, opts[i], quote, hlp, back_chain[i], len, - switch_flags(flags[i]), - var_ref(flags[i]), var_set(flags[i]), comma) + printf(" { %c-%s%c,\n %s,\n %s, %u,\n", + quote, opts[i], quote, hlp, back_chain[i], len) + condition = opt_args("Condition", flags[i]) + cl_flags = switch_flags(flags[i]) + if (condition != "") + printf("#if %s\n" \ + " %s,\n" \ + "#else\n" \ + " CL_DISABLED,\n" \ + "#endif\n", + condition, cl_flags, cl_flags) + else + printf(" %s,\n", cl_flags) + printf(" %s, %s }%s\n", var_ref(flags[i]), var_set(flags[i]), comma) } print "};" |