aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/input.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-14 20:17:42 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-14 20:17:42 -0600
commit5a72fb28fb69a476437141a4eb898d6d001dd281 (patch)
treefcec27e259b34ac9d37fae737e27fd4c0601eae2 /src/makefile/input.rs
parent53124e9b8c1feade1b88144d286ae2fcc4692c7e (diff)
downloadmakers-5a72fb28fb69a476437141a4eb898d6d001dd281.tar.gz
makers-5a72fb28fb69a476437141a4eb898d6d001dd281.zip
implement potentially-mixed-quoted conditional args
Diffstat (limited to 'src/makefile/input.rs')
-rw-r--r--src/makefile/input.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs
index 5a1259f..4a0f086 100644
--- a/src/makefile/input.rs
+++ b/src/makefile/input.rs
@@ -569,13 +569,13 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> {
fn read_rule(&mut self, line_tokens: TokenString, line_number: usize) -> Result<()> {
let (targets, not_targets) = line_tokens
- .split_once(':')
+ .split_once(":")
.ok_or_else(|| eyre!("read_rule couldn't find a ':' on line {}", line_number))?;
#[cfg(feature = "full")]
let (static_targets, targets, not_targets) = if not_targets.contains_text(":") {
// ugh, this is probably a Static Pattern Rule
let (pattern, not_targets) = not_targets
- .split_once(':')
+ .split_once(":")
.ok_or_else(|| eyre!("bro hold the fuck up it literally just had that"))?;
(Some(targets), pattern, not_targets)
} else {
@@ -583,7 +583,7 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> {
};
let targets = self.expand_macros(&targets)?;
let targets = targets.split_whitespace().collect::<Vec<_>>();
- let (prerequisites, mut commands) = match not_targets.split_once(';') {
+ let (prerequisites, mut commands) = match not_targets.split_once(";") {
Some((prerequisites, command)) => {
// TODO make sure escaped newlines get retroactively treated correctly here
(prerequisites, vec![command])
@@ -801,8 +801,8 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> {
(line_tokens, value)
} else {
line_tokens
- .split_once('=')
- .ok_or_else(|| eyre!("read_rule couldn't find a ':' on line {}", line_number))?
+ .split_once("=")
+ .ok_or_else(|| eyre!("read_macro couldn't find a '=' on line {}", line_number))?
};
let name = self.expand_macros(&name)?;
// GNUisms are annoying, but popular