diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-14 11:59:29 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-14 11:59:29 -0600 |
commit | 4f29c565d6cf713aa25296e3d84e6788734692de (patch) | |
tree | 9d2a5f74acc5735683f999846980daab22202862 /src/args.rs | |
parent | 41e2af5ad66352fef6fffa4cffa6347bf56bef03 (diff) | |
download | makers-4f29c565d6cf713aa25296e3d84e6788734692de.tar.gz makers-4f29c565d6cf713aa25296e3d84e6788734692de.zip |
add command-line arguments to MAKEFLAGS so they get inherited by recursive calls
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs index 6def229..9318202 100644 --- a/src/args.rs +++ b/src/args.rs @@ -190,6 +190,41 @@ impl Args { .map(AsRef::as_ref) .filter(|x: &&str| x.contains('=')) } + + pub fn makeflags(&self) -> String { + let mut result = String::new(); + if self.environment_overrides { + result.push('e'); + } + if self.ignore_errors { + result.push('i'); + } + if self.keep_going { + result.push('k'); + } + if self.dry_run { + result.push('n'); + } + if self.print_everything { + result.push('p'); + } + if self.question { + result.push('q'); + } + if self.no_builtin_rules { + result.push('r'); + } + if self.no_keep_going { + result.push('S'); + } + if self.silent { + result.push('s'); + } + if self.touch { + result.push('t'); + } + result + } } #[cfg(test)] |