fixed double-regen bug + removed unnecessary for
This commit is contained in:
parent
1f0a940d95
commit
abec4c2ba0
1 changed files with 6 additions and 7 deletions
11
src/main.rs
11
src/main.rs
|
@ -130,12 +130,11 @@ fn main() {
|
||||||
|
|
||||||
// get config
|
// get config
|
||||||
let mut config = Config::get_default();
|
let mut config = Config::get_default();
|
||||||
for k in parsed_config.keys() {
|
if let Some(v) = parsed_config.get("config") {
|
||||||
if let Value::Table(t) = parsed_config.get(k).unwrap() {
|
if let Value::Table(t) = v {
|
||||||
if k == "config" {
|
|
||||||
config.set(&t);
|
config.set(&t);
|
||||||
break;
|
} else {
|
||||||
}
|
panic!("error parsing config table: config invalid type, must be a table.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//----
|
//----
|
||||||
|
@ -212,7 +211,7 @@ rule regen_compile_commands
|
||||||
|
|
||||||
build $builddir: mkdir
|
build $builddir: mkdir
|
||||||
|
|
||||||
build $builddir/compile_commands.json: regen_compile_commands {config_file_name} | $builddir
|
build $builddir/compile_commands.json: regen_compile_commands {config_file_name} || $builddir
|
||||||
pool = console
|
pool = console
|
||||||
|
|
||||||
build {output_file}: regen_ninjafile {config_file_name} || $builddir/compile_commands.json
|
build {output_file}: regen_ninjafile {config_file_name} || $builddir/compile_commands.json
|
||||||
|
|
Loading…
Reference in a new issue