{{{kmk}}} is the {{{make}}} program in [wiki:kBuild kBuild], e.g. it is what you invoke from the commandline or editor to perform the actual build. {{{kmk}}} is based on the latest [wiki:'GNU make'] release, currently 3.81, but provides a bunch of additional features required by the [wiki:kBuild kBuild] makefile scripts. Why not use vanilla [wiki:'GNU make']? There are several reasons: * When [wiki:kBuild kBuild] was reborn using [wiki:'GNU make'] (an earlier incarnation of the project was based on FreeBSD make) the 3.81 release was about 2 years ahead. [wiki:kBuild kBuild] relies on many features introduced after 3.80. Requiring 3.81 to be installed still isn't a viable option. * Be able to add new features without having trouble getting them accepted or having to wait 3-4 years until the next [wiki:'GNU make'] version is released and makes it out to all the corners of the world. * Be able to fix bugs fast, same reasoning as above. * Not having to require a specific, perhaps even unreleased, [wiki:'GNU make'] version. * Not having to deal with missing features and bugs specific to various [wiki:'GNU make'] versions and ports. * Finally, because we can. :-) The current {{{kmk}}} code contains the following changes from [wiki:'GNU make']: * It has some extra predefined variables: * {{{KMK_VERSION}}} * {{{KMK_FEATURES}}} * {{{KBUILD_VERSION}}} * {{{KBUILD_VERSION_MAJOR}}} * {{{KBUILD_VERSION_MINOR}}} * {{{KBUILD_VERSION_PATCH}}} * {{{PATH_KBUILD}}} - only when '''installed''' on *nix. * {{{PATH_KBUILD_BIN}}} - only when '''installed''' on *nix. * It has a few new builtin functions: * {{{toupper}}} * {{{tolower}}} * {{{compvar}}} * {{{kb-src-tool}}} (kBuild internal) * {{{kb-obj-base}}} (kBuild internal) * {{{kb-obj-suff}}} (kBuild internal) * {{{kb-src-prop}}} (kBuild internal) * {{{kb-src-one}}} (kBuild internal) * It contains bugfixes for several bugs in the Windows and OS/2 ports, most importantly path case mixups, broken shell invocation, and abspath. * It has several performance improvements with respect to the kind of work [wiki:kBuild kBuild] puts make thru. Most notably, keeping name and value lengths for variables and thereby skipping a lot of {{{strlen()}}} and being able to use {{{memcpy()}}} instead of {{{strcpy()}}}, and the variable expansion optimization ({{{+=}}}). The latter was a major issue with the way [wiki:kBuild kBuild] is scripted. * A bunch of builtin utilities which will be invoked without spawning new process or shell. Most of these are taken from BSD. * kmk_builtin_append * kmk_builtin_cp * kmk_builtin_echo * kmk_builtin_install * kmk_builtin_ln * kmk_builtin_mkdir * kmk_builtin_rm (clean just wouldn't work without this) * kmk_builtin_rmdir On the todo list is: * kmk_builtin_mv * ... * A new argument {{{--priority <1..5>}}} which sets the priority of the [wiki:kmk] process. 1 is idle time, 3 is normal, and 5 is highest priority.