X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=doc%2Fcmds.texi;h=465ef65f424406adb1a30bf61542ed0600f288d3;hb=2cea0c64b5a0240bfe6746a98a5b350812edb96d;hp=578d182ce65f43015cf5d292cc522d965269a614;hpb=cb183690cc59ad772dab941adc3e9b8d5b90fbc0;p=goredo.git diff --git a/doc/cmds.texi b/doc/cmds.texi index 578d182..465ef65 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -1,32 +1,80 @@ @node Commands @unnumbered Commands +There are three basic main commands, originally suggested by DJB in his +articles: + @table @command +@item redo + Forcefully and sequentially build specified targets. This is the + main command you will explicitly use from the command line. If no + targets are given, then @file{all} target will be used by default. +@item redo-ifchange + Rebuild specified targets if they are out-of-date and record them as + a dependency for the currently run target. This is the main command + you will use in @file{.do} files. +@item redo-ifcreate + Record the non-existent file dependency for the currently run + target. Target will be rebuilt if any of the given files appear. Can + be used only inside @file{.do} file. +@end table -@item redo-ifchange, redo-ifcreate, redo-always +Pay attention that @command{redo-ifchange} enables parallel builds of +the given targets, but ordinary @command{redo} is not: it builds +specified targets sequentially and stops when error happens. -@item redo - Same as @command{redo-ifchange}, but forcefully and sequentially run - specified targets. +@option{-x} option can be used to enable tracing (@code{set -x}) of the +currently run shell script @file{.do} file. @option{-xx} option enables +tracing for all invoked @file{.do} files further. + +With @option{-j} option you can enable parallel builds, probably with an +infinite number of workers (@code{=0}). Also you can set +@env{$REDO_JOBS} to automatically apply that setting globally. + +Read about @ref{Logs, log storage capabilities}. + +@option{-log-pid} (@env{$REDO_LOG_PID=1}) can be used to prefix job's +@code{stderr} with the PID, that could be useful during parallel builds. +@option{-d} (@env{$REDO_DEBUG=1}) enables debug messages. -@item redo-log - Display @url{http://cr.yp.to/libtai/tai64.html, TAI64N} timestamped - last @command{stderr} of the target, captured before. +@option{-no-progress} (@env{$REDO_NO_PROGRESS=1}) and +@option{-no-status} (@env{$REDO_NO_STATUS=1}) disable statusline and +progress display. @env{$NO_COLOR=1} disables progress/debug messages +colouring. -@item redo-targets, redo-sources, redo-ood - List known targets, sources and out-of-date targets. You can limit - results by specifying explicit targets you are interested in. - @command{redo-sources} shows all recursive source files given - targets depend on. +By default all build commands use @code{fsync} to assure data is reached +the disk. You can disable its usage with @env{$REDO_NO_SYNC=1} +environment variable, for speeding up the build process. +There are other commands that could be found in other implementations too: + +@table @command +@item redo-always + Record current target as an always-do dependency. By definition it + should be always build. @command{goredo} tries to build it once per + @strong{run}. @item redo-stamp - Record stamp dependency. Nothing more, dummy. Read about - @ref{Stamping, stamping} in the FAQ. + Record "stamp" dependency. It reads @code{stdin} and stores its hash + in the dependency database. It is not used anyhow, it is dummy. Read + about @ref{Stamping, stamping} in the FAQ. It is left only for + compatibility with some other implementations. +@item redo-targets, redo-ood + Show all known targets, possibly limited by specified directories. + @command{redo-ood} shows only the out-of-date ones. +@item redo-sources + Recursively show all source files the given targets depend on. +@item redo-affects + It is not in other distributions, but it is some kind of opposite of + @command{redo-sources} -- shows the targets that will be affected by + specified files change. +@end table -@item redo-cleanup - Removes either temporary, log files, or everything related to - @command{goredo}. +And there are some maintenance and debug commands: +@table @command +@item redo-cleanup + Removes either temporary (@option{tmp}), log files (@option{log}), + or everything related to @command{goredo} (@option{full}). @item redo-whichdo Display @file{.do} search paths for specified target (similar to @command{apenwarr/redo}): @@ -46,7 +94,6 @@ default.do ../default.o.do ../default.do @end example - @item redo-dot Dependency @url{https://en.wikipedia.org/wiki/DOT_(graph_description_language), DOT}