home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / lisp / interpre / xlispplu / ndmake / make.doc next >
Encoding:
Text File  |  1987-11-28  |  52.2 KB  |  1,585 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                NDMAKE version 4.3
  9.                                ------------------
  10.                      Copyright (C) 1985, 1986 D. G. Kneller
  11.                               All rights reserved.
  12.  
  13.  
  14.      Table of contents
  15.      -----------------
  16.  
  17.           
  18.  
  19.      Introduction....................................................2
  20.      Requirements....................................................2
  21.      Synopsis........................................................3
  22.      Make description files..........................................3
  23.      Dependency and command lines....................................3
  24.      Macros..........................................................5
  25.      Default rules...................................................7
  26.      "dot targets" .IGNORE, .PRECIOUS, .SILENT, .SUFFIXES............8
  27.      Command prefixes -, @, !, >, >>.................................8
  28.          The loop prefix `!'.........................................9
  29.          Output to files `>' and `>>'................................9
  30.      VPATH..........................................................10
  31.      Options........................................................12
  32.      DOS commands, batch files, redirection and error codes.........13
  33.      Response files -- special handling of LINK and LIB.............14
  34.          1) LINK response files.....................................14
  35.          2) LIB response files......................................14
  36.      UNIX features..................................................15
  37.      Additional notes and technical information.....................16
  38.      Sample session.................................................17
  39.      Use of flags -t, -i, -n, -d, and -p............................19
  40.      Using MAKE without a makefile..................................20
  41.      Changes since version 3.0......................................21
  42.      Changes since version 4.0......................................21
  43.      Future directions for NDMAKE...................................22
  44.      USER-SUPPORTED SOFTWARE NOTIFICATION...........................23
  45.      Registration form for NDMAKE...................................24
  46.           
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                                     NDMAKE v4.3 page 2
  69.  
  70.  
  71.  
  72.  
  73.  
  74.      Introduction
  75.      ------------
  76.  
  77.      NDMAKE is an implementation of the UNIX(tm) program maintenance
  78.      utility called `make'.  It has the same syntax and all of the
  79.      capability.  If you are familiar with UNIX `make' you should have no
  80.      difficulties with NDMAKE.  Please note that NDMAKE is user supported
  81.      software.  Some advanced features have been disabled in the demo
  82.      version of NDMAKE.  Details for registering your copy are at the end
  83.      of this documentation.  In the rest of this documentation, NDMAKE will
  84.      often be referred to simply as MAKE.
  85.  
  86.      MAKE is a utility that helps you maintain programs, particularly
  87.      programs that are composed of several modules (files).  MAKE has
  88.      several features that make it very useful for software development:
  89.  
  90.      1) Once you describe the relationships between modules, MAKE will keep
  91.      track of them and only `make' those that are out of date with respect
  92.      to their sources.  You don't waste time figuring out which files
  93.      you've changed, which have to be recompiled, how to link them, ...
  94.  
  95.      2) Automatic response files for LINK and LIB.  Under MSDOS(tm),
  96.      commands must be shorter than the command line limit of 128
  97.      characters.  Since LINK is used often when doing modular programming,
  98.      MAKE knows about it specially and will automatically generate a
  99.      response file if the LINK command is longer than the limit.  MAKE will
  100.      do a similar thing with LIB.  See the section entitled "Response
  101.      files" for details.
  102.  
  103.      3) Detection of errors when running internal DOS commands.  Previous
  104.      versions of NDMAKE couldn't detect errors when DOS commands were run
  105.      or when IO redirection occurred because COMMAND.COM doesn't return a
  106.      proper error code (for DOS < 3.0).
  107.  
  108.      4) VPATH.  Often when doing program development you want to create
  109.      several slightly different versions of a program, but keep a common
  110.      set of sources.  For example, you may have to create machine specific
  111.      or memory model specific modules.  Using the VPATH feature of MAKE it
  112.      is possible to have sources in directories different from the current
  113.      directory and have MAKE find them.  Actually, VPATH is more powerful
  114.      (and complex) then that, so please see the VPATH section for details.
  115.  
  116.  
  117.      Requirements
  118.      ------------
  119.  
  120.      MAKE requires at least DOS 2.0 and uses a minimum of about 42000 bytes
  121.      of memory.  Since MAKE executes other programs from within itself,
  122.      this memory will be unavailable to them while MAKE is running.  Also,
  123.      MAKE uses the file time to determine which files are newer than others
  124.      so it is imperative that you either have a real-time clock or are
  125.      diligent about setting the time and date when you boot up.
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.                                                     NDMAKE v4.3 page 3
  136.  
  137.  
  138.  
  139.  
  140.  
  141.      Synopsis
  142.      --------
  143.  
  144.           make [ -f makefile ] [ options ] [ macros ] [ targets ]
  145.      
  146.      The [ ] delimit optional parameters.  [ options ] and [ macros ] will
  147.      be discussed later.
  148.  
  149.      MAKE executes commands in a MAKE description file to update one or
  150.      more targets.  The targets are typically the names of programs.  If no
  151.      -f option is present, the MAKE description file called `MAKEFILE' is
  152.      tried.  If makefile is `-', the keyboard (standard input) is used as
  153.      the makefile.  More than one -f option may appear.
  154.  
  155.      Make updates a target if it is older than the files it depends on, or
  156.      if the target does not exist.  If no targets are given on the command
  157.      line, the first target in the makefile is `made'.
  158.  
  159.  
  160.      MAKE description files
  161.      ----------------------
  162.  
  163.      MAKE uses 2 description files:  MAKE.INI and makefile.  The
  164.      description files consist of several entries:
  165.      
  166.           1) dependency and command lines
  167.           2) macro definitions
  168.           3) default rules
  169.           4) "dot commands"
  170.      
  171.      When MAKE starts up, it looks for an initialization file called
  172.      MAKE.INI.  This file usually contains only default rules and macro
  173.      definitions that you don't want to put in every makefile.  The current
  174.      directory is searched first, followed by directories along the PATH.
  175.      You customize your copy of MAKE by changing MAKE.INI.
  176.  
  177.      
  178.  
  179.  
  180.      1) Dependency and command lines
  181.      -------------------------------
  182.  
  183.      These are lines that specify the relationship between targets and
  184.      prerequisites, and how to update the targets.  The general form is:
  185.  
  186.      target [ target ... ] : [ prerequisites ]
  187.      [ <tab>command ]
  188.         ....
  189.  
  190.      where <tab> is the tab character.
  191.  
  192.      The first line of an entry is a blank-separated list of targets, then
  193.      a colon, then a list of prerequisite files.  All following lines that
  194.      begin with a tab are commands to be executed to update the target.  A
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                                     NDMAKE v4.3 page 4
  203.  
  204.  
  205.  
  206.  
  207.  
  208.      target with no prerequisites is considered up to date if it exists and
  209.      out of date if it doesn't exist.  When you do the `make' without any
  210.      arguments, the first target in makefile gets made.  A dummy target (a
  211.      file that never exists so is always out of date) is often used as the
  212.      first target when you wish to make several targets.
  213.  
  214.      Consider this makefile:
  215.      
  216.      all : target1.exe target2.exe
  217.      
  218.      target1.exe : ....
  219.           commands
  220.      
  221.      target2.exe : ....
  222.           commands
  223.  
  224.      Executing `make' with no arguments results in both target1.exe and
  225.      target2.exe being made.  This happens because MAKE always ensures all
  226.      prerequisites are up to date before it makes a target.  Here, the
  227.      target ALL has two prerequisite files - TARGET1.EXE and TARGET2.EXE.
  228.      First TARGET1.EXE then TARGET2.EXE get made, then MAKE checks if
  229.      either of these files are more current than ALL.  Since ALL doesn't
  230.      exist, both are newer than it, and the commands to update ALL will be
  231.      executed.  There are no commands for this example.
  232.  
  233.      As an further example, assume you have a program TEST.EXE that is
  234.      composed of modules MAIN.OBJ and SUB.OBJ.  Each of these depend on a
  235.      common include file, INCL.H, and on their respective `.c' files.  The
  236.      makefile might look like:
  237.  
  238.      test.exe : main.obj sub.obj
  239.           link main.obj sub.obj, test;
  240.  
  241.      main.obj : main.c incl.h
  242.           msc -AL main.c;
  243.  
  244.      sub.obj : sub.c incl.h
  245.           msc -AL sub.c;
  246.  
  247.      A target may appear on the left of more than one `colon' line, and it
  248.      will depend on all of the names on the right of the colon on those
  249.      lines, but only one command sequence may be specified for it.  An
  250.      example a little further down will show this.
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.                                                     NDMAKE v4.3 page 5
  270.  
  271.  
  272.  
  273.  
  274.  
  275.      2) Macros
  276.      ---------
  277.  
  278.      Makefile entries of the form:
  279.      
  280.      name = [value]
  281.      
  282.      are macro definitions.  Macros allow the association of a name and a
  283.      value.  Subsequent appearances of $(name) or ${name} are replaced by
  284.      value.  If name is a single character, the parentheses or braces are
  285.      optional.  Spaces between name and =, and between = and value are
  286.      ignored.  If value is not given, the macro value is a null string.
  287.      MAKE warns you if you use a macro that hasn't been defined.
  288.  
  289.      The previous example could have had:
  290.      
  291.      OBJS = main.obj sub.obj
  292.  
  293.      test.exe : $(OBJS)
  294.           link $(OBJS), test;
  295.  
  296.      $(OBJS) : incl.h         # main.obj and sub.obj depend on incl.h
  297.  
  298.      main.obj : main.c        # As well, main.obj depends on main.c
  299.           msc -AL main.c;     # There is only one command sequence which
  300.           echo Done           # may of course be several lines long.
  301.  
  302.      sub.obj : sub.c          # sub.obj depends on sub.c
  303.           msc -AL sub.c;
  304.  
  305.      MAKE evaluates macros only when needed, and the order in which macros
  306.      appear in a description file is insignificant.  Conventionally, all
  307.      definitions appear at the top of the description file.  If the same
  308.      name is defined more than once, the most recent definition is used.
  309.      The precedence of definitions is:
  310.  
  311.           1. command line definition    (highest)
  312.           2. makefile definition
  313.           3. MAKE.INI definition
  314.           4. environment definition     (lowest)
  315.  
  316.      If make.ini has macros MODEL=S and CFLAGS=-A$(MODEL) -Od, but you do:
  317.           A> make MODEL=L
  318.      then when it comes time to use CFLAGS, MAKE will expand CFLAGS as
  319.      `-AL -Od'.  This is because command line macros have the highest
  320.      precedence.  For command line macros that include spaces, place the
  321.      macro value in double quotes "":
  322.           A> make CFLAGS="-Od -Zi"
  323.  
  324.      The lowest precedence of macro is the environment definition.  This
  325.      refers to the environment variables put into the DOS environment with
  326.      the `SET variable = value' DOS command.  For example, you could refer
  327.      to the ${PATH} macro without defining it in make.ini or makefile.  Its
  328.      value comes out of the DOS environment.
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.                                                     NDMAKE v4.3 page 6
  337.  
  338.  
  339.  
  340.  
  341.  
  342.      MAKE will let you define a recursive macro:
  343.           macro1 = $(macro2)       # macro1 = the value of macro2
  344.           macro2 = $(macro1)       # macro2 = the value of macro1
  345.      but signals a `recursive macro' error if it tries to use it.
  346.  
  347.  
  348.      Predefined macros:
  349.  
  350.      There are 4 "run-time" macros.  These are:
  351.      
  352.           $@ - stands for the full target name
  353.           $? - stands for the list of prerequisites that are newer than
  354.                the target.
  355.           $* - stands for the root of the target name.  This is the part
  356.                after any path separators and before any extension.
  357.           $< - stands for the complete name of the file that satisfied
  358.                the default rule.
  359.  
  360.      $< is only valid within default rules.  $@, $? and $* can be used at
  361.      any time.
  362.           $(OBJS) : $*.c
  363.  
  364.      Macros $< and $@ can be modified with a `D' or an `F'.  `D' specifies
  365.      the directory part, and `F' the file part.  So if $< evaluates to
  366.      ..\make.c, ${<D} is ".." and ${<F} is "make.c".  In conjunction with
  367.      `D' and `F', $@ tells you everything about the target being made (its
  368.      full name, the directory it's in, and its name), and $< tells you
  369.      everything about the file being used to make the target.
  370.  
  371.      The macro `MFLAGS' gets filled in with the initial command line
  372.      options supplied to MAKE.  This can be used to invoke MAKE on
  373.      makefiles in subdirectories and pass along the options.  The macro
  374.      `CWD' gets filled in with the current working directory.  The macro
  375.      `$$' evaluates to the dollar sign, $.
  376.  
  377.      Macro `MAKE_TMP' has special meaning.  MAKE_TMP is the name of the
  378.      directory MAKE will use for temporary files (response files, batch
  379.      files, and error files).  If you wish, you can define MAKE_TMP in
  380.      terms of other macros or environment variables.  eg:
  381.           MAKE_TMP = $(TMP)
  382.  
  383.      A RAMdisk would be the best place for MAKE_TMP.  If you're running DOS
  384.      2.x, MAKE_TMP can't have any backslashes (path separators) in it.
  385.      This is because COMMAND.COM is incapable of executing batch files (or
  386.      for that matter, any executable files) if the filename contains path
  387.      separators.  DOS 3.x doesn't have this problem and there is no
  388.      restriction on MAKE_TMP.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                                                     NDMAKE v4.3 page 7
  404.  
  405.  
  406.  
  407.  
  408.  
  409.      3) Default rules
  410.      ----------------
  411.  
  412.      MAKE can use default rules to specify commands for files for which the
  413.      makefile gives no explicit commands.  A default rule tells MAKE how to
  414.      create a file with a particular extension from a file with the same
  415.      root name but another extension.  Default rules take the form:
  416.  
  417.      .from_extension.to_extension :
  418.           command
  419.           [command]
  420.            ...
  421.  
  422.      For example, to produce a `.obj' file from a `.c' file, the default
  423.      rule could be:
  424.  
  425.      .c.obj :
  426.           msc ${CFLAGS} $<;
  427.  
  428.      When MAKE finds a target with no commands, it looks for the first
  429.      possible name for which both a rule and a file exist.  There may be
  430.      several ways to produce a `.obj' file (eg from a compiler or from
  431.      MASM), and the order in which rules are attempted is specified by the
  432.      `.SUFFIXES' list.  This is a special target with a list of extensions.
  433.      For example:
  434.  
  435.      .SUFFIXES: .exe .obj .c .asm .for
  436.  
  437.      If MAKE was trying to make a TEST.OBJ file using a default rule, it
  438.      would first look for a `.c.obj' rule (since `.c' follows `.obj' in the
  439.      .SUFFIXES list).  If found it would check for the file TEST.C.  If the
  440.      file didn't exist, MAKE would look for a `.asm.obj' rule (and TEST.ASM
  441.      file), and finally a `.for.obj' rule (and TEST.FOR file).
  442.  
  443.      Assuming MAKE.INI contained the .c.obj rule and .SUFFIXES as defined
  444.      above, our previous example could be written more succinctly as:
  445.  
  446.      OBJS = main.obj sub.obj
  447.  
  448.      test.exe : $(OBJS)
  449.           link $(OBJS), test;
  450.  
  451.      $(OBJS) : incl.h
  452.  
  453.      Because of the default rules, MAIN.OBJ and SUB.OBJ implicitly depend
  454.      on files MAIN.C and SUB.C, respectively, as well as explicitly
  455.      depending on INCL.H.
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.                                                     NDMAKE v4.3 page 8
  471.  
  472.  
  473.  
  474.  
  475.  
  476.      4) "dot targets"
  477.      ----------------
  478.  
  479.      Besides the special target `.SUFFIXES' mentioned above, there are a
  480.      few other special targets that can be put in MAKE description files.
  481.  
  482.      .IGNORE - Commands returning nonzero status (ie. the errorlevel) cause
  483.                MAKE to terminate unless the special target `.IGNORE' is in
  484.                makefile or the command begins with `-' (hyphen).  The `-i'
  485.                option gives the same effect.
  486.  
  487.      .NOIG -   Normally, MAKE ignores the case of file names and macros.
  488.                This target tells MAKE to consider case important.
  489.  
  490.      .PRECIOUS - Break (control-C) and command errors cause the target
  491.                being worked on to be deleted if it's been changed unless
  492.                it's a prerequisite of the target `.PRECIOUS'.  For example:
  493.                
  494.                .PRECIOUS: nerase.exe
  495.  
  496.      .SILENT - Commands to be executed are printed when executed unless the
  497.                special entry `.SILENT' is in makefile, or the first
  498.                character of the command is `@'.  Equivalent to the `-s'
  499.                option.  For example:
  500.                
  501.                all.exe : 1.obj 2.obj 3.obj
  502.                     - link 1 2 3, tmp.exe;    # ignore any errors
  503.                     @ erase tmp.exe           # don't echo this line
  504.  
  505.      .SUFFIXES - As mentioned above, this gives the order in which to try
  506.                default rules.  Suffixes accumulate, so if we have the same
  507.                .SUFFIXES as listed above in make.ini, and the makefile had:
  508.                
  509.                     .SUFFIXES : .obj .pas
  510.                
  511.                the combined suffix list would look like:  .obj .pas .exe
  512.                .obj .c .asm .for.  A .SUFFIXES target with no suffixes
  513.                clears the list of suffixes.  A common source of errors when
  514.                using default rules is getting the order of .SUFFIXES wrong.
  515.                The default rule looks like .from.to but the .SUFFIXES entry
  516.                looks like .to ... .from.  Note the reversal in order!
  517.  
  518.  
  519.      Command prefixes -, @, !, >, >>
  520.      -------------------------------
  521.  
  522.      Commands may be prefixed with special characters.  `@' before a
  523.      command means not to print the command before executing it, `-' means
  524.      ignore the exit status (a number testable by "if errorlevel ...") that
  525.      is returned from the command.  Normally MAKE stops when a command
  526.      returns a non-zero error code.  `!' indicates the command will be
  527.      executed in a loop.  `>' and `>>' allow lines to be copied to a file.
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.                                                     NDMAKE v4.3 page 9
  538.  
  539.  
  540.  
  541.  
  542.  
  543.      The loop prefix `!'
  544.      -------------------
  545.  
  546.      MAKE performs a loop over a command if the command is prefixed with
  547.      `!'.  The command is executed once for each element of the macro $?,
  548.      and during execution the macro $? is set to that element.  Example:
  549.      x: 1 2 3
  550.           ! echo $?
  551.      
  552.      If 2 and 3 are more recent than x, then $? will initially have the
  553.      value "2 3".  The "echo $?" command will be executed twice, once with
  554.      $? equal to 2 and once with $? equal to 3.  The commands would be:
  555.      
  556.      echo 2
  557.      echo 3
  558.  
  559.  
  560.      Output to files `>' and `>>'
  561.      ----------------------------
  562.  
  563.      MAKE can write to files or devices by:
  564.      
  565.           >filename line1, line2, line3      # or
  566.           >>filename line1, ...
  567.      
  568.      Commas demark the lines of the file.  For `>', the file is opened as a
  569.      new file (old contents are destroyed), for `>>' the file is opened in
  570.      append mode.  For comma *not* to mean "make a new line", quote it with
  571.      a backslash (ie. \, will be a comma, not a new line).
  572.  
  573.      "filename" can also be the name of a device.  >con will cause output
  574.      to go to the console.  >prn will cause the lines to show up on your
  575.      printer.  There is a bug in DOS 2.x which often won't allow the
  576.      console to be opened for output.  To compensate, MAKE understands
  577.      "stdout" and "stderr".  Stdout and stderr both go to the screen, but
  578.      DOS can redirect stdout whereas stderr cannot be redirected.
  579.  
  580.      The prefixes are used like this:
  581.           @ echo Testing 1, 2, 3        # command isn't printed
  582.           -! echo Hi there              # ignore status and loop
  583.           @-!>> filename looping...     # silent, ignore, loop, and output
  584.  
  585.      `>' and`>>' must appear as the right-most prefixes (just before the
  586.      filename).  This is to allow macros to be used to change where output
  587.      will go -- macro expansion happens after checking for `-', `@' and
  588.      `!'.  You can do something like:
  589.           -$(out) Compiling ...
  590.      where "out" can be defined as ">stdout" for output to screen, ">prn"
  591.      for output to printer, or "echo" for echoing through COMMAND.COM.
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.                                                    NDMAKE v4.3 page 10
  605.  
  606.  
  607.  
  608.  
  609.  
  610.      VPATH
  611.      -----
  612.  
  613.           The VPATH macro specifies the directory names NDMAKE will use to
  614.      try to find files that don't have a path specification.  Where is this
  615.      useful?  One example is when you have a set of sources that are
  616.      conditionally compiled for different target machines or for different
  617.      memory modules.  You want to keep only 1 set of sources, but want to
  618.      compile them a variety of ways.  What you'd usually do is create
  619.      subdirectories for each different target machine and put a makefile in
  620.      each subdirectory with VPATH referring to the parent directory (.. in
  621.      MSDOS).  Then when NDMAKE looked for the sources, it would look in the
  622.      parent directory.  If VPATH isn't defined, only the current directory
  623.      is searched for files.  A sample VPATH is:
  624.  
  625.           VPATH = .;..
  626.  
  627.           This means ".", the current directory, is the first to be
  628.      searched and "..", the parent directory, is to be searched next.  A
  629.      semi-colon separates directory names.  In UNIX make, a colon is used,
  630.      but for compatability with DOS PATH, in NDMAKE a semicolon is used.
  631.  
  632.           When NDMAKE tries to find a file like "test.obj", it will look
  633.      first for ".\test.obj", then "..\test.obj".  The first file found is
  634.      used.  When NDMAKE is trying to find an implicit dependency, it
  635.      constructs a particular file (eg "test.c"), then tries each directory
  636.      in order to find the file.
  637.  
  638.           As an example, assume VPATH is as above, "test.c" is in the
  639.      parent directory and your default rule for .c.obj is:
  640.  
  641.           .c.obj:; cl -c $<
  642.  
  643.      When you type "make" from this directory, you would get:
  644.  
  645.           cl -c ..\test.c
  646.  
  647.           So far so good.  It turns out that Microsoft C is good about
  648.      putting the directory part of the file it's compiling on the include
  649.      path.  If that were not the case, and test.c included any "local"
  650.      files (eg "header.h"), then the compile might fail because header.h is
  651.      not in the current directory -- it's in the parent directory with the
  652.      sources.  For other compilers, you may want to use the new macro "<D"
  653.      which selects the directory component of <.  Your default rule could
  654.      be written as:
  655.  
  656.           .c.obj:; cl -c $< -I$(<D)
  657.  
  658.      and the compilation would be:
  659.  
  660.           cl -c ..\test.c -I..          # -I adds .. to the include path
  661.  
  662.           There are a few other new macros:  "<F", the file name component
  663.      of <; @D and @F, the directory and file components of @.  If VPATH is
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.                                                    NDMAKE v4.3 page 11
  672.  
  673.  
  674.  
  675.  
  676.  
  677.      not specified, <D will be "." and @D will be the directory component
  678.      of @ ("." if there is no directory component).  Also, <F will be the
  679.      same as < and @F will be the file component of @.
  680.  
  681.           Still with me?  It gets worse!  VPATH has to be a little trickier
  682.      than this.  What if you have many machine-INdependent files, and only
  683.      a few machine-DEpendent files?  You would like to keep the DEpendent
  684.      .obj files in the subdirectories and all sources and INdependent .obj
  685.      files in the parent directory.  Now your makefile in each subdirectory
  686.      looks something like:
  687.  
  688.           VPATH  = .;..
  689.           OBJS   = dep.obj main.obj indep.obj
  690.           DEFS   = -DIBMMONO
  691.           CFLAGS = $(DEFS) -AL
  692.      
  693.      ibmmono.exe: $(OBJS)
  694.           link $(OBJS), $@;
  695.  
  696.           Main.obj and indep.obj are found in ".."; dep.obj is found here
  697.      in "."; all source files are found in ".."  The compilation goes
  698.      smoothly, but when it comes time for the link, $(OBJS) expands to:
  699.  
  700.           dep.obj main.obj indep.obj
  701.  
  702.      which fails since several of the .objs are in "..".  What we want is:
  703.  
  704.           dep.obj ..\main.obj ..\indep.obj
  705.  
  706.           Therefore, NDMAKE *translates* each command to include the actual
  707.      path to the file!!  This could lead to confusion, but I think you'll
  708.      agree it's a powerful necessity.  To prevent wierdness, macros @, @D,
  709.      @F, <, <D, <F, and * are never translated.  Otherwise some of them
  710.      wouldn't be much use.  So now the link proceeds with:
  711.  
  712.           link dep.obj ..\main.obj ..\indep.obj, ibmmono.exe;
  713.  
  714.           Punctuation may prevent NDMAKE from translating a name.  If a
  715.      name should be translated but it isn't, try separating the name from
  716.      any punctuation with whitespace.  For example, when using overlays
  717.      with Microsoft Link the object modules go in parenthesis -- NDMAKE
  718.      won't translate a name like (main.obj) but does fine on ( main.obj ).
  719.  
  720. |         The demo version of NDMAKE, MAKE43D.EXE, only accepts 1 directory
  721. |    name for use in VPATH.  This is to allow you to see what it can do but
  722. |    encourage you to register.
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.                                                    NDMAKE v4.3 page 12
  739.  
  740.  
  741.  
  742.  
  743.  
  744.      Options
  745.      -------
  746.  
  747.      Options (also known as flags) are entered on the command line with a
  748.      `-' or `/'.  Options can be grouped together after a single `-', so
  749.      -dp is equivalent to -d -p.
  750.  
  751.           -d   Debug mode.  Traces MAKE as it executes, printing the time
  752.                difference between each file and the target that has it as a
  753.                prerequisite.  Also, automatically generated batch and
  754.                response files will not be deleted.
  755.  
  756.           -h   Prints a help screen.
  757.  
  758.           -i   Ignore errors.  Equivalent to the special entry .IGNORE.
  759.                Causes a nonzero exit status to be ignored.  Doing
  760.                `make -i > errs' collects all error messages into 1 file.
  761.                Interrupting `make -i' may require several control-Cs.
  762.  
  763.           -k   Keep going.  When a command returns nonzero status, abandon
  764.                work on the current target, but continue on branches that do
  765.                not depend on the current target.
  766.  
  767.           -n   No execute.  Display but do not execute the commands needed
  768.                to update the targets.
  769.  
  770.           -p   Print information on macros, dependencies, and *available*
  771.                default rules.  A rule is available if it is defined in a
  772.                .from.to target and there are .to and .from extensions in
  773.                .SUFFIXES in the correct order (.to to the left of .from).
  774.  
  775.           -q   Query.  Sets MAKE's exit status to 1 if there are things to
  776.                be made and 0 if there aren't.
  777.  
  778.           -r   Remove default rules.  Actually clears .SUFFIXES after
  779.                MAKE.INI has been read.  The effect of this is to prevent
  780.                MAKE from using default rules other than those in makefile.
  781.  
  782.           -s   Silent mode.  Equivalent to the special entry .SILENT.
  783.                Commands are not displayed before being executed.
  784.  
  785.           -t   Touch, i.e. set the file time of the out of date targets to
  786.                the current time without executing any commands.  This will
  787.                create target files of length zero if they do not exist.
  788.                MAKE `touches' files just like the included TOUCH.EXE
  789.                program.  The small tutorial included later in this
  790.                documentation shows how to use this flag.
  791.  
  792.           -u   Unconditional make.  All specified targets are made whether
  793.                they are out of date or not.
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.                                                    NDMAKE v4.3 page 13
  806.  
  807.  
  808.  
  809.  
  810.  
  811.      DOS commands, batch files, redirection and error codes
  812.      ------------------------------------------------------
  813.  
  814.      Skip this section if you are running DOS 3.0 or higher.
  815.  
  816.      MAKE depends on a program's exit status (a number testable with the
  817.      "if errorlevel ..." command in DOS) to determine whether or not an
  818.      error has occurred.  An exit status of 0 means no error.  In order for
  819.      MAKE to execute internal DOS commands (like copy, chdir, ...), run
  820.      batch files, or perform IO redirection (with >, >>, |, or <), MAKE
  821.      must start a second copy of COMMAND.COM and have that copy execute the
  822.      command.  For DOS versions older than 3.0, COMMAND.COM *always*
  823.      reports an exit status of zero, implying no error has occurred.  MAKE
  824.      compensates for this by using an error file to communicate the exit
  825.      status back to MAKE.  The error file's name is put into the
  826.      environment so your batch files can refer to it as %MAKE_ERR%.
  827.  
  828.      When MAKE needs to start up another copy of COMMAND.COM it builds a
  829.      batch file and has COMMAND.COM execute the file.  If you interrupt the
  830.      batch file with CONTROL-BREAK you may get the prompt "Terminate BATCH
  831.      file ? (y/n)".  Answer `y' and MAKE will know an error has occurred.
  832.  
  833.      After MAKE gets control back from the batch file, it detects an error
  834.      by checking for the error file.  If the file exists, an error has
  835.      occurred; if the file is absent, the batch file finished successfully.
  836.      If you use your own batch files from MAKE they have to be modified
  837.      slightly to send the exit status back to MAKE.  This is because DOS
  838.      won't return to MAKE's batch file after your's has finished.  The
  839.      following line, placed at the end of your batchfile, is needed:
  840.  
  841.           if exist %MAKE_ERR% do erase %MAKE_ERR%
  842.  
  843.      To get a little fancier, your batch file could look like:
  844.      
  845.           command1
  846.           if errorlevel 1 goto end
  847.           command2
  848.           if errorlevel 1 goto end
  849.           if exist %MAKE_ERR% do erase %MAKE_ERR%
  850.           :end
  851.  
  852.      As you can see, the error file gets erased only if command1 and
  853.      command2 execute without error.
  854.  
  855. |    The demo version of NDMAKE, MAKE43D.EXE, does not have this feature.
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.                                                    NDMAKE v4.3 page 14
  873.  
  874.  
  875.  
  876.  
  877.  
  878.      Response files -- special handling of LINK and LIB
  879.      --------------------------------------------------
  880.  
  881.      Some programs (notable LINK and LIB) can receive their input from a
  882.      file called a response file.  Usually a response file is used when the
  883.      length of the command line becomes longer than DOS allows.  In program
  884.      development, the LINK and LIB commands are used very often and MAKE
  885.      generates a response file automatically when required.
  886.  
  887.  
  888.      1) LINK response files
  889.      ----------------------
  890.  
  891.      When a program name has the root name "LINK" and a command line longer
  892.      than DOS allows, MAKE generates a response file and has LINK use the
  893.      response file.  Your command:
  894.           link $(OBJS), test.exe,, $(LIBS)
  895.      will work without modification no matter how long the line becomes.
  896.  
  897.  
  898.      2) LIB response files
  899.      ---------------------
  900.  
  901.      Similar to a LINK response file, but slightly more complex to
  902.      compensate for LIB's syntax.  MAKE takes the LIB command:
  903.           lib libname [/pagesize] operations ... [, listing] [, newlib]
  904.      
  905.      and generates a response file with the most recent operation placed
  906.      between each object module.  For example:
  907.           lib my.lib -+ main.obj sub1.obj sub2.obj + sub3.obj ;
  908.      
  909.      becomes:
  910.           lib @responsefile
  911.      
  912.      where the response file has the contents:
  913.           my.lib
  914.           -+ main.obj -+ sub1.obj -+ sub2.obj + sub3.obj ;
  915.      
  916.      This is most useful when you want to update a library when some of its
  917.      modules have been recompiled.  For example, if "my.lib" depends on
  918.      modules LIBOBJS then the following updates the library with only those
  919.      modules which have been changed since the library was last written:
  920.  
  921.      my.lib: $(LIBOBJS)
  922.           lib my.lib -+ $? ;  # $? expands to the prerequisites more recent
  923.                               # than the target
  924.  
  925.      When a library doesn't exist yet, MAKE will tell LIB to create it.
  926.      Note that the `>' prefix can be used to write response files for
  927.      commands other than LIB and LINK.
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.                                                    NDMAKE v4.3 page 15
  940.  
  941.  
  942.  
  943.  
  944.  
  945.      UNIX features
  946.      -------------
  947.  
  948.      As with UNIX `make', dependency lines and default rules can have a
  949.      command on the same line as the `colon' line, provided the command
  950.      follows a semicolon:
  951.  
  952.      .c.obj:; msc $<;
  953.      test.exe: $(OBJS); link $(OBJS) , test;
  954.           @echo done
  955.  
  956.      # are equivalent to
  957.  
  958.      .c.obj:
  959.           msc $<;
  960.      test.exe: $(OBJS)
  961.           link $(OBJS) , test;
  962.           @echo done
  963.  
  964.      If a name appears on a line with a double colon, `::', then the
  965.      command sequence following that line is performed only if the name is
  966.      out of date with respect to the names to the right of the double
  967.      colon, and is not affected by other double colon lines on which that
  968.      name may appear.  Consider the following makefile:
  969.  
  970.      1:: 2; echo 2
  971.      1:: 3; echo 3
  972.  
  973.      If 2 and 3 are more recent than 1, then "make -n 1" will result in:
  974.      echo 2
  975.      echo 3
  976.  
  977.      If 1 is more recent than 3, but 2 is newer than 1 the response is:
  978.      echo 2
  979.  
  980.      If 1 is more recent than both 2 and 3, the response will be:
  981.      Make: `1' is up to date.
  982.  
  983.      MAKE supports multiple commands on a single line if the command is
  984.      enclosed in parentheses () and the commands are separated by semi-
  985.      colons (use \; if you need a semi-colon to *not* be interpreted as a
  986.      command separator).  In fact, since each command line is executed in
  987.      its own shell, this is the only way to use DOS commands like "set" and
  988.      "chdir" so that they have any effect.  For example, doing "make x"
  989.      where the makefile looks like:
  990.           x:
  991.                chdir \tmp
  992.                copy *.* a:
  993.      
  994.      will copy the contents of the *current* directory, not \tmp, to drive
  995.      A.  This is because MAKE starts each command in the current directory.
  996.      The correct way to write this is:
  997.           x:
  998.                (chdir \tmp; copy *.* a:)
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.                                                    NDMAKE v4.3 page 16
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.      A batch file is always used to execute commands surrounded by (), even
  1013.      if there's only one command.  Thus, you can force MAKE to use
  1014.      COMMAND.COM for any command by putting the command in parentheses.
  1015.      One very interesting use of the () syntax is to create macros that
  1016.      expand to multiple-line commands!
  1017.  
  1018.  
  1019.      Additional notes and technical information
  1020.      ------------------------------------------
  1021.  
  1022.      Lines in a MAKE description file that are too long to fit on one line
  1023.      can be extended to the next line by putting backslash, `\', followed
  1024.      be <RETURN> as the last two characters of the line.  If you need a `\'
  1025.      as the last character, put a space or comment character somewhere
  1026.      after it on that line.  The longest single line MAKE can handle is 512
  1027.      bytes, but by using `\' to break up the line into shorter pieces,
  1028.      there is no limit to line length (except available memory).
  1029.  
  1030.      By default, case is unimportant, so `test.obj' and `TEST.OBJ' are the
  1031.      same.  If .NOIG is present these will no longer by the same.
  1032.  
  1033.      Everything on a line after the comment character, `#', is ignored.
  1034.  
  1035.      The character separating targets and dependents, `:', is also the
  1036.      character used for the drive separator in MSDOS.  To distinguish this
  1037.      colon from the drive separator, it must be followed by space or tab
  1038.      (eg: ), semicolon (eg:;), colon (eg::), or nothing (eg:<return>).  If
  1039.      you consistently use at least one space you will have no problem.
  1040.  
  1041.      If you type in a makefile from the keyboard (by using the command
  1042.      `make -f -'), put a ^Z (control-Z) followed by a <RETURN> as the last
  1043.      two characters.  This tells MAKE to stop reading from the keyboard.
  1044.  
  1045.      Targets defined in makefile take precedence over targets of the same
  1046.      name defined in MAKE.INI.  Targets defined in MAKE.INI can never be
  1047.      default targets.  "dot targets" can never be default targets.
  1048.  
  1049.      MAKE is stupid -- after the commands to update a target have been
  1050.      executed without error, MAKE assumes the target is up to date.  If you
  1051.      give commands that don't really update a target, MAKE doesn't know.
  1052.  
  1053.      When MAKE executes commands, such as `link', it checks if it's a DOS
  1054.      internal command, if it's a batch file, or if it involves IO
  1055.      redirection.  If so, MAKE loads a second copy of COMMAND.COM and
  1056.      passes it the command line.  Otherwise, MAKE tries to execute the
  1057.      command as a program (a .exe or .com file).  This is done to prevent
  1058.      loading COMMAND.COM unless absolutely necessary.  Also, MAKE uses
  1059.      environment variable "COMSPEC" to find COMMAND.COM so you can copy
  1060.      COMMAND.COM to your RAMdisk and set COMSPEC to point to that copy.
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.                                                    NDMAKE v4.3 page 17
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.      Sample session - what MAKE does when it's running
  1080.      -------------------------------------------------
  1081.  
  1082.      Assume you have the following MAKE.INI file and MAKEFILE.
  1083.  
  1084.  
  1085.      make.ini
  1086.      --------
  1087.  
  1088.      .SUFFIXES : .exe .obj .c .for .asm
  1089.      M = S
  1090.      CFLAGS = -A$M
  1091.  
  1092.      .c.obj:; cl ${CFLAGS} -c $<
  1093.  
  1094.      .obj.exe:; link $<, $@;
  1095.  
  1096.      .c.exe:
  1097.           cl ${CFLAGS} -c $<
  1098.           link $*.obj, $@;
  1099.           erase $*.obj
  1100.  
  1101.  
  1102.      makefile
  1103.      --------
  1104.  
  1105.      OBJS = main.obj sub.obj
  1106.  
  1107.      test.exe: $(OBJS)
  1108.           link $(OBJS), $@,, \lib\local;
  1109.  
  1110.      $(OBJS): incl.h
  1111.  
  1112.      sub.obj: sub.c
  1113.           cl $(CFLAGS) -Od -c sub.c
  1114.  
  1115.      install: test.exe
  1116.           copy test.exe $(BIN)          # BIN comes from the environment
  1117.  
  1118.      ----------
  1119.  
  1120.      Assume the following files are in your directory: MAIN.C, SUB.C,
  1121.      INCL.H.  When you type:
  1122.  
  1123.      A> make
  1124.  
  1125.      MAKE first reads MAKE.INI then MAKEFILE.  It sees the first target
  1126.      TEST.EXE and tries to make it.  But first, MAKE must know if the files
  1127.      that TEST.EXE depends on are up to date.  As TEST.EXE depends on
  1128.      several `.obj' files, and these `.obj' files also have dependents, the
  1129.      detailed procedure MAKE undergoes looks like this:
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.                                                    NDMAKE v4.3 page 18
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.      -Make TEST.EXE
  1147.           - there are explicit commands for making TEST.EXE so don't
  1148.             bother looking for implicit prerequisites.
  1149.           - TEST.EXE depends on MAIN.OBJ and SUB.OBJ.  Make these.
  1150.           - Make MAIN.OBJ
  1151.                - Since there are no explicit commands for MAIN.OBJ, check
  1152.                  for implicit prerequisites based on default rules.
  1153.                - Find rule `.c.obj' and file `main.c'.
  1154.                - Add MAIN.C to the prerequisites of MAIN.OBJ.
  1155.                - MAIN.OBJ depends on INCL.H and MAIN.C.  Make these.
  1156.                - Make INCL.H
  1157.                     - Since there are no explicit commands for making
  1158.                       INCL.H, check for implicit prerequisites.
  1159.                     - Since there is no `.h' suffix in .SUFFIXES, there are
  1160.                       no implicit prerequisites.
  1161.                     - There are no prerequisites, so INCL.H is up to date.
  1162.                - Make MAIN.C
  1163.                     - Since there are no explicit commands for making
  1164.                       MAIN.C, check for implicit prerequisites.
  1165.                     - Since there are no `.from_extension.c' rules, there
  1166.                       are no implicit prerequisites.
  1167.                     - There are no prerequisites, so MAIN.C is up to date.
  1168.                - Compare MAIN.OBJ with INCL.H and MAIN.C.  Since MAIN.OBJ
  1169.                  doesn't exist, it is out of date with respect to its
  1170.                  prerequisites, so execute the (default) command:
  1171.      
  1172.                  cl -AS -c main.c
  1173.      
  1174.           - MAIN.OBJ is up to date.
  1175.           - Make SUB.OBJ
  1176.                - There are explicit commands for making SUB.OBJ so don't
  1177.                  bother looking for implicit prerequisites.
  1178.                - SUB.OBJ depends on INCL.H and SUB.C.  Make these.
  1179.                - Make INCL.H
  1180.                     - MAKE already knows that INCL.H is up to date.
  1181.                - Make SUB.C
  1182.                     - Since there are no explicit commands to make SUB.C,
  1183.                       check for implicit prerequisites.
  1184.                     - Since there are no `.from_extension.c' rules, there
  1185.                       are no implicit prerequisites.
  1186.                     - There are no prerequisites, so SUB.C is up to date.
  1187.                - Compare SUB.OBJ with INCL.H and SUB.C.  Since SUB.OBJ
  1188.                  doesn't exist, it is out of date with respect to its
  1189.                  prerequisites, so execute the (explicit) command:
  1190.      
  1191.                     cl -AS -Od -c sub.c
  1192.      
  1193.           - SUB.OBJ is up to date.
  1194.           - Compare TEST.EXE with MAIN.OBJ and SUB.OBJ.  Since TEST.EXE
  1195.             doesn't exist, execute the command:
  1196.      
  1197.                link main.obj sub.obj, test.exe,,\lib\local;
  1198.  
  1199.      - TEST.EXE is up to date.
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.                                                    NDMAKE v4.3 page 19
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.      Assuming no errors occurred, when you now type `make' you will get the
  1214.      message that TEST.EXE is up to date.  If you edit SUB.C and change it,
  1215.      when you next type `make', MAKE will see that SUB.C is more recent
  1216.      than SUB.OBJ and recompile SUB.C.  MAKE will then see that SUB.OBJ is
  1217.      more recent than TEST.EXE and relink the files.
  1218.  
  1219.      If you type `make install', MAKE will ensure TEST.EXE is up to date,
  1220.      then copy it to your BIN directory.  BIN was assumed to be defined in
  1221.      your environment.
  1222.  
  1223.  
  1224.      Use of flags -t, -i, -n, -d, and -p
  1225.      -----------------------------------
  1226.  
  1227.      Now assume you edit INCL.H and make changes that only affect SUB.C
  1228.      (for example, you change the value of a #define but you don't have to
  1229.      edit SUB.C).  If you were now to type `make', MAKE would compile both
  1230.      SUB.C and MAIN.C.  To have MAKE only recompile SUB.C you do three
  1231.      things.  First, `make -t' to touch (update) all files.  You will see
  1232.      that MAKE touches MAIN.OBJ and SUB.OBJ, then TEST.EXE.  Now, `touch
  1233.      sub.c'.  This results in SUB.C being newer than SUB.OBJ.  Finally,
  1234.      `make' again.  Now MAKE will compile only SUB.OBJ, then link the
  1235.      files.
  1236.  
  1237.      The process of editing a common include file to change something that
  1238.      only affects one file occurs often enough that the `make -t' + `touch'
  1239.      + `make' procedure can save a lot of time.
  1240.  
  1241.      If you are changing an include file and also changing some of the `.c'
  1242.      files, then usually you edit the include file, do `make -t', edit the
  1243.      `.c' files, then do `make'.
  1244.  
  1245.      The `i' flag is useful for collecting all errors into a single file
  1246.      without stopping MAKE.  This is helpful when you're porting software
  1247.      and expect a lot of errors or when you make global changes that may
  1248.      produce a lot of errors (for example, changing a structure definition
  1249.      in an include file or changing from small to large code models).
  1250.  
  1251.      The `n' flag is used when you just want to see what MAKE will be
  1252.      doing.  This is useful if you've changed several modules, but forget
  1253.      which ones.  `make -n' shows which ones will be compiled.
  1254.  
  1255.      `d' and `p' are usually used in debugging.  If your MAKE doesn't seem
  1256.      to be doing what you think it should, use `d' to watch it compare each
  1257.      file with its prerequisites.  The time listed is relative to the
  1258.      target.  A time that begins with - means the prerequisite is older
  1259.      than the target; + means the prerequisite is newer.
  1260.  
  1261.      Usually `d' is used in conjunction with `n' and sometimes with `p'.
  1262.      `p' prints the values of MAKE's macros, targets, and default rules.
  1263.      The `p' flag causes MAKE to list only those rules that are reachable.
  1264.      If a rule you defined isn't listed and you think it should be, chances
  1265.      are you forgot to update .SUFFIXES.
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.                                                    NDMAKE v4.3 page 20
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.      Using MAKE without a makefile
  1281.      -----------------------------
  1282.  
  1283.      MAKE can be used in a limited fashion without having a makefile
  1284.      because it always reads MAKE.INI.  Assume you have a file called
  1285.      XYZZY.C and using the same MAKE.INI file described above, you type:
  1286.  
  1287.      A> make xyzzy.exe
  1288.  
  1289.      MAKE uses its default rule `.exe.c' to compile XYZZY.C ($<), link
  1290.      XYZZY.OBJ ($*.obj) to form XYZZY.EXE ($@), then erases XYZZY.OBJ.  If
  1291.      several `.exe' files exist in a directory and you have just finished
  1292.      editing some of their `.c' files, you could type:
  1293.  
  1294.      A> make *.exe
  1295.  
  1296.      and update only the `.exe' files that are out of date.  By adding more
  1297.      default rules to MAKE.INI, MAKE could invoke the FORTRAN compiler for
  1298.      `.for' files or MASM for `.asm' files.  In this way, MAKE can do the
  1299.      right thing for each type of file.
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.                                                    NDMAKE v4.3 page 21
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.      Changes since version 3.0
  1348.      -------------------------
  1349.  
  1350.      - The addition of LIB response files and of VPATH.
  1351.  
  1352.      - MAKE's ability to get back error codes for DOS internal commands and
  1353.      batch files.
  1354.  
  1355.      - Multiple commands on a single line.  This allows macros which expand
  1356.      into multiple line commands and also because:
  1357.  
  1358.      - Make always starts each separate command in the current directory
  1359.      with a separate shell.  This means "chdir" and "set" have to be used
  1360.      inside of multiple commands for them to have *any* effect.
  1361.  
  1362.      - Touch (the -t flag) was made to act exactly like the UNIX version.
  1363.      Previously it did not create a file if it did not exist.
  1364.  
  1365.      - Space can be used instead of tab before command lines.  This is
  1366.      compensation for some editors which do not do tabs.
  1367.  
  1368.      - MAKE_TMP was added for fast batch execution.
  1369.  
  1370.      - The prefix `+' (to tell MAKE to start up COMMAND.COM) was removed.
  1371.      For the same purposes, use parenthesis instead.  Since MAKE keeps an
  1372.      internal table of DOS commands the use of `+' for speed is no longer
  1373.      necessary.
  1374.  
  1375.      - Addition of -q (query flag).
  1376.  
  1377.      - Addition of D and F modifiers for macros @, and <.
  1378.  
  1379.  
  1380.      Changes since version 4.0
  1381.      -------------------------
  1382.  
  1383.      - Addition of:
  1384.           `>' and `!' prefixes for output to files and looping.
  1385.           -u flag for unconditional make.
  1386.           .NOIG to make macros and filenames case sensitive.
  1387.  
  1388.      - Bugfixes:
  1389.           VPATH was finding nonexisting files.
  1390.           Invalid complaining by VPATH for directories on another disk.
  1391.           / was used in filenames on calls to LINK when switchar was -.
  1392.                (LINK has / hardcoded for switches).
  1393.           Incorrect parsing of LIB commands caused MAKE to write garbage
  1394.                for the list file.
  1395.           No MAKE_TMP causing problems with batch files under DOS 2.0
  1396.  
  1397.      - Others:
  1398.           No batch file is used if ignoring errors when execking COMSPEC.
  1399.           Use findfirst rather than open to check for files and get their
  1400.                times.  This is much faster on networks.
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.                                                    NDMAKE v4.3 page 22
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.      Future directions for NDMAKE
  1415.      ----------------------------
  1416.  
  1417.           With the addition of VPATH, NDMAKE has taken a great step forward
  1418.      from other PC version of MAKE.  No doubt there will be bugs in the
  1419.      current implementation.  I anticipate adding much faster directory
  1420.      lookup when VPATH is in effect.  I may add a true batch mode (as
  1421.      opposed to "make -n" which doesn't generate response files).  As well,
  1422.      an automatic dependency generator is in the works.  System V UNIX just
  1423.      got an updated version of make and I will be bringing the most useful
  1424.      features to NDMAKE.  I'm currently testing a method to reduce the
  1425.      amount of memory NDMAKE uses from 42000 to about 2000(!) bytes.  This
  1426.      will be useful for recursive makes and where memory is short.
  1427.  
  1428.           I'm still considering adding archive support (especially ARC),
  1429.      but haven't decided how to do it quite yet.
  1430.  
  1431.           As always, I will entertain any suggestions from registered
  1432.      users.
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.                                                    NDMAKE v4.3 page 23
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.      USER-SUPPORTED SOFTWARE NOTIFICATION
  1482.      ------------------------------------
  1483.  
  1484.           If you like and use this program, I ask you to consider
  1485.      registering it.  The benefits of registration include the first update
  1486.      free.  Registered owners will get a response to any questions they may
  1487.      have.  Also, if you're registered I will consider any suggestions you
  1488.      may have.  I want NDMAKE to be the best MSDOS make available.
  1489.  
  1490.           The registration fee is $35.  To date, about 50 people have
  1491.      registered, so please consider registering your copy.  Commercial use
  1492.      of this program requires registration.  If you use NDMAKE in your
  1493.      work, you are required to register it.  Many thanks to those of you
  1494.      who have registered.
  1495.  
  1496.           Regardless of whether you register or not, you may freely copy
  1497.      and distribute this program for noncommercial purposes.  The programs,
  1498.      MAKE.EXE and TOUCH.EXE, the documentation, MAKE.DOC and TOUCH.DOC,
  1499.      and the initialization file, MAKE.INI, must all be distributed together.
  1500.      If you post this program to a public bulletin board, please put all the
  1501.      files in an ARChive called NDMAKE43.ARC.
  1502.  
  1503.           I hope you enjoy NDMAKE and find it a useful addition to your
  1504.      programming tools.  If you have any questions you can reach me at:
  1505.  
  1506.           US MAIL:  D. G. Kneller
  1507.                     1468 8th Ave
  1508.                     San Francisco, CA 94122
  1509.           PHONE:    (415) 476-8291 (days) 731-3108 (home)
  1510.           UUCP:     ...ucbvax!ucsfcgl!kneller
  1511.           ARPANET:  kneller@cgl.ucsf.edu
  1512.           BITNET:   kneller@ucsfcgl.BITNET
  1513.  
  1514.      ----------
  1515.  
  1516.      UNIX is a registered trademark of Bell Laboratories.
  1517.      MSDOS is a registered trademark of Microsoft Corp.
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.                                                    NDMAKE v4.3 page 24
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.      ---------------------------------------------------------------------
  1549.  
  1550.                        Registration form for NDMAKE v4.3 
  1551.  
  1552.      
  1553.  
  1554.      Name:               _________________________________________________
  1555.  
  1556.      Address:            _________________________________________________
  1557.  
  1558.      City, State, Zip:   _________________________________________________
  1559.  
  1560.      Country:            _________________________________________________
  1561.  
  1562.      
  1563.  
  1564.      OPTIONAL: System description (computer, memory, DOS version)
  1565.  
  1566.      _____________________________________________________________________
  1567.  
  1568.      _____________________________________________________________________
  1569.  
  1570.      
  1571.  
  1572.      COMMENTS: Please feel free to add your thoughts or suggestions!
  1573.  
  1574.      _____________________________________________________________________
  1575.  
  1576.      _____________________________________________________________________
  1577.  
  1578.      _____________________________________________________________________
  1579.  
  1580.      _____________________________________________________________________
  1581.  
  1582.      
  1583.  
  1584.      Mail to:
  1585.  
  1586.                          D. G. Kneller
  1587.                          1468 8th Ave
  1588.                          San Francisco, CA 94122
  1589.                          U.S.A
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.