home *** CD-ROM | disk | FTP | other *** search
/ The Don Maslin Archive / maslin_archive.zip / AARDVARK_Tape_Backups / maslin_c_d_3oct95 / ddrive / sydex / build.doc < prev    next >
Text File  |  1989-12-08  |  3KB  |  86 lines

  1.  
  2.            BUILD - BUILD A PROGRAM
  3.  
  4.               Copyright 1988
  5.                Sydex
  6.             153 North Murphy Ave.
  7.             Sunnyvale, CA  94086
  8.                (408) 739-4866
  9.  
  10.     BUILD constructs a program or file    from a series of definitions,
  11.     similar to, but more simply than UNIX "make".
  12.  
  13.     An ASCII text file containing instructions on how to build the
  14.     result(s) must be created using some sort of text editor.  Any
  15.     file name may be used, but its extension must be ".BF".
  16.  
  17.     The rules for writing a BUILD instruction file are simple:
  18.  
  19.     (1) A keyword is one of the following words in uppercase
  20.         letters -
  21.  
  22.         MAKE
  23.         BUILD
  24.         NOTE
  25.         FROM
  26.         BY
  27.  
  28.         MAKE and BUILD are taken as synonyms.
  29.  
  30.     (2) Words and names in a build file must be separated by
  31.         spaces, tabs or line boundaries.
  32.  
  33.     (3) NOTE begins a comment; all text is ignored until another
  34.         keyword is found.
  35.  
  36.     The general form of a BUILD statement is:
  37.  
  38.     BUILD result-file FROM source-file1 source-file2...source-file3
  39.     BY
  40.     DOS-command1
  41.     DOS-command2
  42.     DOS-command3
  43.  
  44.     BUILD examines each source file and compares the date of its last
  45.     modification with the date on the result file.  If the result file
  46.     is older than any of the source files, the list of DOS commands is
  47.     executed.  Otherwise (the result is younger than its sources), the
  48.     DOS commands are skipped.
  49.  
  50.     There is no practical limit to the number of BUILD statements in a
  51.     BUILD instruction file.
  52.  
  53.     If the word FROM and the list of source files is omitted, the list
  54.     of DOS commands is always executed.     Each DOS command must be on a
  55.     line by itself.
  56.  
  57.     The source file names may contain * and ? "wild-card" specifications.
  58.  
  59.     BUILD is invoked from DOS by -
  60.  
  61.     BUILD build-file
  62.  
  63.     or -
  64.  
  65.     BUILD build-file result-file
  66.  
  67.     The first form looks at the entire BUILD file and brings all of the
  68.     result files up to date.  The second form brings only the indicated
  69.     result file up to date.
  70.  
  71.     If, during BUILD execution, a DOS command returns an error code, BUILD
  72.     terminates and exits to DOS.
  73.  
  74.     As an example, suppose an "ARC"-type archive file needs to be maintained
  75.     from the file in the subdirectory "\MYCODE".  The BUILD instuction file
  76.     might look like this:
  77.  
  78.     NOTE
  79.         This file builds the archive \ARCS\MYARC.ARC from the files
  80.         in \MYCODE.
  81.     BUILD \arcs\myarc.arc FROM \mycode\*.* BY
  82.     pkarc a \arcs\myarc.arc \mycode\*.*
  83.  
  84.     BUILD is an utterly simple tool featuring simple syntax and straight-
  85.     forward operation.    It gets used all the time at Sydex.
  86.