home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / PAMAKE18.ZIP / PAMAKE.DOC < prev    next >
Text File  |  1989-09-30  |  32KB  |  615 lines

  1. /*************************************************************************
  2. |                                                                        |
  3. |   PAMAKE.DOC Version  1.80                                    30.09.89 |
  4. |                                                                        |
  5. |   PAMAKE Documentation (c) 1988-9 Roundhill Computer Systems Limited   |
  6. |                                                                        |
  7. *************************************************************************/
  8.  
  9. Introduction
  10. ============
  11.  
  12. PAMAKE is a `free' utility distributed with Roundhill's PANEL Plus II screen
  13. management product.  This is the documentation file for PAMAKE.
  14.  
  15. This program was originally based on Neil Russell's public domain make utility, 
  16. but has been extensively rewritten and enhanced for use with PANEL Plus II.
  17.  
  18. PAMAKE is distributed without any warranty of any kind, either expressed or
  19. implied.  Neither the authors nor anyone else who has been involved in the
  20. creation, production or delivery of this program shall be liable for any
  21. direct, indirect, consequential or incidental damages arising out of the use
  22. of, or inability to use, this program.
  23.  
  24. Roundhill Computer Systems claims no rights to the PAMAKE source code or to
  25. the name `PAMAKE', but this documentation file is Copyright (c) 1988, 1989 
  26. Roundhill Computer Systems Limited.  Permission is granted to reproduce the 
  27. text of this file in connexion with personal use of PAMAKE.  We respectfully 
  28. ask that if you modify the PAMAKE source code and then re-publish the source 
  29. code, you should use a name other than `PAMAKE' to identify it, and write your 
  30. own documentation for it.  We do not authorise the distribution or publishing 
  31. of this copyright documentation file except when it accompanies the unmodified
  32. complete source of PAMAKE.  Alternatively, if you tell us about changes and 
  33. enhancements you make, we would be pleased to consider incorporating them them 
  34. in a future version.  That way everyone can benefit from all the enhancements.
  35.  
  36. History
  37. =======
  38.  
  39. In the first releases of PANEL Plus we distributed a `makefile' with each set 
  40. of compiler-specific files.  We deliberately included the actual makefile used 
  41. to build the library, so that there would be no possibility of sending out a 
  42. makefile which did not match the distribution libraries:  but the make utility 
  43. we were then using for development (Lattice Make (LMK)) has a lot of features 
  44. which are not supported by other `make' utilities so the makefiles often had 
  45. to be extensively adapted to run in user environments.
  46.  
  47. We then obtained a public domain make source and revised it with substantial
  48. enhancements to meet the minimum requirements for our own development.  The
  49. result was the PAMAKE program which is now included with the library source
  50. for DOS, OS/2 and VMS versions of PANEL Plus to help to build the libraries, 
  51. and which we may supply in a future PANEL Plus release for other operating 
  52. systems also.
  53.  
  54. If the PAMAKE utility is used to build PANEL Plus II applications it should 
  55. only be necessary to make very small changes to the supplied makefiles to 
  56. customise them to specific develpment environments.
  57.  
  58. The source code for Neil Russell's make is available on BIX and elsewhere, 
  59. both in its original form and as modified by Cheyenne Wills and others.  The 
  60. source code for PAMAKE is also available on BIX as PAMAKEnn.ARC in the 
  61. "roundhill/listings" area.  The `nn' indicates the version number, for example
  62. PAMAKE17 for version 1.7.
  63.  
  64. Version 1.3 changes:
  65.  
  66.     -  tidied the source code so that it compiles with only two warnings under 
  67.        Microsoft C version 5.1.
  68.  
  69.     -  added one more built-in macro, PAMAKE_OS, which currently can take the 
  70.        values "DOS", "OS2" or "VMS".  This allows makefiles to be used easily 
  71.        (with variations) in more than one environment.  We also made a VMS 
  72.        version, and added some notes about it below.
  73.  
  74. Version 1.4 changes: 
  75.  
  76.     -  added a special expansion of $* as a dependency name.  Thanks to Erin 
  77.        McDonald for suggesting this enhancement.
  78.  
  79. Version 1.5 changes:  
  80.  
  81.     -  fixed a problem involving the recursive application of dependency rules.
  82.        Earlier versions would not apply a second dependency rule automatically 
  83.        if it took multiple steps to build a target and only the first file was 
  84.        present.  We also added the `%exit' special command, and the $(HOME) 
  85.        built-in macro, and made a default of `pamake' for the $(MAKE) macro.
  86.  
  87. Version 1.6 changes:
  88.  
  89.     -  added a test for selected DOS internal commands, and also command-line 
  90.        redirection.  Thanks to M. F. Winiberg for these suggestions.  
  91.  
  92.     -  added a SIGINT trap.  
  93.  
  94.     -  modified the source to build a `family' (DOS and OS/2 combined) version
  95.        of PAMAKE using Lattice C, which is so much better at this task than 
  96.        you-know-who.  In the Lattice C version, all timestamps are held 
  97.        internally in `file time' format rather than `time_t' format.
  98.  
  99. Version 1.7 changes:
  100.  
  101.     - again fixed the problem with recursive application of dependency rules, 
  102.       which was not fully dealt with in 1.5.
  103.  
  104.     - removed the SIGINT function 'brk', which conflicts with a standard 
  105.       library name in the new VMS C version 3.0.  We have also found that
  106.       trying to set BREAK ON causes problems with Lattice, so we removed
  107.       that too.  We recommend setting BREAK ON to make it easier to break
  108.       out of runaway make operations.
  109.  
  110.     - fixed a minor bug caused by the use of high-bit characters for `$*' 
  111.       processing: because they are not Ascii characters, ANSI specifies that 
  112.       the macro `isspace' returns an undefined value.  Also repaired the 
  113.       $? macro, which was broken.
  114.  
  115.     - the local input file processor now allows "\<" as a code to place a "<"
  116.       in the file.  This allows recursive calling of PAMAKE using a local 
  117.       input file to create the makefile.
  118.  
  119.     - if a command cannot be executed, the target is now automatically made 
  120.       `precious'.  This prevents files being deleted for example if you make a 
  121.       mistake in your path setting.  The target is also forced to be precious 
  122.       if -n is used with a recursive call to pamake.
  123.  
  124.     - a new command-line switch, `-c', has been added to force a re-read 
  125.       of the file time after the commands to build it are complete.  This 
  126.       allows PAMAKE to respond correctly to commands such as ARC, which may 
  127.       leave the file time set to something different from the current time.
  128.  
  129.     - a new pseudo-command, `%stat' has been added to force a re-read of
  130.       the file time of the filename following the command.  This allows PAMAKE
  131.       to respond correctly if you use a command to delete or modify a file
  132.       other than the current target.
  133.  
  134. Version 1.8 changes:
  135.  
  136.     - Fixed conditional processing which could still process text inside the
  137.       `else' half of a true condition.
  138.  
  139.     - Added support for Borland Turbo C.  Tidied all the file time processing
  140.       into a separate module `mtime.c'.
  141.  
  142.     - PAMAKE no longer ignores `interrupted' if the ignore flag is set.
  143.  
  144. PAMAKE enhancements
  145. ===================
  146.  
  147. The principal enhancements we needed to incorporate were the ability to set DOS 
  148. environment variables from within PAMAKE (which we require to handle the
  149. different environment settings of the many compilers we support with PANEL Plus 
  150. II), the ability to support development when the source files are in one 
  151. subdirectory and the objects and libraries are in another, support for include 
  152. files and conditional execution, and a `local input file' feature.  Some of the 
  153. features require considerable changes to the way inference rules and special 
  154. macros are processed, but the result is as compatible with Unix make as 
  155. possible.
  156.  
  157. The `local input file' allows link and library command files to be set up
  158. dynamically (and macro-expanded).  This feature ensures that all the commands
  159. to build a project can be included in one makefile, and avoids having to use
  160. the DOS echo command (with a consequent reduction in efficiency).
  161.  
  162. The operation of PAMAKE is closely modelled on the Unix `make', and in
  163. particular is completely different from the operation of the make utility
  164. supplied with Microsoft C version 5.1.  The latter requires commands to be 
  165. listed in execution sequence, and then applies the normal dependency tests to 
  166. decide whether to execute each one.  In contrast PAMAKE requires the principal 
  167. target to be listed first (or named on the command line) and recursively tests 
  168. all the other makefile statements to determine automatically the particular 
  169. commands to execute and their sequence.
  170.  
  171. Using PAMAKE
  172. ============
  173.  
  174. The command line syntax can be determined by executing:
  175.  
  176.             PAMAKE -?
  177.  
  178. and the built-in macros, rules and suffixes by executing:
  179.  
  180.             PAMAKE -f - -p <NUL
  181.  
  182. This documentation file contains full details of the PAMAKE enhancements, and
  183. a brief summary of the principles of operation of a traditional Unix make
  184. utility.  For a full explanation of the operation of a `make' you are referred
  185. to a standard Unix reference manual.  The principal make features not currently
  186. included in PAMAKE are the following:                             ~~~
  187.  
  188.     - The $% special macro [library member name]
  189.     - The D and F special macro modifiers [directory part and file part]
  190.     - SCCS file and archive file support
  191.     - The -k and -b command-line switches
  192.     - There are no built-in macros such as CC=cc
  193.  
  194. PAMAKE special features
  195. =======================
  196.  
  197. Enhancements in PAMAKE and differences from Unix `make' include the following:
  198.  
  199.     - If a macro name begins with `+' then the `+' is removed and the macro
  200.       definition is also placed in the `environment' for the commands executed
  201.       by PAMAKE.  This feature allows setting of command paths, include file
  202.       paths, and special compiler environment variable switches automatically,
  203.       instead of in an AUTOEXEC file or manually.  Nested macros in the
  204.       environment variable value are expanded at the time it is defined, that
  205.       is once, when the macro is first processed.  If the macro is also used
  206.       as a regular macro any nested macros are expanded in the normal way at
  207.       the time the macro is used.  Macro names starting with `+' are placed
  208.       in the execution environment even if the -e switch prevents their
  209.       overriding a macro definition of the same name already present in the
  210.       initial environment.  This feature is not supported in VMS: if a macro
  211.       name begins with `+' the `+' is ignored.
  212.       
  213.     - Whitespace is deleted between a macro definition and a comment starting
  214.       with #.  This makes it much easier to document makefiles.  Many Unix
  215.       `makes' do not do this.
  216.  
  217.     - If a command line starts with `+' then it is invoked using a `system'
  218.       function instead of being spawned directly.  This enables internal DOS
  219.       commands to be used.  The most often used DOS and OS/2 commands are
  220.       also detected automatically.  Currently this list includes ECHO, DEL,
  221.       ERASE, MD, MKDIR, REN, RENAME and COPY.  If you need other DOS commands,
  222.       you should either use `+' or modify the source.  No DOS error code is 
  223.       available from commands executed through the `system' function, but OS/2 
  224.       does pass back error information.  Currently, the VMS version always 
  225.       uses the `system' call to spawn programs.
  226.  
  227.     - PAMAKE handles redirection for commands not executed through `system'.
  228.       The symbols processed are "<", ">", ">>", "2>", and "2>>".  The handle
  229.       `2' refers to stderr.  If you redirect both stdout and stderr, you must
  230.       use a different filename for each file.  Note that if you use the `+' 
  231.       flag or one of the automatically recognised DOS or OS/2 commands, the 
  232.       shell will process the redirection, not PAMAKE.
  233.  
  234.     - The Unix `make' only invokes the commands associated with inference
  235.       rules (eg with ".c.obj:") either when no specific dependency appears in
  236.       the makefile or when the specific dependency exactly matches what would
  237.       have been inferred (e.g. "foo.obj: foo.c") and no command lines follow.
  238.       PAMAKE extends the `exact match' to allow the inferred dependent name
  239.       to be a substring of the actual dependent name.  This may make little
  240.       sense without an example, but its effect is to allow inference rules and
  241.       corresponding commands to be used even if the source file is in a
  242.       different directory.  Here is the example:
  243.  
  244.           .c.obj:
  245.                   cl /c $<
  246.  
  247.            MYSRC=c:\mysrc
  248.  
  249.            foo.exe: foo1.obj foo2.obj
  250.                   link ...
  251.  
  252.            foo1.obj: $(MYSRC)\foo1.c
  253.  
  254.       The Unix make would execute the cl command for foo2 if foo2.c is in the
  255.       current directory, but would not execute cl for foo1 even if foo1.c is
  256.       in the mysrc directory.  PAMAKE will execute the cl command automatically
  257.       for both.  Note: case is significant in determining whether a substring 
  258.       condition exists.
  259.  
  260.     - The $< $* $@ and $? macros are always evaluated before processing a
  261.       command.  In Unix make the first two only apply to inference rules and
  262.       the second two only to explicit dependency lists.  The $< evaluates to
  263.       the complete `inferred' filename if an inference rule has been used.
  264.       Otherwise (i.e. if an explicit command line was supplied or if no
  265.       inference rule could be made) $< evaluates to the FIRST dependency file
  266.       listed for this target.  $* on a command line always evaluates to the 
  267.       filename part of $< (i.e. less the extension).
  268.  
  269.     - The special macro $- indicates, when found on a command line, that the
  270.       immediately following lines in the makefile are to be written to a
  271.       temporary file (with macro expansion) immediately prior to executing the
  272.       command.  This `local input file' must be terminated in the makefile by
  273.       a line containing the character `<' in the first column.  The $- macro is
  274.       expanded on the command line, and defaults to a value of `TEMP_LIF.TMP'
  275.       (but can be redefined).  This macro expansion is used as the file name
  276.       for the temporary file, so take care that it does not designate a file
  277.       you need to retain.  If $- evaluates to a null string, the default file
  278.       name TEMP_LIF.TMP is used for the file name but the macro expansion is
  279.       left as null.  A typical command line would be `LIB @$-' which tells LIB
  280.       that the filename TEMP_LIF.TMP contains the librarian commands.  The
  281.       temporary file is deleted after the command has finished, and is not
  282.       created if the -n switch has been given.  The string `\n' in a local
  283.       input file line is converted into an extra newline.
  284.  
  285.     - A special macro `$\' has been added which evaluates to a backslash (`\') 
  286.       except in the VMS version, when it is undefined.  If you use this macro 
  287.       to separate a path and a filename in your makefiles, instead of 
  288.       hardcoding a backslash, it will be easier to use parts of the makefile 
  289.       under VMS, where the backslash is not required.  The reason we create
  290.       this macro internally is that it is a little tricky to define it in
  291.       a makefile (think about how you would do it, and remember the line
  292.       continuation feature).
  293.  
  294.     - A special expansion of the macro `$*' is performed when the macro 
  295.       occurs in a dependency name.  The macro is expanded to the basename
  296.       of the current target.  This allows makefiles of the form:
  297.  
  298.               OBJS= obj1.obj obj2.obj ...
  299.               $(OBJS): \other\$*.c hdr.h
  300.                       cl -Fo$@ $<
  301.  
  302.       In the above example, $* evaluates to `obj1' for the target `obj1.obj',
  303.       and to `obj2' for the target `obj2.obj' etc.  When the command is 
  304.       actually performed, `$<' expands to `\other\obj1.c' etc.
  305.  
  306.     - A line starting (in column 1) with the string:  #include  is a signal to
  307.       the input routine to attempt to open an `include' file.  The whole of
  308.       the remainder of the input line is taken to be the file name, which
  309.       should NOT be enclosed in double quote characters or angle brackets.
  310.       PAMAKE does not search multiple directories for the file:  since the
  311.       makefile specifies all such directories, we assume that at the very
  312.       least you know where the include files are when you write the makefile.
  313.       For convenience, PAMAKE does accept and expand any macros in the
  314.       filename.  Include files may be nested to a depth of four levels.  The
  315.       #include line may be placed anywhere in the input file except
  316.       immediately following a line ending in `\'.  If the `#' does not start
  317.       in column 1 it will be taken as a normal comment.  If you need to start
  318.       a line with `#include' (for example in a local input file) the use of
  319.       an escape (`\#include') will allow this.
  320.  
  321.     - Conditional processing of makefile lines is supported.  Special `comment'
  322.       lines starting `#if', `#ifn', `#else' and `#endif' have the effect you
  323.       would expect on the lines they enclose.  The syntax for the statement on
  324.       `#if' and `#ifn' lines is exactly the same as a macro definition and
  325.       currently you can only test macro values, and only for equality.  Note
  326.       that a single equals sign is used as in the following example:
  327.  
  328.               #if M=s
  329.               MODEL=small
  330.               #endif
  331.  
  332.       The macro name on the left of the equality statement should NOT have
  333.       a `$' in front of it.  This conditional processing takes place when
  334.       the makefile is first read in, and a macro name on the left of the
  335.       conditional takes its value at the time the conditional is processed.
  336.       The right side of the conditional is macro-expanded before the test.
  337.       Conditionals may be nested up to ten levels deep.
  338.  
  339.     - Conditional processing of command lines is supported.  Special command
  340.       lines starting `%if', `%ifn', `%else' and `%endif' (following a tab)
  341.       have the effect you would expect on the command lines lines they enclose.
  342.       In addition a `%set' command line can be used to specify a macro
  343.       definition which is made dynamically.  The syntax for the statement on
  344.       `%if' and `%ifn' lines is exactly the same as a macro definition and
  345.       currently you can only test macro values, and only for equality.  Note
  346.       that a single equals sign is used as in the following example:
  347.  
  348.               %if @=foo.obj
  349.               %set CFLAGS=$(SPECIALFLAGS)
  350.               %else
  351.               %set CFLAGS=$(DEFAULTFLAGS)
  352.               %endif
  353.  
  354.       The macro name on the left of the equality statement should NOT have
  355.       a `$' in front of it.  This conditional processing takes place when
  356.       the command lines are executed, and a macro name on the left of the
  357.       conditional takes its value at the time the conditional is processed.
  358.       The right side of the conditional is macro-expanded before the test.
  359.       Conditionals may be nested up to ten levels deep.  Note that each
  360.       set of commands is processed separately and must be completed with
  361.       the correct number of `%endif' statements, or the processing of the
  362.       PAMAKE will be terminated.  Macros defined with the `%set' command
  363.       stay defined for any further commands executed in the PAMAKE run.
  364.       The special command `%exit' causes the make to be terminated 
  365.       immediately.  If a numeric value follows (e.g. `%exit 1') then it 
  366.       will be used as the exit code.  The special command `%stat filename'
  367.       causes PAMAKE to update the file time of `filename' if it is already
  368.       a target.
  369.  
  370.     - Special code has been inserted to handle the expansion of `$$' in a
  371.       macro.  Many Unix `make' programs do not correctly handle file names 
  372.       including a `$' character when the needed `$$' is in a macro which
  373.       gets expanded more than once.  The internal macro `$=$' which is 
  374.       normally used to expand the `$$' has been changed in PAMAKE to set the 
  375.       high bit of the replacement character, and the high bits are then 
  376.       stripped off before the result is actually used by PAMAKE.  If you have 
  377.       the PAMAKE source code, and if you never need the `$' in your makefiles,
  378.       you can save a little time and memory by undefining the symbol DOLLAR 
  379.       in H.H.  The `$$' macro call will still work, but only if it is not 
  380.       expanded more than once.
  381.       
  382.     - The `-t' switch for `touch' has been disabled for VMS.  Touching a file 
  383.       on VMS apparently cannot be done without making RMS calls, and the 
  384.       concept is not really a useful one in a system which retains multiple 
  385.       versions of files.
  386.  
  387. `Make' overview
  388. ===============
  389.  
  390. For the benefit of users who are unfamiliar with make and do not have access
  391. to Unix manuals, a very brief description of the PAMAKE features follows.
  392. These features are common to most full `make' implementations.
  393.  
  394.     Command-line syntax:
  395.  
  396.       PAMAKE [-f filename] [-deinpqrst] [macro=value ...] [target(s) ...]
  397.  
  398.       Command-line switches can be combined in one string or entered as
  399.       individual tokens in any order and intermixed with macro definitions.
  400.       If the -f switch is given, the next following command line token will
  401.       be taken as the file name.  If entered, target names must follow all the
  402.       switches and macro definitions.
  403.  
  404.     Command-line switches:
  405.  
  406.       -f filename  Name of makefile (default is "makefile", "-" is stdin)
  407.       -c           Confirm target timestamp after building
  408.       -d           Print timestamps of files as they are analysed
  409.       -e           Environment has priority over makefile macros
  410.       -i           Ignore all exit status values
  411.       -n           Execute no commands except $(MAKE)
  412.       -p           Print all macros and targets
  413.       -q           Question if target is up-to-date, exit(1) if not
  414.       -r           Do not use the inbuilt rules
  415.       -s           Make silently
  416.       -t           Touch files instead of making them
  417.       -v           Prints version information
  418.  
  419.     The MAKEFLAGS environment variable:
  420.  
  421.       The environment variable MAKEFLAGS can contain a string consisting of
  422.       `-' followed by any of the flags `einqrst' which are processed as if
  423.       they appeared on the command line.  An environment variable MAKEFLAGS
  424.       containing the current settings of these flags is always passed on to
  425.       commands executed by PAMAKE.
  426.  
  427.     Macros:
  428.  
  429.       On the command line, or in the makefile, you can use "str1=str2" to
  430.       define a macro.  Macros are expanded with the syntax "$(str1)".  The
  431.       parentheses may be omitted if str1 is a single character.  Case is
  432.       significant.  If str1 is preceded by a `+' it is put in the DOS or OS/2
  433.       environment as "STR1=str2", for the duration of the make execution only.
  434.       Any existing environment variables at the start of the PAMAKE run are
  435.       also available as macros.
  436.  
  437.     Macro redefinition and priority:
  438.  
  439.       A macro given on the command line cannot be redefined.  Macros defined
  440.       in the makefile override environment variables with the same name unless
  441.       the `-e' flag is given, but do not override the environment used for the
  442.       commands executed by make unless they are preceded by a `+'.
  443.  
  444.     Macro value substitution:
  445.  
  446.       Macros in the makefile may also be expanded using the syntax:
  447.  
  448.             $(str1:subst1=subst2)
  449.  
  450.       The above expression specifies that the macro named `string1' should be 
  451.       expanded, and that in the expansion text all occurrences of `subst1' 
  452.       should be replaced by `subst2'.  If the equals sign and second 
  453.       substitution string are omitted then `subst1' is deleted.
  454.  
  455.     Target - Dependency - Commands specification:
  456.  
  457.       The basic syntax in the makefile is as follows:
  458.  
  459.            target:  dep1 dep2 dep3 ...
  460.                    command1
  461.                    command2
  462.                    ...
  463.  
  464.       Command lines must start with a tab.  Target/Dependency lines may be
  465.       continued by placing `\' at the end of the line.  Comments start with
  466.       `#' and continue to the end of the line.  If `#' is required in a
  467.       makefile line it must be escaped as `\#'.
  468.  
  469.       PAMAKE executes the commands to make the target if any of the dependent
  470.       files have a later timestamp than the target, or if the target is not
  471.       found.  If no targets are specified on the command line PAMAKE builds
  472.       the first target encountered in the makefile.  The makefile is analysed
  473.       recursively so that any dependencies of a target are also built in
  474.       the correct sequence.
  475.  
  476.       In a line not beginning with a tab, the first `:' character delimits
  477.       the target name.  A colon in a target name (e.g. a drive separator)
  478.       can be escaped as `\:'.  Colons are permitted in dependancy names.
  479.  
  480.     Multiple command sequences:
  481.  
  482.       Multiple target:dependancy sets may be defined for a single target, but
  483.       normally a target may only be associated with one list of commands.  If
  484.       the target and dependancy names are separated with `::' instead of `:',
  485.       however, each such line may be followed by a set of commands.  The
  486.       first such set of commands is executed for which a dependancy name is
  487.       later than the target.  This allows for alternatative methods of
  488.       building a target depending on what files have changed.
  489.  
  490.     Special command prefixes:
  491.  
  492.       If a command is preceded by a special prefix character, special
  493.       processing occurs.  Multiple prefix characters may be used.  The
  494.       characters are as follows:
  495.  
  496.           +  execute this command through the command processor
  497.           -  ignore error exit codes for this command
  498.           @  execute this command silently
  499.  
  500.       If you need to use a command which starts with one of the special
  501.       prefix characters, you can escape it with `\'.  This feature may be 
  502.       needed to run a VMS command file using the `@' command.
  503.  
  504.     Inference rules:
  505.  
  506.       The special target ".suff1.suff2" specifies how to make a file with
  507.       suffix suff2 from a file with a matching basename and with the suffix
  508.       suff1.
  509.  
  510.       As explained above, PAMAKE interprets `a matching basename' to mean that
  511.       the target basename should be a substring of the dependency file
  512.       basename.
  513.  
  514.       When the dependency file is in the same directory as the target, it is
  515.       unnecessary to specify the dependency explicitly because PAMAKE will use
  516.       the built-in or supplied inference rules and suffixes list (see below)
  517.       to determine the correct command to execute.
  518.  
  519.     Special macros:
  520.  
  521.       $<     Expands to the main dependency filename which caused the current
  522.              actions to be carried out (see above).
  523.  
  524.       $*     On a command line, expands to the basename, without the suffix, 
  525.              of $<.  In a dependency, expands to the basename, without the
  526.              suffix, of the current target.  In the latter case, the 
  527.              expanded name will be different for each of multiple targets.
  528.  
  529.       $@     The current target
  530.  
  531.       $?     The list (whitespace-separated) of dependency names which are
  532.              out-of-date with respect to the target
  533.  
  534.       $-     Defaults to expand to TEMP_LIF.TMP.  In a command line, indicates
  535.              that the immediately following lines up to and not including the
  536.              first line starting with `<' in column 1 are to be placed in a
  537.              file which will have a name which is the expansion of the $-
  538.              macro.  This file will be created immediately before executing the
  539.              command in which the $- appears, and deleted afterwards.  If the
  540.              $- macro evaluates to a null string, the default name
  541.              TEMP_LIF.TMP is used for the file name instead of the macro
  542.              expansion.
  543.  
  544.       $(MAKE)  If specified in a command, causes the command to be executed
  545.              even if `-n' has been given.  This allows a `super-make' to call
  546.              nested PAMAKE commands, passing the `-n' flag through MAKEFLAGS.
  547.              $(MAKE) defaults to a value of `pamake'.
  548.  
  549.       $(HOME)  The current working drive and directory when the make started.
  550.  
  551.     Special targets:
  552.  
  553.       .PRECIOUS       Dependents of this target will not be removed when the
  554.                       make is interrupted.
  555.  
  556.       .SILENT         Same as -s option
  557.  
  558.       .IGNORE         Same as -i option
  559.  
  560.       .DEFAULT        Used to specify commands to be used when a target is to
  561.                       be built and no explicit commands or built-in rules can
  562.                       be applied.
  563.  
  564.       .SUFFIXES       The dependants of .SUFFIXES are suffixes which are
  565.                       applied in turn to the basename until one is found for
  566.                       which an inference rule is present for which the created
  567.                       file exists.  If dependants of .SUFFIXES are present
  568.                       they are added to the built-in suffixes list; otherwise
  569.                       the list is cleared.
  570.  
  571.     Built-in rules:
  572.  
  573.       PAMAKE has a number of built-in rules for creating object files from
  574.       various different types of source file.  All are implemented using
  575.       macros (eg the command for  .c.$O:  is $(CC) $(CFLAGS) $(CFILES) ).
  576.       Unlike Unix make, the definitions of the macros such as O and CC are not
  577.       built-in and must be defined in the makefile.  This allows for the
  578.       variety of command and suffix names found outside the Unix environment.
  579.       There is also a rule for code generation which can be used with the PANEL
  580.       Plus C code genrator PANGENC.  The only built-in suffixes are .c, .asm
  581.       and .pnl.
  582.  
  583.     Performance issues:
  584.  
  585.       The number of suffixes directly affects the performance of PAMAKE:
  586.       since there is a built-in rule for `.pnl.c', each time a `.c' file is
  587.       referenced PAMAKE must search for a `.pnl' file in case one is to be
  588.       inferred.  To speed up PAMAKE, you can remove the .pnl suffix by
  589.       specifying an empty `.SUFFIXES' and then one containing only .c (and
  590.       .asm, if needed).  For example:
  591.  
  592.              .SUFFIXES:                 # clear suffixes list
  593.              .SUFFIXES: .c .asm         # search only for these
  594.  
  595.       If you make this change, you will have to insert an explicit PANGENC
  596.       command in the makefile every time it is needed to process a .pnl file.
  597.  
  598. Postscript
  599. ==========
  600.  
  601. As a final note, please remember that Roundhill is in the business of screen
  602. management, not make utilites, and that PAMAKE is provided free of charge to
  603. simplify your program development.  We shall attempt to fix any bugs in PAMAKE
  604. which are reported, but it is not a `commercial product' and we do not plan to
  605. enhance it to compete with full-featured make utilites already available on
  606. the market.  Our modified source code is available in the same way as the 
  607. original public domain source.
  608.  
  609. Unix is a trademark of AT&T Bell Labs.
  610.  
  611.  
  612. Roundhill Computer Systems Limited
  613. POB 14 Marlborough Wiltshire SN8 1LG England
  614. BIX: join roundhill
  615.