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)) prefix = "{0}-{1}-".format(type, pattern_to_filename_component(pattern))
(fd, cfg) = tempfile.mkstemp(suffix=".cfg", prefix=prefix, dir=work_dir) (fd, cfg) = tempfile.mkstemp(suffix=".cfg", prefix=prefix, dir=work_dir)
generated_file = "{0}.rst".format(cfg) 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 = os.fdopen(fd, "w")
f.write(config) f.write(config)
f.close() f.close()

View file

@ -457,7 +457,7 @@ Config::Config(const string& arg_file, const string& delim)
reporter->FatalError("unkown Broxygen target type: %s", reporter->FatalError("unkown Broxygen target type: %s",
tokens[0].c_str()); 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() ) if ( f.bad() )

View file

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

View file

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

View file

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

View file

@ -2,7 +2,7 @@
# @TEST-EXEC: btest-diff autogen-reST-func-params.rst # @TEST-EXEC: btest-diff autogen-reST-func-params.rst
@TEST-START-FILE broxygen.config @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 @TEST-END-FILE
## This is a global function declaration. ## This is a global function declaration.

View file

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

View file

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