+func usage(cmd string) {
+ var d string
+ switch cmd {
+ case "redo":
+ d = `Usage: redo [options] [target ...]
+
+Forcefully and *sequentially* build specified targets.`
+ case "redo-ifchange":
+ d = `Usage: redo-ifchange target [...]
+
+Build specified targets in parallel, if they are changed.
+Record them as dependencies for current target.`
+ case "redo-ifcreate":
+ d = `Usage: redo-ifcreate target [...]
+
+Record ifcreate dependency for current target. Unusable outside .do.`
+ case "redo-always":
+ d = `Usage: redo-always
+
+Always build current target. Unusable outside .do.`
+ case "redo-cleanup":
+ d = `Usage: redo-cleanup [-dry-run] {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 ]
+
+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":
+ d = `Usage: redo-dot target [...]
+
+Write dependency DOT graph to stdout.`
+ case "redo-stamp":
+ 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":
+ 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":
+ d = `Usage: redo-targets
+
+List all currently known targets.`
+ case "redo-sources":
+ d = `Usage: redo-sources
+
+List all currently known source files.`
+ case "redo-ood":
+ d = `Usage: redo-ood
+
+List all currently known out-of-date targets.`
+ default:
+ d = `Usage: goredo -symlinks