SHMAKE(1) User Commands SHMAKE(1)
shmake - easily templates dependancy situations, runs commands accord-
shmake [options] File [label]
Runs each left Command in File when all files on it's right are ready
(touched). (see below on how commands run)
This program provides any commands with a quick and simplest to use
automatic dependancy resolver. It has a as few features deemed needed
and is end-point alterable for spot needs / plain text.
For ordering and pausing commands which beget dependant needs. For
programs who's flow needs to be plain to see, easily modifiable, and
File File is simple lr format. See examples of the simple LR File
-n show what commands would launch next but don't launch
-s stop if any dep is unmet
-w seconds to wait between scans label show if label is ready. if
it's an aside and is, launch it (for item readiness check or
Default is to scan File until goal completion (it pauses between
scans). If there is no set goal it continually checks up on / runs
commands if needs be.
File is a 2 column list of steps toward a goal (see examples further
left a command label which is invoked when right is met
right a list dependent commands / labels to wait for
goal if on left, right determines success and quit
Detours. One of these 'fakes' can be pre-pended to any label:
% inv, makes prepended item 'invisible'
- false, always missing and never runs
^ nodate, no updating / ignore date
@ aside, launches only as aside (left only, see below)
# comment on rest of line
The LR list is read in order, launching each left who's right is ready.
(rights are not launched) If there is no complete "goal" it scanning
starts again from top.
Commands / Left Labels. label.sh will be invoked as command and should
create file name "label" if successful. If label.sh isn't found
'File.sh' is tried with parameter "label" (of 'shmake File').
Dependancies / Right Labels. After any 'label.sh' runs it (should)
'touch label' upon success. These label files are used to determine
status of what is completed. Because Commands invokes "label.sh"
instead of label, lefts can be rights of other lefts without any
shmake(1) prints progress while running that is verbosely self explani-
Goals. A left label "goal" is special. When it's conditions are met
shmake quits with success. "goal" can appear multiple times and have
Auto Updating. If any dependant of a command is newer(1) than command
command then command is invoked [to update]. This solves another dif-
ficult dependancy problem of which needs / don't need reworking.
Stopping. If scanning needs to stop touch(1) file "stop" and it will
stop normally when the current label finishes. Ctrl-C if you must.
Format. Any labels at the start of line are left and all labels until
the next left are a right.
Other possible 'detour' modifies do not really add convenience because
they are better achieved with simpler L-R notation. If I missed some-
thing make has this needs let me know !
Re-Scan. If File changed while shmake(1) is running shmake uses it.
This is for allowing changes that shouldn't want quitting out. Just
keep in mind if saving and editing while it's running please.
The aside. seeing shdeps --help, 'shdeps file fun' will show if fun is
is ready and quit. But if it's an aside, @fun, then shdeps first
launches it (asides never launch otherwise). see example above. @
used on the right are ignored.
make(1) uses first left as goal and can't change goals.
COMMANDS FILES / DEPENDENCIES
chap spool summary.pg
doit printready chap
fun3 fun2 find_map
fun4 fun3 fun1 request
goal fun4 visited
As a precaution and convenince for developing anything with steps that
may change or be partially replaced. For preventing static dummy
checks from creeping into worker steps (ruinous if design alters). For
programs wishing to utilize dependency solving without need of
shmake is useful when
-o when there are many steps which may not be complete and redoing
done steps is avoided (ex. printing chapters of a book with a
-o there is no order to commands except to work with current status
please mail any bugs you find I'd like shmake to be simple for everyone
pre-release; not yet licensed
John D. Hendrickson, firstname.lastname@example.org
shmake 1.0 06 Jul 2011 SHMAKE(1)