]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
opt-functions.awk (opt_args): Allow argument to be enclosed in curly braces.
authorDave Korn <dave.korn.cygwin@gmail.com>
Thu, 30 Jul 2009 07:22:28 +0000 (07:22 +0000)
committerDave Korn <davek@gcc.gnu.org>
Thu, 30 Jul 2009 07:22:28 +0000 (07:22 +0000)
* 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

gcc/ChangeLog
gcc/doc/options.texi
gcc/opt-functions.awk

index 0b69427eb63c97559dbb252aff4e004953b66a1a..d945d5034dbfed0daea5d98dcca5c1fe77d0557a 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * config/alpha/alpha.c (alpha_start_function):
index 53ad66bb7f672cadc0e65de4e4b155365ab44634..2041de9735375d589ee071545246730110d041a3 100644 (file)
@@ -84,7 +84,16 @@ configurations and yet the masks always need to be defined.
 @node 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
 @item Common
index ae1e1cb38c6e16f01a751d401611f6090225b749..98414dae9a95bb0b19e537ec86b38ebd0cd31e62 100644 (file)
@@ -41,7 +41,13 @@ function opt_args(name, flags)
        if (flags !~ " " name "\\(")
                return ""
        sub(".* " name "\\(", "", flags)
-       sub("\\).*", "", flags)
+       if (flags ~ "^{")
+       {
+               sub ("^{", "", flags)
+               sub("}\\).*", "", flags)
+       }
+       else
+               sub("\\).*", "", flags)
 
        return flags
 }