Add -o option to compiler that allows naming the output binary
Created by: dvkt
Note that it needs an =
, just like the -i
flag.
Example:
$ ldpl ../examples/99bottles.ldpl
LDPL: Compiling...
* File(s) compiled successfully.
* Saved as ldpl-output-bin
$ ldpl -o=99b ../examples/99bottles.ldpl
LDPL: Compiling...
* File(s) compiled successfully.
* Saved as 99b
$ ./99b
99 bottles of beer on the wall,
99 bottles of beer.
Take one down, pass it around,
98 bottles of beer on the wall...
Updated -h:
$ ldpl -h ☰ ~/Code/ldpl/ldpl/src:o-flag
Usage: ldpl [options] file [arguments]
Options:
-h --help Display this information
-r Display generated C++ code
-o=<name> Set output file for compiled binary
-i=<file> Include file in current compilation
-v --version Display LDPL version information