You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Igloo/src/igloo_manifest.rs

52 lines
890 B
Rust

/// Igloo Manifest -- Responsible for all lookups in manifest files
pub mod IglooManifest
{
use crate::igloo::{Igloo, IglooErrType, IglooEnvInfo};
pub fn target_exists(inst: &Igloo, name: &str) -> bool
{
let mut ret: bool = false;
loop
{
if name.is_empty()
{
ret = false;
break;
}
let make_table = inst.target_manifest.get_table("target.make").unwrap();
let manifest_table = inst.target_manifest.get_table("target.manifest").unwrap();
match make_table.get(name)
{
Some(v) =>
{
println!("target.make entry for \"{}\" exists!", name);
ret = true;
}
None =>
{
ret = false;
}
}
if !ret
{
break;
}
match manifest_table.get(name)
{
Some(v) =>
{
println!("target.manifest entry for \"{}\" exists!", name);
}
None =>
{
ret = false;
}
}
break; }
ret
}
}