home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bbmak.zip / BOBSMAKE.DOC < prev    next >
Text File  |  1996-01-20  |  8KB  |  220 lines

  1.              Instructions for Using BobsMake.CMD
  2.  
  3. Hi,
  4.  
  5. Thank you for using BobsMake.CMD, the first reasonable and architected 
  6. replacement for the archaic NMAKE program.
  7.  
  8. Now that I have satisfactorily demonstrated my bigotry, let's get down 
  9. to business.
  10.  
  11. BobsMake.CMD is a shareware product. You are authorized to use it on as 
  12. many machines as you like and give it to as many others as you like 
  13. with only three restrictions. First, you must not remove the 
  14. "unregistered" copy notice unless you have registered with me, the 
  15. author. Second, you may not include this in a commercial product without 
  16. both registering your copy and negotiating a usage contract for 
  17. commercial distribution with me, the author. Third, if you make any 
  18. neat or function enhancing changes to BobsMake.CMD or any derivitive 
  19. work of it, you agree you will forward those changes, and the rights to 
  20. use, distribute, and sell those changes, to me, the author, in a
  21. timely fashion.
  22.  
  23.             How to Use BobsMake.CMD
  24.  
  25. BobsMake.CMD is invoked by executing any one of the following commands 
  26. from either a command line, a WPS Program object, or from within a REXX 
  27. or Batch file:
  28.  
  29. BobsMake makefilename
  30.  
  31. BobsMake.cmd makefilename
  32.  
  33. BobsMake
  34.  
  35. BobsMake.CMD
  36.  
  37. The command entries are case insensitive. If no makefilename is provided
  38. BobsMake.cmd will look for a file named MAKEFILE in the current directory 
  39. and execute that file.
  40.  
  41. The make file executed by BobsMake.CMD uses the following constructs.
  42.  
  43. 1.    SETDIR
  44.  
  45. SETDIR instructs BobsMake to change to a different directory and drive. 
  46. The format of the command is :
  47.  
  48.      SETDIR = driveandpathname
  49.  
  50. Driveandpathname have the following format DriveLetter:PathName. An 
  51. example of an actual SETDIR command is:
  52.  
  53.     SETDIR = d:\ibmcobol\cb2cob85
  54.  
  55. 2.    SETLIST
  56.  
  57. SETLIST is used to indentify a list of dataset names by a single name. 
  58. This allows the IFCOND construct, described below, to be parsed easily 
  59. and to remain simple in structure. The format of the command is:
  60.  
  61.     SETLIST ListName = (name1, Name2, Name3, ..., NameN)
  62.  
  63. ListName is a case insensitive name following the same rules for 
  64. construction as any REXX variable Name. Namex are dataset names, 
  65. either fully qualified, or containing wildcards. The equal sign 
  66. and the parenthesis are required. The commas are optional. Two 
  67. examples of the use of SETLIST are:
  68.  
  69.     SETLIST CopyBooks = (cob2main.exe *.h *.obj makefile)
  70.     SETLIST CopyBooks = (cob2main.exe, cob2main.lst, makefile)
  71.  
  72. 3.    IFCOND
  73.  
  74. IFCOND is used to specify a conditional execution construct. IFCOND 
  75. will compare creation dates of a target and a source and execute a 
  76. DOCOND construct if the target is older then the source. The target 
  77. and source are files. The format of IFCOND is:
  78.  
  79.     IFCOND Target < Source then DOCOND
  80.  
  81. Target and Source are either individual file names such as program.exe 
  82. and program.source, or ListNames which have been identified by a 
  83. preceeding SETLIST construct. The IFCOND, less then sign, "then", and 
  84. DOCOND are all required. At this time Target and Source cannot be 
  85. explicitly specified as lists of objects in the IFCOND command itself. 
  86. For example the following command format is not supported:
  87.  
  88.     IFCOND Target.exe < (*.c *.obj *.h) then DOCOND
  89.  
  90. Instead the following sequence must be entered.
  91.  
  92.     SETLIST SourceFiles = (*.c, *.obj, *.h)
  93.     IFCOND Target.exe < SourceFiles then DOCOND
  94.  
  95. 4.    DOCOND
  96.  
  97. DOCOND is used to identify a sequence of REXX commands to be executed 
  98. once for each target file which satisfies the condition specified in 
  99. the IFCOND construct. Each DOCOND construct must be paired with an 
  100. ENDCOND construct.
  101.  
  102. The REXX commands within the DOCOND/ENDCOND construct have access to 
  103. the following REXX variables:
  104.  
  105.     TargetFile
  106.     TargetFullName
  107.     TargetName
  108.     TargetDrive
  109.     TargetPath
  110.     TargetSuffix
  111.  
  112.     TargetFile contains the fully qualified target name.
  113.     TargetFullName contains the full dataset name.
  114.     TargetName contains the dataset name only.
  115.     TargetDrive contains the drive on which the target exists.
  116.     TargetPath contains the path to the dataset name.
  117.     TargetSuffix contains the suffix of the dataset name.
  118.  
  119. 5.    ENDCOND
  120.  
  121. ENDCOND is used to identify the end of a sequence of REXX commands 
  122. that are to be executed once for each target file which satisfies the 
  123. condition specified in the IFCOND construct.
  124.  
  125. 6.    Any other REXX command or Batch file command can be placed between 
  126. a DOCOND and a ENDCOND pair.
  127.  
  128. 7.    Any other single REXX command or Batch file command can be placed 
  129. anywhere within the make file with the following exceptions:
  130.  
  131.     CD
  132.     Drive:
  133.     DO ... END
  134.  
  135. These commands will not execute correctly.
  136.  
  137.                Example of a Working Make File
  138.  
  139.     SETDIR = d:\ibmcobol\cb2cob85
  140.     "@echo ' Compile::COBOL Compiler '"
  141.     SETLIST CopyBooks = (cob2main.exe cob2main.lst makefile)
  142.  
  143.     IFCOND *.lst < CopyBooks then DOCOND
  144.         SAY 'Target = ' Target ' TargetName = ' TargetName '
  145.               TargetSuffix = ' TargetSuffix
  146.         iwzvcomp.cmd -q"NOCURRENCY NOLIB QUOTE NONUMBER
  147.               PGMNAME(UPPER) SEQUENCE NOTYPECHK NOWORD
  148.               LINECOUNT(60) NOLIST NOMAP SOURCE SPACE(1) 
  149.               TERMINAL NOVBREF NOXREF NOEXIT NOADATA 
  150.               NOCOMPILE(S) NOIDLGEN SEPOBJ SIZE(2097152) 
  151.               BINARY(NATIVE) COLLSEQ(NATIVE) NOTHREAD TRUNC(STD)
  152.               ZWB CALLINT(SYSTEM) ENTRYINT(SYSTEM) PROBE FLAG(I)
  153.               NOFLAGSTD NOPROFILE NOTEST NOSSRANGE"
  154.               d:\IBMCOBOL\CB2COB85\cob2main.cbl
  155.         ENDCOND
  156.  
  157. Notes: The SAY and iwzvcomp commands are actually contained on one line. 
  158. The have been split and indented here only for readability.
  159.  
  160. This make file will change the working directory to d:\ibmcobol\cb2cob85, 
  161. display on the terminal 'Compile::COBOL Compiler', establish a listname 
  162. of CopyBooks, compare the creation date of all Lst files in the current 
  163. subdirectory against the file names identified in the list name, and 
  164. execute the SAY and iwzvcomp commands for each of the files.
  165.  
  166. YOU CAN PLACE AS MANY IFCOND/DOCOND/ENDCOND constructs in the make file
  167. as you need.
  168.  
  169. You can cause BobsMake.CMD to iterate through the make file until no 
  170. conditions are satisfied, thus allowing you to place the
  171. IFCOND/DOCOND/ENDCOND constructs in any order you want, and still be 
  172. assured that all conditions will be satisified. This is accomplished
  173. by adding the line:
  174.  
  175. IterateUntilDone = 'Yes'
  176.  
  177. at the start of your make file.
  178.  
  179. You can cause BobsMake.CMD to display the interim results of all its
  180. checking by adding the line:
  181.  
  182. Verbose = 'Yes'
  183.  
  184. at the start of your make file.
  185.  
  186.  
  187.             Known Problem Areas
  188.  
  189. Currently the age comparison routine uses the date and time returned 
  190. from the directory command. This has a resolution of only 1 minute. 
  191. I will be changing this to support a resolution of at least 1 second 
  192. in a later release. In the meantime it is possible that if you do a 
  193. compile and then make a source change within the same minute the age 
  194. comparison will fail.
  195.  
  196. If the target file does not exist the condition will not be satisfied.
  197. I assume that I will have this resolved before the first user registers
  198. their copy. But one never knows.
  199.  
  200.  
  201.             How to Register BobsMake.CMD
  202.  
  203. Send $5.00 in cash or check to:
  204.  
  205.     Robert Chapman
  206.     11 Mareblu
  207.     Suite 130
  208.     Aliso Viejo, CA 92656
  209.  
  210.     re: BobsMake.cmd
  211.  
  212. You can correspond with the author on Compuserve at 73173,1616, on the
  213. Internet at bobchap@ibm.net, on the telephone at 714.448.9578, or by
  214. fax at 714.831.4432.
  215.  
  216. Upon receipt of the $5.00 I will send you a letter authorizing you to 
  217. remove the line displaying the "unregistered" copy message.
  218.  
  219. Thank you.
  220.