use makemake::prelude::*; fn main() { let mut makefile = Makefile::new(); makefile.comment("Generated by makemake!"); makefile.newline(); let os = makefile.assign("OS", Function::shell("uname")); let sed = makefile.var("SED"); makefile .branch_tree() .when_eq(os, "Darwin", |e| { e.assign(sed, "sed -i ''"); }) .otherwise(|e| { e.assign(sed, "sed -i"); }); print!("{}", makefile.build()); }