Build is an extremely crude example of a program like Unix MAKE or DEC's MMS, which allow you to avoid redundant compiles and links by checking the date of the source file against the date of the target file and compiling only if the source has a later date than the target. It has no sophistication whatsoever: you must write out all the DCL commands to be used, and you must write them out in the correct order for all dependencies to be satisfied. You execute Build as a foreign command followed by the name of the instruction file (default file type BLD); it then creates a file with the same file specification as the instruction file, but having a file type of COM. This COM file actually does all the work, including checking the dates. (Build does not automatically execute this COM file). Build looks for groups of lines with beginning with a ] character. On the first such line it expects to find a legal DCL symbol name followed by the file specification of the target file. Build will write a command to the COM file to set the symbol to the revision date of the file. On the following lines Build expects to find dependency list. If a particular element of the list contains one of the characters in the string '.;[]-:' then Build will assume that the element is a file specification; otherwise it will assume it is a DCL symbol containing a revision date (presumably assigned by Build on previous step). After the ] lines should be one or more DCL commands. Build will set up the COM file to execute the commands only when the revision dates of all elements in the dependency list are less than or equal to the revision date of the target file. Any DCL commands before the first ] line in the instruction file will be executed unconditionally; also, if a line contains only ], any lines following it up to the next ] line will be executed unconditionally. Example: If BUILD.BLD contains: $ extract/check msgpas.src .pas/keep,.cld,.msg ]obj msgpas.obj ] msgpas.pas $ pascal/nolist msgpas ]msj msgpas.msj ] msgpas.msg $ message/obj=msgpas.msj mcv:facilities,sys$disk:[]msgpas ]clj msgpas.clj ] msgpas.cld $ set command/obj=.clj msgpas ]exe mcv:msgpas.exe ] obj msj clj $ link/exe=mcv: msgpas,.msj,.clj ] $ purge build.com, msgpas.pas, .obj, .msg, .msj, .cld, .clj, mcv:.exe then the command BUILD BUILD would produce the file BUILD.COM containing: $ extract/check msgpas.src .pas/keep,.cld,.msg $ on warning then continue $ obj = f$cvtime(f$file("msgpas.obj","RDT")) $ if f$cvtime(f$file("msgpas.pas","RDT")) .les. obj then goto BUILD___1 $ write sys$output "obj" $ on warning then goto BUILD___ENDIT $ pascal/nolist msgpas $ obj = f$cvtime(f$file("msgpas.obj","RDT")) $BUILD___1: $ on warning then continue $ msj = f$cvtime(f$file("msgpas.msj","RDT")) $ if f$cvtime(f$file("msgpas.msg","RDT")) .les. msj then goto BUILD___2 $ write sys$output "msj" $ on warning then goto BUILD___ENDIT $ message/obj=msgpas.msj mcv:facilities,sys$disk:[]msgpas $ msj = f$cvtime(f$file("msgpas.msj","RDT")) $BUILD___2: $ on warning then continue $ clj = f$cvtime(f$file("msgpas.clj","RDT")) $ if f$cvtime(f$file("msgpas.cld","RDT")) .les. clj then goto BUILD___3 $ write sys$output "clj" $ on warning then goto BUILD___ENDIT $ set command/obj=.clj msgpas $ clj = f$cvtime(f$file("msgpas.clj","RDT")) $BUILD___3: $ on warning then continue $ exe = f$cvtime(f$file("mcv:msgpas.exe","RDT")) $ if obj .les. exe .and. - msj .les. exe .and. - clj .les. exe then goto BUILD___4 $ write sys$output "exe" $ on warning then goto BUILD___ENDIT $ link/exe=mcv: msgpas,.msj,.clj $ exe = f$cvtime(f$file("mcv:msgpas.exe","RDT")) $BUILD___4: $ purge build.com, msgpas.pas, .obj, .msg, .msj, .cld, .clj, mcv:.exe $BUILD___5: $BUILD___ENDIT: $ status = $status $ exit status