{{{kmk}}} is the {{{make}}} program in [wiki:kBuild kBuild], i.e. what you invoke from the commandline or editor to perform the actual build. {{{kmk}}} is based on the [wiki:'GNU make'] CVS (2007-05-23), 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 wasn'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']: * Explicit multi-target rules, i.e. explicit make rules that output more than one file. * Prepend assignment operator, {{{<=}}}. * The special {{{.NOTPARALLEL}}} [wiki:goals goal] has been extended to be able to take a list of [wiki:goals] that must be executed without any parallel building going on. If no list is given, it will work like in vanilla [wiki:'GNU make'] which means the entire makefile will be executed without any parallel building. This extension is required to make the {{{-jN}}} argument useful in [wiki:kBuild]. * It has some extra predefined variables, see [wiki:kmk Quick Reference] for details. * It has a few new builtin functions, see [wiki:kmk Quick Reference] for details. * 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_cat * kmk_builtin_echo * kmk_builtin_install * kmk_builtin_ln * kmk_builtin_mkdir * kmk_builtin_mv * kmk_builtin_rm (clean just wouldn't work without this) * kmk_builtin_rmdir * kmk_builtin_printf * 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 append/prepend optimization ({{{+=}}} and {{{<=}}}). The latter was a major issue with the way [wiki:kBuild kBuild] is scripted. * 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.