From 78a1b253af669858baf58c848e0141150ba3e1c4 Mon Sep 17 00:00:00 2001
From: Melody Horn <melody@boringcactus.com>
Date: Mon, 5 Apr 2021 12:54:08 -0600
Subject: set `MAKECMDGOALS`

---
 src/makefile/mod.rs | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'src/makefile')

diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index b887ad4..edc9b6b 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -68,6 +68,16 @@ impl<'a> Makefile<'a> {
             }
         }
 
+        #[cfg(feature = "full")]
+        {
+            let make_cmd_goals = args.targets().collect::<Vec<_>>();
+            macros.set(
+                "MAKECMDGOALS".to_owned(),
+                MacroSource::Builtin,
+                TokenString::text(make_cmd_goals.join(" ")),
+            );
+        }
+
         Makefile {
             inference_rules: vec![],
             builtin_inference_rules: inference_rules,
-- 
cgit v1.2.3