Commit 88c2fd3d by Dave Korn Committed by Dave Korn

opt-functions.awk (opt_args): Allow argument to be enclosed in curly braces.

	* opt-functions.awk (opt_args): Allow argument to be enclosed in
	curly braces.
	* doc/options.texi (Option properties):  Mention new quoting syntax.

From-SVN: r150248
parent 5ea8f977
2009-07-30 Dave Korn <dave.korn.cygwin@gmail.com>
* opt-functions.awk (opt_args): Allow argument to be enclosed in
curly braces.
* doc/options.texi (Option properties): Mention new quoting syntax.
2009-07-29 Douglas B Rupp <rupp@gnat.com> 2009-07-29 Douglas B Rupp <rupp@gnat.com>
* config/alpha/alpha.c (alpha_start_function): * config/alpha/alpha.c (alpha_start_function):
......
...@@ -84,7 +84,16 @@ configurations and yet the masks always need to be defined. ...@@ -84,7 +84,16 @@ configurations and yet the masks always need to be defined.
@node Option properties @node Option properties
@section Option properties @section Option properties
The second field of an option record can specify the following properties: The second field of an option record can specify any of the following
properties. When an option takes an argument, it is enlosed in parentheses
following the option property name. The parser that handles option files
is quite simplistic, and will be tricked by any nested parentheses within
the argument text itself; in this case, the entire option argument can
be wrapped in curly braces within the parentheses to demarcate it, e.g.:
@smallexample
Condition(@{defined (USE_CYGWIN_LIBSTDCXX_WRAPPERS)@})
@end smallexample
@table @code @table @code
@item Common @item Common
......
...@@ -41,7 +41,13 @@ function opt_args(name, flags) ...@@ -41,7 +41,13 @@ function opt_args(name, flags)
if (flags !~ " " name "\\(") if (flags !~ " " name "\\(")
return "" return ""
sub(".* " name "\\(", "", flags) sub(".* " name "\\(", "", flags)
sub("\\).*", "", flags) if (flags ~ "^{")
{
sub ("^{", "", flags)
sub("}\\).*", "", flags)
}
else
sub("\\).*", "", flags)
return flags return flags
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment