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