Lines Matching +full:gen +full:- +full:2
2 --
3 -- SPDX-License-Identifier: BSD-2-Clause
4 --
5 -- Copyright (c) 2024 Tyler Baxter <agge@FreeBSD.org>
6 -- Copyright (c) 2023 Warner Losh <imp@bsdimp.com>
7 -- Copyright (c) 2019 Kyle Evans <kevans@FreeBSD.org>
8 --
10 -- Setup to be a module, or ran as its own script.
12 local script = not pcall(debug.getlocal, 4, 1) -- TRUE if script.
14 -- Add library root to the package path.
19 local FreeBSDSyscall = require("core.freebsd-syscall")
22 -- File has not been decided yet; config will decide file. Default defined as
23 -- /dev/null.
26 -- Libc has all the STD, NOSTD and SYSMUX system calls in it, as well as
27 -- replaced system calls dating back to FreeBSD 7. We are lucky that the
28 -- system call filename is just the base symbol name for it.
30 -- Grab the master system calls table.
32 -- Bookkeeping for keeping track of when we're at the last system
33 -- call (no backslash).
37 -- Bind the generator to the parameter file.
38 local gen = generator:new({}, fh)
40 -- Write the generated preamble.
41 gen:preamble("FreeBSD system call object files.", "#")
43 gen:write("MIASM = \\\n") -- preamble
50 -- At last system call, no backslash.
53 gen:write(string.format("\t%s.o%s\n", v:symbol(), bs))
58 -- Entry of script:
62 if #arg < 1 or #arg > 2 then
66 local sysfile, configfile = arg[1], arg[2]
71 -- The parsed syscall table.
74 syscall_mk.file = config.sysmk -- change file here
78 -- Return the module.