| @@ -4,11 +4,7 @@ · 3 unmodified lines |
| 4 | 4 | @settitle Tiny C Compiler Reference Documentation |
| 5 | 5 | @c %**end of header |
| 6 | 6 | |
| 7 | | −@include version.texi |
| 8 | | − |
| 9 | | −@ifinfo |
| 10 | | −Bla bla bla |
| 11 | | −@end ifinfo |
| 7 | +@include config.texi |
| 12 | 8 | |
| 13 | 9 | @iftex |
| 14 | 10 | @titlepage |
| @@ -20,11 +16,11 @@ Bla bla bla · 5 unmodified lines |
| 20 | 16 | @headings double |
| 21 | 17 | @end iftex |
| 22 | 18 | |
| 23 | | −@ifnothtml |
| 19 | +@c @ifhtml |
| 24 | 20 | @contents |
| 25 | | −@end ifnothtml |
| 21 | +@c @end ifhtml |
| 26 | 22 | |
| 27 | | −@ifnottex |
| 23 | +@ifnothtml |
| 28 | 24 | @node Top, Introduction, (dir), (dir) |
| 29 | 25 | @top Tiny C Compiler Reference Documentation |
| 30 | 26 | |
| @@ -34,9 +30,9 @@ This manual documents version @value{VERSION} of the Tiny C Compiler. · 3 unmodified lines |
| 34 | 30 | * Introduction:: Introduction to tcc. |
| 35 | 31 | * Invoke:: Invocation of tcc (command line, options). |
| 36 | 32 | * Bounds:: Automatic bounds-checking of C code. |
| 37 | | −* Libtcc:: bla bla bla. |
| 33 | +* Libtcc:: The libtcc library. |
| 38 | 34 | @end menu |
| 39 | | −@end ifnottex |
| 35 | +@end ifnothtml |
| 40 | 36 | |
| 41 | 37 | @node Introduction |
| 42 | 38 | @chapter Introduction |
| @@ -65,12 +61,14 @@ generation (@pxref{Libtcc}). · 22 unmodified lines |
| 65 | 61 | @node Invoke |
| 66 | 62 | @chapter Command line invocation |
| 67 | 63 | |
| 64 | +[This manual documents version @value{VERSION} of the Tiny C Compiler] |
| 65 | + |
| 68 | 66 | @section Quick start |
| 69 | 67 | |
| 70 | 68 | @example |
| 71 | | −usage: tcc [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym] |
| 69 | +usage: tcc [-v] [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym] |
| 72 | 70 | [-g] [-b] [-bt N] [-Ldir] [-llib] [-shared] [-static] |
| 73 | | − [--] infile1 [infile2... --] [infile_args...] |
| 71 | + [infile1 infile2...] [-run infile args...] |
| 74 | 72 | @end example |
| 75 | 73 | |
| 76 | 74 | @noindent |
| @@ -81,14 +79,14 @@ arguments. · 4 unmodified lines |
| 81 | 79 | Here are some examples to understand the logic: |
| 82 | 80 | |
| 83 | 81 | @table @code |
| 84 | | −@item @samp{tcc a.c} |
| 82 | +@item @samp{tcc -run a.c} |
| 85 | 83 | Compile @file{a.c} and execute it directly |
| 86 | 84 | |
| 87 | | −@item @samp{tcc a.c arg1} |
| 85 | +@item @samp{tcc -run a.c arg1} |
| 88 | 86 | Compile a.c and execute it directly. arg1 is given as first argument to |
| 89 | 87 | the @code{main()} of a.c. |
| 90 | 88 | |
| 91 | | −@item @samp{tcc -- a.c b.c -- arg1} |
| 89 | +@item @samp{tcc a.c -run b.c arg1} |
| 92 | 90 | Compile @file{a.c} and @file{b.c}, link them together and execute them. arg1 is given |
| 93 | 91 | as first argument to the @code{main()} of the resulting program. Because |
| 94 | 92 | multiple C files are specified, @option{--} are necessary to clearly separate the |
| @@ -119,7 +117,7 @@ Compile @file{a.c} and @file{b.c}, link them together and generate the object fi · 24 unmodified lines |
| 119 | 117 | Scripting: |
| 120 | 118 | |
| 121 | 119 | TCC can be invoked from @emph{scripts}, just as shell scripts. You just |
| 122 | | −need to add @code{#!/usr/local/bin/tcc} at the start of your C source: |
| 120 | +need to add @code{#!/usr/local/bin/tcc -run} at the start of your C source: |
| 123 | 121 | |
| 124 | 122 | @example |
| 125 | 123 | #!/usr/local/bin/tcc |
| @@ -137,6 +135,9 @@ int main() · 11 unmodified lines |
| 137 | 135 | General Options: |
| 138 | 136 | |
| 139 | 137 | @table @option |
| 138 | +@item -v |
| 139 | +Display current TCC version. |
| 140 | + |
| 140 | 141 | @item -c |
| 141 | 142 | Generate an object file (@option{-o} option must also be given). |
| 142 | 143 | |
| @@ -149,6 +150,9 @@ Set the path where the tcc internal libraries can be found (default is · 6 unmodified lines |
| 149 | 150 | |
| 150 | 151 | @item -bench |
| 151 | 152 | Output compilation statistics. |
| 153 | + |
| 154 | +@item -run |
| 155 | +Run compiled source. |
| 152 | 156 | @end table |
| 153 | 157 | |
| 154 | 158 | Preprocessor options: |