forked from Imagelibrary/seL4
Build: Allow optional output in config_gen.py
Previously, config_gen.py required the generated header and json to be either written to a file or sent to stdout. This meant that there was no way to avoid writing to a file, as the header and json data would be merged into the same stdout stream. This change makes it so that the header or json generation can be suppressed entirely by omitting the corresponding --write-c or --write-json options. Signed-off-by: James Martin <fennelfoxxo@gmail.com>
This commit is contained in:
committed by
Gerwin Klein
parent
1acde069a5
commit
162a38e865
@@ -25,16 +25,20 @@ def main():
|
||||
"--write-c",
|
||||
metavar="OUT_FILE",
|
||||
dest="out_file_c",
|
||||
nargs="?",
|
||||
type=argparse.FileType("w"),
|
||||
default=sys.stdout,
|
||||
const=sys.stdout,
|
||||
default=None,
|
||||
help="Output C header file.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--write-json",
|
||||
metavar="OUT_FILE",
|
||||
dest="out_file_json",
|
||||
nargs="?",
|
||||
type=argparse.FileType("w"),
|
||||
default=sys.stdout,
|
||||
const=sys.stdout,
|
||||
default=None,
|
||||
help="Output JSON file.",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
Reference in New Issue
Block a user