]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/gmqcc.1
Added -config to usage and manpage, added a CONFIG section in the manpage describing...
[xonotic/gmqcc.git] / doc / gmqcc.1
index 4e5d516fec7c4a37ad24affd59ca6f1e1e61d8e9..451e8ddad00e4d3ee91f5ad01e772e2741318318 100644 (file)
@@ -69,6 +69,10 @@ List all possible compile flags.
 .B -nocolor
 Disables colored output
 .TP
+.BI "-config " file
+Use an ini file to read all the -O, -W and -f flag from. See the
+CONFIG section about the file format.
+.TP
 .BI "-redirout=" file
 Redirects standard output to a \fIfile\fR
 .TP
@@ -283,3 +287,34 @@ soption.
 Normally vectors generate 4 defs, once for the vector, and once for
 its components with _x, _y, _z suffixes. This option
 prevents components from being listed.
+.SH CONFIG
+The configuration file is similar to regular .ini files. Comments
+start with hashtags or semicolons, sections are written in square
+brackets and in each section there can be arbitrary many key-value
+pairs.
+.sp
+There are 3 sections currently:
+.IR flags ", " warnings ", and " optimizations .
+They contain a list of boolean values of the form `VARNAME = true` or
+`VARNAME = false`. The variable names are the same as for the
+corresponding -W, -f or -O flag written with only capital letters and
+dashes replaced by underscores.
+.sp
+Here's an example:
+.in +4
+.nf
+# a GMQCC configuration file
+[flags]
+    FTEPP = true
+    ADJUST_VECTOR_FIELDS = false
+    LNO = true
+
+[warnings]
+    UNUSED_VARIABLE = false
+    USED_UNINITIALIZED = true
+
+[optimizations]
+    PEEPHOLE = true
+    TAIL_RECURSION = true
+.fi
+.in