hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 25a872c58fcf7cdc6fdeab4537b4bef1c122e4d6
parent a6329cddad082e21ee237ed669aec32e43c91407
Author: Ember Sawady <ecs@d2evs.net>
Date:   Sat,  9 Sep 2023 16:30:12 +0000

make use of -M flag

Fixes: https://todo.sr.ht/~sircmpwn/hare/877
Signed-off-by: Ember Sawady <ecs@d2evs.net>

Diffstat:
Mcmd/hare/build/util.ha | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha @@ -117,6 +117,12 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = { append(flags, strings::dup("-N")); append(flags, unparse::identstr(mod.ns)); }; + append(flags, strings::dup("-M")); + path::set(&buf, mod.path)?; + for (let i = 0z; i < len(mod.ns); i += 1) { + path::pop(&buf); + }; + append(flags, strings::concat(path::string(&buf), "/")); path::set(&buf, mod.path)?; let test = ctx.test && t.idx == ctx.top;