.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "CKATI" "1" "" "ckati" "User Commands" .hy .SS NAME .PP ckati - experimental GNU make clone .SS SYNOPSIS .PP \f[B]ckati\f[R] [\f[I]OPTION\f[R]]\&... [\f[I]TARGET\f[R]]\&... .SS DESCRIPTION .PP \f[I]ckati\f[R] is a C++ implementation of \f[B]kati\f[R], an experimental \f[B]make\f[R] clone. .PP The motivation of \f[B]kati\f[R] was to speed up Android platform build. The Android platform\[cq]s build system is built on \f[B]GNU make\f[R] and allows developers to write build rules in a descriptive way. .PP \f[I]ckati\f[R] is a complete rewrite of \f[B]GNU make\f[R] from scratch, focused on speeding up incremental builds. .PP \f[I]ckati\f[R] supports two modes of execution. It can directly execute the commands specified in the \f[I]Makefile\f[R], or it can generate a \f[I]ninja\f[R] file corresponding to the \f[I]Makefile\f[R]. .PP The \f[I]ninja\f[R] generator mode is the main mode of operation, since the built-in executor of \f[I]ckati\f[R] lacks important features for a build system like parallel builds. .PP The \f[I]ninja\f[R] generator mode is not fully compatible with \f[B]GNU make\f[R] due to a feature mismatch between \f[B]make\f[R] and \f[B]ninja\f[R]. Since \f[B]ninja\f[R] only allows one command per a rule, when the \f[I]Makefile\f[R] has multiple commands, \f[I]ckati\f[R] generates a rule with the commands joined with \f[V]&&\f[R]. When \f[V]$(shell ...)\f[R] is used, \f[I]ckati\f[R] translates it into shell\[cq]s \f[V]$(...)\f[R]. This works in many cases, but doesn\[cq]t when the result of \f[V]$(shell ...)\f[R] is passed to another function: .IP .nf \f[C] all: echo $(if $(shell echo),FAIL,PASS) \f[R] .fi .PP If \f[V]-\[rs]-regen\f[R] flag is specified, \f[I]ckati\f[R] checks if anything in your environment has changed after the previous run. If the \f[I]ninja\f[R] file doesn\[cq]t need to be regenerated, it finishes quickly. .PP The following is checked when deciding whether the \f[I]ninja\f[R] file should be regenerated or not: .IP \[bu] 2 The command line flags passed to \f[I]ckati\f[R] .IP \[bu] 2 Timestamps of the \f[I]Makefiles\f[R] used to generate the previous \f[I]ninja\f[R] file .IP \[bu] 2 Environment variables used while evaluating \f[I]Makefiles\f[R] .IP \[bu] 2 Results of \f[V]$(wildcard ...)\f[R] .IP \[bu] 2 Results of \f[V]$(shell ...)\f[R] .PP \f[I]Ckati\f[R] doesn\[cq]t run \f[V]$(shell date ...)\f[R] and \f[V]$(shell echo ...)\f[R] during these checks. .PP \f[I]Ckati\f[R] optimises \f[V]$(shell find ...)\f[R] calls, since the Android\[cq]s build system uses a lot of them to create a list of all \&.java/.mk files under a directory, and they are slow. \f[I]Ckati\f[R] has a built-in emulator of \f[B]GNU find\f[R]. The find emulator traverse the directory tree and creates an in-memory directory tree. When \f[V]$(shell find ...)\f[R] is used, the find emulator returns results of \f[B]find\f[R] commands using the cached tree, giving a performance boost. .SS OPTIONS .TP \f[B]-d\f[R] Print debugging information. .TP \f[B]--warn\f[R] Print \f[I]ckati\f[R] warnings. .TP \f[B]-f\f[R] \f[I]FILE\f[R] Use \f[I]FILE\f[R] as a \f[I]Makefile\f[R]. .TP \f[B]-c\f[R] Do not run anything, only perform a syntax check. .TP \f[B]-i\f[R] Dry run mode: print the commands that would be executed, but do not execute them. .TP \f[B]-s\f[R] Silent operation; do not print the commands as they are executed. .TP \f[B]-j\f[R] \f[I]JOBS\f[R] Specifies the number of \f[I]JOBS\f[R] (commands) to run simultaneously. .TP \f[B]--no_builtin_rules\f[R] Do not provide any built-in rules. .TP \f[B]--ninja\f[R] Ninja generator mode: do not execute commands directly, but generate a \f[I]ninja\f[R] file. By default, the ninja file is saved as \f[V]build.ninja\f[R], and a shell script to execute \f[B]ninja\f[R] is saved as \f[V]ninja.sh\f[R]. An optional suffix can be added to the file names by using \f[B]--ninja_suffix\f[R] option. .TP \f[B]--ninja_dir\f[R] The directory where the \f[I]ninja\f[R] file will be generated; the default is the current directory. .TP \f[B]--ninja_suffix\f[R] The \f[I]ninja\f[R] file suffix; the default is no suffix. .TP \f[B]--use_find_emulator\f[R] Emulate \f[V]find\f[R] command calls to improve build performance. .TP \f[B]--regen\f[R] Regenerate the \f[I]ninja\f[R] file only when necessary. .TP \f[B]--detect_android_echo\f[R] Detect the use of \f[V]$(shell echo ...)\f[R] in Android build system. .TP \f[B]--detect_depfiles\f[R] Detect dependency files. .PP The following options can emit warnings or errors if certain \f[I]Makefile\f[R] features are used: .TP \f[B]--werror_overriding_commands\f[R] Fail when overriding commands for a previously defined target. .TP \f[B]--warn_implicit_rules\f[R], \f[B]--werror_implicit_rules\f[R] Warn or fail when implicit rules are used. .TP \f[B]--warn_suffix_rules\f[R], \f[B]--werror_suffix_rules\f[R] Warn or fail when suffix rules are used. .TP \f[B]--warn_real_to_phony\f[R], \f[B]--werror_real_to_phony\f[R] Warn or fail when a real target depends on a \f[V]PHONY\f[R] target. .TP \f[B]--warn_phony_looks_real\f[R], \f[B]--werror_phony_looks_real\f[R] Warn or fail when a \f[V]PHONY\f[R] target contains slashes. .TP \f[B]--werror_writable\f[R] Fail when writing to a read-only directory. .SS SUPPORTED MAKE FUNCTIONS .PP Text functions: .IP \[bu] 2 \f[V]subst\f[R] .IP \[bu] 2 \f[V]patsubst\f[R] .IP \[bu] 2 \f[V]strip\f[R] .IP \[bu] 2 \f[V]findstring\f[R] .IP \[bu] 2 \f[V]filter\f[R] .IP \[bu] 2 \f[V]filter-out\f[R] .IP \[bu] 2 \f[V]sort\f[R] .IP \[bu] 2 \f[V]word\f[R] .IP \[bu] 2 \f[V]wordlist\f[R] .IP \[bu] 2 \f[V]words\f[R] .IP \[bu] 2 \f[V]firstword\f[R] .IP \[bu] 2 \f[V]lastword\f[R] .PP File name functions: .IP \[bu] 2 \f[V]dir\f[R] .IP \[bu] 2 \f[V]notdir\f[R] .IP \[bu] 2 \f[V]suffix\f[R] .IP \[bu] 2 \f[V]basename\f[R] .IP \[bu] 2 \f[V]addsuffix\f[R] .IP \[bu] 2 \f[V]addprefix\f[R] .IP \[bu] 2 \f[V]join\f[R] .IP \[bu] 2 \f[V]wildcard\f[R] .IP \[bu] 2 \f[V]realpath\f[R] .IP \[bu] 2 \f[V]abspath\f[R] .PP Conditional functions: .IP \[bu] 2 \f[V]if\f[R] .IP \[bu] 2 \f[V]or\f[R] .IP \[bu] 2 \f[V]and\f[R] .PP Make control functions: .IP \[bu] 2 \f[V]info\f[R] .IP \[bu] 2 \f[V]warning\f[R] .IP \[bu] 2 \f[V]error\f[R] .PP Miscellaneous: .IP \[bu] 2 \f[V]value\f[R] .IP \[bu] 2 \f[V]eval\f[R] .IP \[bu] 2 \f[V]shell\f[R] .IP \[bu] 2 \f[V]call\f[R] .IP \[bu] 2 \f[V]foreach\f[R] .IP \[bu] 2 \f[V]origin\f[R] .IP \[bu] 2 \f[V]flavor\f[R] .IP \[bu] 2 \f[V]file\f[R] .SS EXIT STATUS .PP \f[B]ckati\f[R] exits with a status of zero if all \f[I]Makefiles\f[R] were successfully parsed and no targets that were built failed. .SS SEE ALSO .PP \f[B]make\f[R](1), \f[B]ninja\f[R](1) .SS AUTHOR .PP This manual page was written by Andrej Shadura for the Debian project.