home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / homonlib.zip / BMAKE.TXT < prev    next >
Text File  |  1995-04-13  |  9KB  |  187 lines

  1. *****************************************************************************
  2.                                   BMAKE 1.0
  3.                          BASIC language make utility
  4.                                      
  5.            Raymond W. Marron - HOMONCULOUS PROGRAMMING - Mesa, AZ
  6. *****************************************************************************
  7.  
  8. OVERVIEW:     
  9.  
  10.      BMAKE is a utility for BASIC programmers.  It makes the compiling and
  11. linking stage of your programming faster and easier.
  12.  
  13.      BMAKE works by reading a makefile (a.k.a. response file) that contains
  14. the names of your source files.  You may specify compiler options that apply
  15. to all the files, or specify different or additional options on a file by
  16. file basis.
  17.  
  18.      BMAKE then compares the date and time stamp of your source files to
  19. those of the associated object files.  It doesn't bother to recompile a
  20. module if the object file is newer.  Should the compiler detect an error in
  21. your source, BMAKE will stop execution so you can see what the errors were
  22. before they scroll off the screen.
  23.  
  24.      When the compiler work is finished, BMAKE can then issue a command or
  25. commands to start your linker, library manager, or run a batch file that
  26. contains even more commands!
  27.  
  28.  
  29. COMMAND LINE PARAMETERS:
  30.  
  31.      The most basic usage of BMAKE is the program name followed by the name
  32. of your makefile.  If you do not specify an extension for the makefile,
  33. ".BMK" is assumed.
  34.  
  35.      Examples: BMAKE MYFILE             (Assumes MYFILE.BMK)
  36.                BMAKE MAKEFILE.TXT       (Explicitly named)
  37.  
  38.      By default, BMAKE can handle up to 100 object/source comparisons and 10
  39. other commands per makefile.  If you need to increase these amounts, you can
  40. add the following switches to the command line AFTER the name of the
  41. makefile:
  42.  
  43.      /F:#   Where # is the maximum number of source/object Files to process.
  44.      /C:#   Where # is the maximum number of other Commands to process.
  45.  
  46.      Example:  BMAKE MYFILE.BMK /F:150 /C:25
  47.  
  48. These switches may also be used to *reduce* the default values if you are
  49. only processing a few files.  Reducing the values should not be neccessary.
  50.  
  51.  
  52. MAKEFILE SYNTAX:
  53.  
  54.      BMAKE files are plain ASCII text files.  There are no limits to what you
  55. can call your file (other than those imposed by DOS).  To help you identify
  56. your makefiles, it is recommended that you give them extensions of ".BMK".
  57.      
  58.      BMAKE commands are not case-sensitive, although any compiler options or
  59. run command parameters that you specify (see below) are passed to their
  60. respective programs just as you typed them in the event that these other
  61. programs are case-sensitive.
  62.  
  63. Comments:
  64.  
  65.      You can include comments in your makefile by starting any line with an
  66. apostrophe (').  This makes it easy to identify different sections of your
  67. makefile or to comment-out certain source files that you do not wish to
  68. compile right now.  In-line comments (comments that follow an actual command
  69. on the same line) are also supported.
  70.  
  71.      Examples: ' This line will be ignored by BMAKE!
  72.                MYPROG.OBJ | MYPROG.BAS  'From here on will be ignored also!
  73.  
  74. Specifying a Compiler:     
  75.  
  76.      The bulk of the makefile will be devoted to comparing your source code
  77. to the object files.  But first, you need to tell BMAKE the name of your
  78. compiler and what options you wish to apply to all the modules.
  79.  
  80.      BMAKE assumes that your compiler is called "BC.EXE" and resides in the
  81. current directory or one that is accessible through the DOS PATH environment
  82. variable.  If this is not the case, put the following command at the top of
  83. your makefile:
  84.  
  85.      COMPILER: <The path and name of your compiler goes here>
  86.              ^ This colon marks the end of the keyword & start of the value.
  87.  
  88.      Example:  COMPILER: C:\QB45\BIN\BC   (Do not include the extension)
  89.  
  90.      Whatever BMAKE finds after the first colon following the keyword is what
  91. it will accept as the value for that option.  Any spaces between the colon
  92. and the value are ignored.  This is true for all BMAKE keyword commands.
  93.  
  94.      Please note that BMAKE has only been tested with the BC compiler.  If
  95. you use a different compiler and it has a different command line syntax than
  96. BC.EXE, BMAKE may not work.  BMAKE calls the compiler like so:
  97.  
  98.      <compiler name> <source file> [options], <object file>;
  99.  
  100.      Example:  BC MYPROG.BAS /O/T/C:512, MYPROG.OBJ;
  101.  
  102. Specifying Compiler Options:     
  103.  
  104.      You may specify compiler options that will apply to all files in the
  105. list.  You can override or add to these options on a file by file basis.  If
  106. there are a number of options that will apply to most or all of your source
  107. files, issue this command in your makefile:
  108.  
  109.      OPTIONS: <Your compiler options go here>
  110.  
  111.      Example: OPTIONS: /O/T/C:512
  112.  
  113. Object/Source file comparisons:
  114.  
  115.      Once you have identified your compiler and any global compiler options
  116. to BMAKE, you will begin to list your object and source files that are to be
  117. compared.  The comparison lines take the following form:
  118.  
  119.      <Object filename> | <Source filename> [alternate compiler options]
  120.  
  121.      Example:  MYPROG.OBJ | MYPROG.BAS &/V
  122.  
  123. The pipe character (|) between the filenames identifies this as a comparison
  124. line to BMAKE.  The object file should be listed on the left, and the source
  125. on the right.  If you don't specify extensions, BMAKE assumes ".OBJ" and
  126. ".BAS" respectively.  The object file may have a different name than the
  127. source file.  You may also specify extended pathnames on the comparison line.
  128.  
  129.      Example:  C:\OBJ\MYPROG2 | C:\SOURCE\MYPROG
  130.  
  131.                (.OBJ & .BAS extensions assumed)
  132.  
  133.      BMAKE compares these two files, and if the source has been updated since
  134. the object file was created (or if the object file doesn't exist), it will
  135. (re)compile the source file.  If an extended path was specified for the
  136. object file, the new object file will be placed in that same directory.
  137.  
  138. Alternate Compiler Options:
  139.  
  140.      Additional or alternate compiler options may be specified on any of the 
  141. comparison lines.  These options must follow the source filename and must be
  142. separated from it by at least one space.  If you want to specify options in 
  143. addition to the global options, prefix them with an ampersand (&).  If you
  144. want to list options to be used instead of the global options, prefix them
  145. with an exclamation point (!).  Any spaces between the ampersand/exclamation
  146. and the text of the new options WILL BE INCLUDED when sent to the compiler.  
  147. Some compilers require spaces between the options, some don't.
  148.  
  149.      If you want additional options:
  150.  
  151.           MYPROG.OBJ | MYPROG.BAS & /S /X    (Will be separated from the
  152.                                    ^          global options by a space.)
  153.      If you want alternate options:
  154.  
  155.           MYPROG.OBJ | MYPROG.BAS !/V        (Will be used instead of the
  156.                                               global options.)
  157. Followup Commands:
  158.  
  159.      When your object/source comparisons are finished, you can invoke your
  160. linker or library manager to process the new objects.  Use the keyword
  161. "COMMAND:" followed by your command just like you would type it at the DOS
  162. prompt or in a batch file.  If you are calling a batch file, you must use the
  163. word "CALL" before the batch file's name or no further commands will be
  164. carried out.  BMAKE actually turns these COMMANDs into a batch file!  The
  165. main benefit of including your commands in the makefile rather than a
  166. separate batch file is that you only need to maintain one file.
  167.  
  168.      Examples: COMMAND: LINK @MYPROG.LNK
  169.                COMMAND: CALL MYBATCH         (Calling a batch file)
  170.                COMMAND: LIB MYLIB.LIB -+ NEWOBJ.OBJ;
  171.  
  172.      Note: Because the pipe character is used to identify comparison lines,
  173. do not include this character in your COMMANDs.  If you must use the pipe in
  174. a command, place it into a batch file and call the batch file.
  175.  
  176.  
  177. *****************************************************************************
  178. BMAKE is one of many freeware releases from HOMONCULOUS PROGRAMMING.
  179.  
  180. If you like/don't like it and wish to send comments to the author, please
  181. feel free to send me E-mail via CompuServe at 74220,2344.  I would be happy
  182. to hear from you.
  183. *****************************************************************************
  184.  
  185.  
  186. *** End of File BMAKE.TXT
  187.