Add manpage
This commit is contained in:
parent
e9ba4411c9
commit
217eb51280
9
.pandoc/bold-code.lua
Normal file
9
.pandoc/bold-code.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-- Convert code to bold
|
||||||
|
function Code(el)
|
||||||
|
return pandoc.Strong(el.text)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Convert code blocks to bold and indented
|
||||||
|
function CodeBlock(el)
|
||||||
|
return pandoc.BlockQuote({pandoc.Para(pandoc.Strong(el.text))})
|
||||||
|
end
|
3
Makefile
3
Makefile
@ -58,12 +58,13 @@ clean:
|
|||||||
%.1: %.1.md
|
%.1: %.1.md
|
||||||
pandoc --lua-filter=.pandoc/bold-code.lua -s $< -t man -o $@
|
pandoc --lua-filter=.pandoc/bold-code.lua -s $< -t man -o $@
|
||||||
|
|
||||||
install: tomo libtomo.so
|
install: tomo libtomo.so tomo.1
|
||||||
mkdir -p -m 755 "$(PREFIX)/man/man1" "$(PREFIX)/bin" "$(PREFIX)/include/tomo" "$(PREFIX)/lib" "$(PREFIX)/share/tomo/modules"
|
mkdir -p -m 755 "$(PREFIX)/man/man1" "$(PREFIX)/bin" "$(PREFIX)/include/tomo" "$(PREFIX)/lib" "$(PREFIX)/share/tomo/modules"
|
||||||
cp -v builtins/*.h "$(PREFIX)/include/tomo/"
|
cp -v builtins/*.h "$(PREFIX)/include/tomo/"
|
||||||
cp -v libtomo.so "$(PREFIX)/lib/"
|
cp -v libtomo.so "$(PREFIX)/lib/"
|
||||||
rm -f "$(PREFIX)/bin/tomo"
|
rm -f "$(PREFIX)/bin/tomo"
|
||||||
cp -v tomo "$(PREFIX)/bin/"
|
cp -v tomo "$(PREFIX)/bin/"
|
||||||
|
cp -v tomo.1 "$(PREFIX)/man/man1/"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rvf "$(PREFIX)/bin/tomo" "$(PREFIX)/include/tomo" "$(PREFIX)/lib/libtomo.so" "$(PREFIX)/share/tomo"; \
|
rm -rvf "$(PREFIX)/bin/tomo" "$(PREFIX)/include/tomo" "$(PREFIX)/lib/libtomo.so" "$(PREFIX)/share/tomo"; \
|
||||||
|
66
tomo.1
Normal file
66
tomo.1
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
.\" Automatically generated by Pandoc 3.1.8
|
||||||
|
.\"
|
||||||
|
.TH "TOMO" "1" "June 11, 2024" "" ""
|
||||||
|
.SH NAME
|
||||||
|
tomo - The programming language of tomorrow.
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.TP
|
||||||
|
Run the REPL:
|
||||||
|
\f[B]tomo\f[R]
|
||||||
|
.TP
|
||||||
|
Run a program:
|
||||||
|
\f[B]tomo\f[R] \f[I]program.tm\f[R] [[\f[B]--\f[R]] \f[I]args\&...\f[R]]
|
||||||
|
.TP
|
||||||
|
Transpile tomo files to C files:
|
||||||
|
\f[B]tomo\f[R] \f[B]-t\f[R] \f[I]file1.tm\f[R] \f[I]file2.tm\f[R]\&...
|
||||||
|
.TP
|
||||||
|
Compile files to static object files:
|
||||||
|
\f[B]tomo\f[R] \f[B]-c\f[R] \f[I]file1.tm\f[R] \f[I]file2.tm\f[R]\&...
|
||||||
|
.TP
|
||||||
|
Compile file to an executable:
|
||||||
|
\f[B]tomo\f[R] \f[B]-e\f[R] \f[I]file1.tm\f[R]
|
||||||
|
.TP
|
||||||
|
Build a shared library:
|
||||||
|
\f[B]tomo\f[R] \f[B]-s=\f[R]\f[I]mylib.1.2.3\f[R] \f[I]file1.tm\f[R]
|
||||||
|
\f[I]file2.tm\f[R]\&...
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Tomo is a programming language that is statically typed, compiled,
|
||||||
|
small, and garbage-collected, with concise syntax and built-in support
|
||||||
|
for high-performance, low-overhead datastructures.
|
||||||
|
It compiles by first outputting C code, which is then compiled using a C
|
||||||
|
compiler of your choice.
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
\f[B]-h\f[R], \f[B]--help\f[R]
|
||||||
|
Print the usage and exit.
|
||||||
|
.TP
|
||||||
|
\f[B]-t\f[R]
|
||||||
|
Transpile the input files to C code without compiling them.
|
||||||
|
.TP
|
||||||
|
\f[B]-c\f[R]
|
||||||
|
Compile the input files to static objects, rather than running them.
|
||||||
|
.TP
|
||||||
|
\f[B]-s=\f[R]\f[I]foo.1.2.3\f[R]
|
||||||
|
Compile the input files to a shared object file,
|
||||||
|
\f[B]libfoo.1.2.3.so\f[R], and shared header file,
|
||||||
|
\f[B]libfoo.1.2.3.h\f[R].
|
||||||
|
Also offer to install the resulting library.
|
||||||
|
.SS ENVIRONMENT VARIABLES
|
||||||
|
Some options can be configured by setting environment variables.
|
||||||
|
.TP
|
||||||
|
\f[B]VERBOSE=0|1|2\f[R]
|
||||||
|
Set the verbosity level.
|
||||||
|
.TP
|
||||||
|
\f[B]CC=\f[R]\f[I]c-compiler\f[R]
|
||||||
|
Set which C compiler is used.
|
||||||
|
.TP
|
||||||
|
\f[B]O=\f[R]\f[I]optimization-level\f[R]
|
||||||
|
Set which optimization level is passed to the C compiler.
|
||||||
|
Valid values are those accepted by your compiler\[cq]s \f[B]-O\f[R]
|
||||||
|
flag.
|
||||||
|
.TP
|
||||||
|
\f[B]AUTOFMT=\f[R]\f[I]autoformatter\f[R]
|
||||||
|
The program used to autoformat generated C code.
|
||||||
|
Default: \f[B]indent -kr -l100 -nbbo -nut -sob\f[R]
|
||||||
|
.SH AUTHORS
|
||||||
|
Bruce Hill (\f[I]bruce\[at]bruce-hill.com\f[R]).
|
66
tomo.1.md
Normal file
66
tomo.1.md
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
% TOMO(1)
|
||||||
|
% Bruce Hill (*bruce@bruce-hill.com*)
|
||||||
|
% June 11, 2024
|
||||||
|
|
||||||
|
# NAME
|
||||||
|
|
||||||
|
tomo - The programming language of tomorrow.
|
||||||
|
|
||||||
|
# SYNOPSIS
|
||||||
|
|
||||||
|
Run the REPL:
|
||||||
|
: `tomo`
|
||||||
|
|
||||||
|
Run a program:
|
||||||
|
: `tomo` *program.tm* \[\[`--`\] *args...*\]
|
||||||
|
|
||||||
|
Transpile tomo files to C files:
|
||||||
|
: `tomo` `-t` *file1.tm* *file2.tm*...
|
||||||
|
|
||||||
|
Compile files to static object files:
|
||||||
|
: `tomo` `-c` *file1.tm* *file2.tm*...
|
||||||
|
|
||||||
|
Compile file to an executable:
|
||||||
|
: `tomo` `-e` *file1.tm*
|
||||||
|
|
||||||
|
Build a shared library:
|
||||||
|
: `tomo` `-s=`*mylib.1.2.3* *file1.tm* *file2.tm*...
|
||||||
|
|
||||||
|
# DESCRIPTION
|
||||||
|
|
||||||
|
Tomo is a programming language that is statically typed, compiled, small, and
|
||||||
|
garbage-collected, with concise syntax and built-in support for
|
||||||
|
high-performance, low-overhead datastructures. It compiles by first outputting
|
||||||
|
C code, which is then compiled using a C compiler of your choice.
|
||||||
|
|
||||||
|
# OPTIONS
|
||||||
|
|
||||||
|
`-h`, `--help`
|
||||||
|
: Print the usage and exit.
|
||||||
|
|
||||||
|
`-t`
|
||||||
|
: Transpile the input files to C code without compiling them.
|
||||||
|
|
||||||
|
`-c`
|
||||||
|
: Compile the input files to static objects, rather than running them.
|
||||||
|
|
||||||
|
`-s=`*foo.1.2.3*
|
||||||
|
: Compile the input files to a shared object file, `libfoo.1.2.3.so`, and shared
|
||||||
|
header file, `libfoo.1.2.3.h`. Also offer to install the resulting library.
|
||||||
|
|
||||||
|
## ENVIRONMENT VARIABLES
|
||||||
|
|
||||||
|
Some options can be configured by setting environment variables.
|
||||||
|
|
||||||
|
`VERBOSE=0|1|2`
|
||||||
|
: Set the verbosity level.
|
||||||
|
|
||||||
|
`CC=`*c-compiler*
|
||||||
|
: Set which C compiler is used.
|
||||||
|
|
||||||
|
`O=`*optimization-level*
|
||||||
|
: Set which optimization level is passed to the C compiler. Valid values are
|
||||||
|
those accepted by your compiler's `-O` flag.
|
||||||
|
|
||||||
|
`AUTOFMT=`*autoformatter*
|
||||||
|
: The program used to autoformat generated C code. Default: `indent -kr -l100 -nbbo -nut -sob`
|
Loading…
Reference in New Issue
Block a user