shmk — This line
parsed for whatis database.
shmk |
[--debug | --release]
[-t | --target
target] [--color
when] [-h |
--help] [-V |
--version] [recipie] |
shmk Is a minimal, portable build system
written entirely in POSIX shell.
A list of flags and their descriptions:
- recipe
- Name of the recipe to run (e.g. 'all', 'clean', 'build'). Defaults to
'all' if not set
-t,
--target target
- Build for the target triple
--release
- Build artifacts in release mode (might with optimizations)
--color
when
- Use colored output: always (default), or never
-h,
--help
- Show this help message and exit
-V,
--version
- Show version information and exit
AR
- default archiver (e.g., ar)
AS
- assembler (e.g., as)
CC
- C compiler (e.g., gcc)
CXX
- C++ compiler (e.g., g++)
CPP
- C preprocessor (default: "$CC -E")
YACC
- parser generator
LD
- linker
RM
- removal command (default: "rm -f")
ARFLAGS
- flags passed to $AR
CFLAGS
- C compiler flags
CXXFLAGS
- C++ compiler flags
CPPFLAGS
- C preprocessor flags
LDFLAGS
- linker flags
LDLIBS
- libraries passed to the linker
DRY_RUN
- if set to 1, commands are logged but not run
shmk(default_recipe,
parameters)
- Main task dispatcher; executes a default recipe based on user
arguments.
shmk_minimum_required(version)
- Requires a minimum version of shmk. If not matched, script will be exit
with status of 1.
recipe(recipe_name)
- Registers a recipe function.
find_program(var_name,
prog_name, [paths...])
- Find executable by name.
run(recipe_name)
- Execute a recipe by name; wraps a call to a function like
r_<name>.
run_cmd(arguments...)
- Execute a shell command; respects dry-run mode.
log(message)
- Print a general log message with standard formatting
(non-color-critical).
ilog(message)
- Print an informational log message.
wlog(message)
- Print a warning message (e.g., yellow), optionally to stderr.
elog(message)
- Print an error message (in red), to stderr.
slog(message)
- Print a success message (in green).
dlog(message)
- Print a debug message (e.g., blue or dim).
- /usr/local/lib/shmk.sh
- Main script to be sourced in build scripts.
- /usr/local/lib/shmk/modules/
- Directory containing optional modules (e.g., packaging, deployment).