aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/command_line.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-20 19:30:49 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-20 19:30:49 -0600
commite0db38988af0f606a6aea1999d89b3abf62dae24 (patch)
tree3249c02a6247877227f70679ae29ad195dfc961d /src/makefile/command_line.rs
parentb233781efde7ac6f0e1a88bbf6003ac1103045b1 (diff)
downloadmakers-e0db38988af0f606a6aea1999d89b3abf62dae24.tar.gz
makers-e0db38988af0f606a6aea1999d89b3abf62dae24.zip
skip more things on posix that aren't needed thereHEADcanon
Diffstat (limited to 'src/makefile/command_line.rs')
-rw-r--r--src/makefile/command_line.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/makefile/command_line.rs b/src/makefile/command_line.rs
index 7d4915d..6a45c18 100644
--- a/src/makefile/command_line.rs
+++ b/src/makefile/command_line.rs
@@ -3,9 +3,12 @@ use std::fmt;
use std::process::{Command, ExitStatus};
use eyre::{bail, Error};
+#[cfg(feature = "full")]
use lazy_static::lazy_static;
+#[cfg(feature = "full")]
use regex::Regex;
+#[cfg(feature = "full")]
use super::r#macro::Set as MacroSet;
use super::target::Target;
use super::token::{Token, TokenString};
@@ -15,7 +18,7 @@ use super::Makefile;
fn execute_command_line(
command_line: &str,
ignore_errors: bool,
- macros: &MacroSet,
+ #[cfg(feature = "full")] macros: &MacroSet,
) -> Result<ExitStatus, Error> {
let (program, args) = if cfg!(windows) {
let cmd = env::var("COMSPEC").unwrap_or_else(|_| "cmd.exe".into());
@@ -147,7 +150,12 @@ impl CommandLine {
return Ok(());
}
- let return_value = execute_command_line(&execution_line, ignore_error, &file.macros);
+ let return_value = execute_command_line(
+ &execution_line,
+ ignore_error,
+ #[cfg(feature = "full")]
+ &file.macros,
+ );
let errored = return_value.map_or(true, |status| !status.success());
if errored {
// apparently there was an error. do we care?