X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=usage.go;h=428c9bc199a9bda724453b10f5c374a1b305bdee;hb=dec78abffe14ae2e7c3383c215803c3792788d3e;hp=b18c93b4d00a685df7a12b3f03710cbe0b4016d0;hpb=ca5290c19761bc1806b98d54d966a9cbbfeabd15;p=goredo.git diff --git a/usage.go b/usage.go index b18c93b..428c9bc 100644 --- a/usage.go +++ b/usage.go @@ -24,7 +24,7 @@ import ( ) const ( - Version = "1.6.0" + Version = "1.20.0" Warranty = `Copyright (C) 2020-2021 Sergey Matveev This program is free software: you can redistribute it and/or modify @@ -43,63 +43,65 @@ along with this program. If not, see .` func usage(cmd string) { var d string switch cmd { - case "redo": - d = `Usage: redo [options] [target ...] + case CmdNameRedo: + d = `Usage: redo [-j X] [-k] [-s] [-x|-xx] [options] [target ...] Forcefully and *sequentially* build specified targets. If no targets specified, then use "all" one.` - case "redo-ifchange": - d = `Usage: redo-ifchange target [...] + case CmdNameRedoIfchange: + d = `Usage: redo-ifchange [-j X] [-k] [-s] [-x|-xx] target [...] Build specified targets in parallel, if they are changed. Record them as dependencies for current target.` - case "redo-ifcreate": + case CmdNameRedoIfcreate: d = `Usage: redo-ifcreate target [...] Record ifcreate dependency for current target. Unusable outside .do.` - case "redo-always": + case CmdNameRedoAlways: d = `Usage: redo-always Always build current target. Unusable outside .do.` - case "redo-cleanup": - d = `Usage: redo-cleanup [-dry-run] {full,log,tmp} [...] + case CmdNameRedoCleanup: + d = `Usage: redo-cleanup [-n] {full,log,tmp} [...] Remove either all goredo's related temporary files, or kept stderr logs, or everything (including .redo directories) related.` - case "redo-log": - d = `Usage: redo-log target [ | tai64nlocal ] + case CmdNameRedoLog: + d = `Usage: redo-log [-c] [-r] target [ | tai64nlocal ] Display kept target's stderr with TAI64N timestamped lines. Only the last build is kept. You must enable stderr keeping with either -logs, -or REDO_LOGS=1.` - case "redo-dot": +or REDO_LOGS=1. -c option show the exact command invoked, start and +finish time. -r option recursively and linearly show also all deeper +redo calls and their logs.` + case CmdNameRedoDot: d = `Usage: redo-dot target [...] Write dependency DOT graph to stdout.` - case "redo-stamp": + case CmdNameRedoStamp: d = `Usage: redo-stamp < [$3] Record stamp dependency for current target. Unusable outside .do. Stamp dependency does not play any role, as all targets are hashed anyway.` - case "redo-whichdo": + case CmdNameRedoWhichdo: d = `Usage: redo-whichdo target Display .do search paths for specified target. Exits successfully if the last .do in output if the found existing one.` - case "redo-targets": + case CmdNameRedoTargets: d = `Usage: redo-targets [target ...] List all currently known targets.` - case "redo-sources": + case CmdNameRedoSources: d = `Usage: redo-sources [target ...] List all currently known source files.` - case "redo-ood": + case CmdNameRedoOOD: d = `Usage: redo-ood [target ...] List all currently known out-of-date targets.` - case "redo-affects": + case CmdNameRedoAffects: d = `Usage: redo-affects target [...] List all targets that will be affected by changing the specified ones.` @@ -116,9 +118,13 @@ redo-sources, redo-stamp, redo-targets, redo-whichdo.` fmt.Fprintln(os.Stderr, ` Additional environment variables: NO_COLOR -- disable messages colouring - REDO_NO_SYNC -- disable files/directories explicit filesystem syncing REDO_TOP_DIR -- do not search for .do above that directory - (it can contain .redo/top as an alternative) + (it can contain .redo/top as an alternative)`) + if cmd == CmdNameRedo || cmd == CmdNameRedoIfchange { + fmt.Fprintln(os.Stderr, ` + REDO_NO_SYNC -- disable files/directories explicit filesystem syncing REDO_INODE_NO_TRUST -- do not trust inode information (except for size) - and always check file's hash`) + and always check file's hash + REDO_MAKE -- bmake/gmake/none(default) jobserver protocol compatibility`) + } }