main shinobi / doc / shin.1
 1.Dd $Mdocdate: May 14 2026 $
 2.Dt SHINOBI 1
 3.Os
 4.Sh NAME
 5.Nm shin
 6.Nd public domain makefile compiler
 7.Sh SYNOPSIS
 8.Nm shin
 9.Op Fl age
10.Op Fl G Ar ninja | dot | compcmd
11.Op Fl M Ar posix2024 | posix2008 | gnu
12.Op Fl C Ar dir
13.Op Fl f Ar file
14.Op Ar VAR=value ...
15.Op Ar target ...
16.Sh DESCRIPTION
17The
18.Nm
19utility takes a makefile as input, and outputs an alternative representation
20of said makefile's build graph to a file.
21The default backend is for the ninja build system.
22.Pp
23The options are as follows:
24.Bl -tag -width Ds
25.It Fl a
26Print the abstract syntax tree to stdout and exit.
27.It Fl g
28Print the build graph to stdout and exit.
29.It Fl G Ar generator
30Specify the output generator.
31Valid generators are
32.Ar ninja
33(default, outputs to build.ninja),
34.Ar dot
35(outputs to build.dot for graphviz), and
36.Ar compdb
37(outputs to compile_commands.json).
38.It Fl M Ar mode
39Select the accepted dialect for the input makefile.
40Valid modes are
41.Ar gnu
42(default),
43.Ar posix2024 ,
44and
45.Ar posix2008 .
46.It Fl C Ar dir
47Change to
48.Ar dir
49before reading the makefile.
50.It Fl f Ar file
51Read the makefile from
52.Ar file
53instead of the default
54.Ar Makefile, GNUmakefile
55or
56.Ar makefile .
57.It Fl e
58Override environment variables when expanding makefile variables.
59.El
60.Pp
61Variable assignments of the form
62.Ar VAR=value
63can be specified on the command line and will override makefile definitions.
64One or more
65.Ar target
66arguments specifies the goals to build; if none are specified, the default
67goal from the makefile is used. even when a goal is specified, the entire build graph
68is still processed, not just the target goal. if using the ninja generator, the target goal 
69will not be the default target in the generated file, and will have it's original name.
70.Sh SEE ALSO
71.Xr make 1 ,
72.Xr samu 1
73.Sh STANDARDS
74The makefile format parsed by
75.Nm
76aims to follow the most up to date POSIX make specification (IEEE Std 1003.1-2024) 
77with extensions and changes from GNU make. when in posix2008 mode, it aims to strictly
78comply with IEEE Std 1003.1-2008, without any extensions. when in posix2024 mode, it 
79aims to strictly comply with IEEE Std 1003.1-2024, without any extensions.