Change Broxygen config file format.

"<type> <pattern> <output-file>" seems a more natural order for
specifying targets.
This commit is contained in:
Jon Siwek 2013-11-22 14:37:07 -06:00
parent 98dcfc64a8
commit e3f74dc319
9 changed files with 9 additions and 9 deletions

View file

@ -1 +1 @@
script @BROXYGEN_SCRIPT_OUTPUT@/ *
script * @BROXYGEN_SCRIPT_OUTPUT@/

View file

@ -76,7 +76,7 @@ def generate_config(env, type, pattern):
prefix = "{0}-{1}-".format(type, pattern_to_filename_component(pattern))
(fd, cfg) = tempfile.mkstemp(suffix=".cfg", prefix=prefix, dir=work_dir)
generated_file = "{0}.rst".format(cfg)
config = "{0}\t{1}\t{2}".format(type, generated_file, pattern)
config = "{0}\t{1}\t{2}".format(type, pattern, generated_file)
f = os.fdopen(fd, "w")
f.write(config)
f.close()

View file

@ -457,7 +457,7 @@ Config::Config(const string& arg_file, const string& delim)
reporter->FatalError("unkown Broxygen target type: %s",
tokens[0].c_str());
targets.push_back(it->second(tokens[1], tokens[2]));
targets.push_back(it->second(tokens[2], tokens[1]));
}
if ( f.bad() )

View file

@ -6,5 +6,5 @@
# @TEST-EXEC: btest-diff .stderr
@TEST-START-FILE broxygen.config
script scripts/ *
script * scripts/
@TEST-END-FILE

View file

@ -2,7 +2,7 @@
# @TEST-EXEC: btest-diff autogen-reST-enums.rst
@TEST-START-FILE broxygen.config
identifier autogen-reST-enums.rst TestEnum*
identifier TestEnum* autogen-reST-enums.rst
@TEST-END-FILE
## There's tons of ways an enum can look...

View file

@ -2,7 +2,7 @@
# @TEST-EXEC: btest-diff example.rst
@TEST-START-FILE broxygen.config
script example.rst broxygen/example.bro
script broxygen/example.bro example.rst
@TEST-END-FILE
@load broxygen/example.bro

View file

@ -2,7 +2,7 @@
# @TEST-EXEC: btest-diff autogen-reST-func-params.rst
@TEST-START-FILE broxygen.config
identifier autogen-reST-func-params.rst test_func_params*
identifier test_func_params* autogen-reST-func-params.rst
@TEST-END-FILE
## This is a global function declaration.

View file

@ -2,7 +2,7 @@
# @TEST-EXEC: btest-diff autogen-reST-records.rst
@TEST-START-FILE broxygen.config
identifier autogen-reST-records.rst TestRecord*
identifier TestRecord* autogen-reST-records.rst
@TEST-END-FILE
# undocumented record

View file

@ -2,7 +2,7 @@
# @TEST-EXEC: btest-diff autogen-reST-type-aliases.rst
@TEST-START-FILE broxygen.config
identifier autogen-reST-type-aliases.rst BroxygenTest::*
identifier BroxygenTest::* autogen-reST-type-aliases.rst
@TEST-END-FILE
module BroxygenTest;