commit c74e668

shrub  ·  2026-05-18 17:55:52 +0000 UTC
parent b508dcb
update manpage; fix function error message when not in gnu mode
2 files changed,  +20, -4
+16, -3
 1@@ -8,6 +8,7 @@
 2 .Nm shin
 3 .Op Fl age
 4 .Op Fl G Ar ninja | dot | compcmd
 5+.Op Fl M Ar posix2024 | posix2008 | gnu
 6 .Op Fl C Ar dir
 7 .Op Fl f Ar file
 8 .Op Ar VAR=value ...
 9@@ -34,6 +35,14 @@ Valid generators are
10 (outputs to build.dot for graphviz), and
11 .Ar compdb
12 (outputs to compile_commands.json).
13+.It Fl M Ar mode
14+Select the accepted dialect for the input makefile.
15+Valid modes are
16+.Ar gnu
17+(default),
18+.Ar posix2024 ,
19+and
20+.Ar posix2008 .
21 .It Fl C Ar dir
22 Change to
23 .Ar dir
24@@ -55,12 +64,16 @@ can be specified on the command line and will override makefile definitions.
25 One or more
26 .Ar target
27 arguments specifies the goals to build; if none are specified, the default
28-goal from the makefile is used.
29+goal from the makefile is used. even when a goal is specified, the entire build graph
30+is still processed, not just the target goal. if using the ninja generator, the target goal 
31+will not be the default target in the generated file, and will have it's original name.
32 .Sh SEE ALSO
33 .Xr make 1 ,
34 .Xr samu 1
35 .Sh STANDARDS
36 The makefile format parsed by
37 .Nm
38-aims to follow the POSIX make specification (IEEE Std 1003.1-2024) with
39-extensions from GNU make. other extensions may be implemented in the future.
40+aims to follow the most up to date POSIX make specification (IEEE Std 1003.1-2024) 
41+with extensions and changes from GNU make. when in posix2008 mode, it aims to strictly
42+comply with IEEE Std 1003.1-2008, without any extensions. when in posix2024 mode, it 
43+aims to strictly comply with IEEE Std 1003.1-2024, without any extensions.
+4, -1
 1@@ -658,7 +658,10 @@ expandref(struct EvalCtx *ctx, const char *s, size_t n)
 2 		char *detail;
 3 
 4 		detail = xstrndup(s, n);
 5-		evalerr(ctx, "i don't know how to handle that yet", detail);
 6+		if (ctx->mode != MODE_GNU)
 7+			evalerr(ctx, "functions are only valid in GNU", detail);
 8+		else
 9+			evalerr(ctx, "i don't know how to handle that yet", detail);
10 		free(detail);
11 		return xstrdup("");
12 	}