[comp.sources.misc] v15i065: dmake version 3.6

dvadura@watdragon.waterloo.edu (Dennis Vadura) (10/15/90)

Posting-number: Volume 15, Issue 65
Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
Archive-name: dmake-3.6/part13

#!/bin/sh
# this is part 13 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file man/dmake.p continued
#
CurArch=13
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
     exit 1; fi
( read Scheck
  if test "$Scheck" != $CurArch
  then echo "Please unpack part $Scheck next!"
       exit 1;
  else exit 0; fi
) < s2_seq_.tmp || exit 1
echo "x - Continuing file man/dmake.p"
sed 's/^X//' << 'SHAR_EOF' >> man/dmake.p
X
X     --ee   Read the environment and define all strings of the form
X          'EENNVV--VVAARR=_e_v_a_l_u_e' defined within as macros whose name is
X          EENNVV--VVAARR, and whose value is '_e_v_a_l_u_e'.  The environment
X          is processed prior to processing the user specified
X          makefile thereby allowing definitions in the makefile
X          to override definitions in the environment.
X
X
X
XVersion 3.50                    UW                              1
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     --EE   Same as -e, except that the environment is processed
X          after the user specified makefile has been processed
X          (thus definitions in the environment override defini-
X          tions in the makefile).  The -e and -E options are
X          mutually exclusive.  If both are given the latter one
X          takes effect.
X
X     --ff ffiillee
X          Use ffiillee as the source for the makefile text.  Only one
X          --ff option is allowed.
X
X     --hh   Print the command summary for ddmmaakkee.
X
X     --ii   Tells ddmmaakkee to ignore errors, and continue making other
X          targets.  This is equivalent to the .IGNORE attribute
X          or macro.
X
X     --kk   Causes ddmmaakkee to ignore errors caused by command execu-
X          tion and to make all targets not depending on targets
X          that could not be made. Ordinarily ddmmaakkee stops after a
X          command returns a non-zero status, specifying --kk causes
X          ddmmaakkee to ignore the error and continue to make as much
X          as possible.
X
X     --nn   Causes ddmmaakkee to print out what it would have executed,
X          but does not actually execute the commands.  A special
X          check is made for the string "$(MAKE)" inside a recipe
X          line, if found, the line is expanded and invoked,
X          thereby enabling recursive makes to give a full
X          description of all that they will do.  The check for
X          "$(MAKE)" is disabled inside group recipes.
X
X     --pp   Print out a version of the digested makefile in human
X          readable form.  (useful for debugging, but cannot be
X          re-read by ddmmaakkee)
X
X     --PP##  On systems that support multi-processing cause ddmmaakkee to
X          use _# concurrent child processes to make targets.  See
X          the "MULTI PROCESSING" section for more information.
X
X     --qq   Check and see if the target is up to date.  Exits with
X          code 0 if up to date, 1 otherwise.
X
X     --rr   Tells ddmmaakkee not to read the initial startup makefile,
X          see STARTUP section for more details.
X
X     --ss   Tells ddmmaakkee to do all its work silently and not echo
X          the commands it is executing to stdout (also suppresses
X          warnings).  This  is equivalent to the .SILENT attri-
X          bute or macro.
X
X
X
X
X
XVersion 3.50                    UW                              2
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     --SS   Force sequential execution of recipes on architectures
X          which support concurrent makes.  For backward compati-
X          bility with old makefiles that have nasty side-effect
X          prerequisite dependencies.
X
X     --tt   Causes ddmmaakkee to touch the targets and bring them up to
X          date without executing any commands.
X
X     --TT   Tells ddmmaakkee to not perform transitive closure on the
X          inference graph.
X
X     --uu   Force an unconditional update.  (ie. do everything that
X          would be done if everything that a target depended on
X          was out of date)
X
X     --vv   Verbose flag, when making targets print to stdout what
X          we are going to make and what we think it's timestamp
X          is.
X
X     --VV   Print the version of ddmmaakkee, and values of builtin mac-
X          ros.
X
X     --xx   Upon processing the user makefile export all non-
X          internally defined macros to the user's environment.
X          This option together with the -e option allows SYSV
X          AUGMAKE recursive makes to function as expected.
X
XIINNDDEEXX
X     Here is a list of the sections that follow and a short
X     description of each.  Perhaps you won't have to read the
X     whole man page to find what you need.
X
X     SSTTAARRTTUUPP            Describes ddmmaakkee initialization.
X
X     SSYYNNTTAAXX             Describes the syntax of makefile expres-
X                        sions.
X
X     AATTTTRRIIBBUUTTEESS         Describes the notion of attributes and
X                        how they are used when making targets.
X
X     MMAACCRROOSS             Defining and expanding macros.
X
X     RRUULLEESS AANNDD TTAARRGGEETTSS  How to define targets and their prere-
X                        quisites.
X
X     RREECCIIPPEESS            How to tell ddmmaakkee how to make a target.
X
X     TTEEXXTT DDIIVVEERRSSIIOONNSS    How to use text diversions in recipes and
X                        macro expansions.
X
X     SSPPEECCIIAALL TTAARRGGEETTSS    Some targets are special.
X
X
X
X
XVersion 3.50                    UW                              3
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     SSPPEECCIIAALL MMAACCRROOSS     Macros used by ddmmaakkee to alter the pro-
X                        cessing of the makefile, and those
X                        defined by ddmmaakkee for the user.
X
X     CCOONNTTRROOLL MMAACCRROOSS     Itemized list of special control macros.
X
X     RRUUNN--TTIIMMEE MMAACCRROOSS    Discussion of special run-time macros
X                        such as $@ and $<.
X
X     FFUUNNCCTTIIOONN MMAACCRROOSS    GNU style function macros, only $(mktmp
X                        ...) for now.
X
X     DDYYNNAAMMIICC PPRREERREEQQUUIISSIITTEESS
X                        Processing of prerequisites which contain
X                        macro expansions in their name.
X
X     BBIINNDDIINNGG TTAARRGGEETTSS    The rules that ddmmaakkee uses to bind a tar-
X                        get to an existing file in the file sys-
X                        tem.
X
X     PPEERRCCEENNTT((%%)) RRUULLEESS   Specification of recipes to be used by
X                        the inference algorithm.
X
X     MMAAKKIINNGG IINNFFEERREENNCCEESS  The rules that ddmmaakkee uses when inferring
X                        how to make a target which has no expli-
X                        cit recipe.  This and the previous sec-
X                        tion are really a single section in the
X                        text.
X
X     MMAAKKIINNGG TTAARRGGEETTSS     How ddmmaakkee makes targets other than
X                        libraries.
X
X     MMAAKKIINNGG LLIIBBRRAARRIIEESS   How ddmmaakkee makes libraries.
X
X     MMUULLTTII PPRROOCCEESSSSIINNGG   Discussion of ddmmaakkee''ss parallel make
X                        facilities for architectures that support
X                        them.
X
X     CCOONNDDIITTIIOONNAALLSS       Conditional expressions which control the
X                        processing of the makefile.
X
X     EEXXAAMMPPLLEESS           Some hopefully useful examples.
X
X     CCOOMMPPAATTIIBBIILLIITTYY      How ddmmaakkee compares with previous versions
X                        of make.
X
X     LLIIMMIITTSS             Limitations of ddmmaakkee.
X
X     PPOORRTTAABBIILLIITTYY        Comments on writing portable makefiles.
X
X     FFIILLEESS              Files used by ddmmaakkee.
X
X
X
X
XVersion 3.50                    UW                              4
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     SSEEEE AALLSSOO           Other related programs, and man pages.
X
X     AAUUTTHHOORR             The guy responsible for this thing.
X
X     BBUUGGSS               Hope not.
X
XSSTTAARRTTUUPP
X     When ddmmaakkee begins execution it first processes the command
X     line and then processes an initial startup-makefile.  This
X     is followed by an attempt to locate and process a user sup-
X     plied makefile.  The startup file defines the default values
X     of all required control macros and the set of default rules
X     for making inferences.  When searching for the startup
X     makefile, ddmmaakkee searches the following locations, in order,
X     until a startup file is located:
X
X          1.   The location given as the value of the macro MAK-
X               ESTARTUP defined on the command line.
X
X          2.   The location given as the value of the environment
X               variable MAKESTARTUP defined in the current
X               environment.
X
X          3.   The location given as the value of the macro MAK-
X               ESTARTUP defined internally within ddmmaakkee.
X
X     The above search is disabled by specifying the -r option on
X     the command line.  An error is issued if a startup makefile
X     cannot be found and the -r option was not specified.  A user
X     may substitute a custom startup file by defining the MAKES-
X     TARTUP environment variable or by redefining the MAKESTARTUP
X     macro on the command line.  To determine where ddmmaakkee looks
X     for the default startup file, check your environment or
X     issue the command _"_d_m_a_k_e _-_V_".
X
X     A similar search is performed to locate a default user
X     makefile when no --ff command line option is specified.  The
X     special target .MAKEFILES is defined by default.  This
X     target's prerequisite list specifies the names of files and
X     the order that ddmmaakkee will use to search for them when
X     attempting to locate the default makefile.  A typical defin-
X     ition for this target is:
X
X          .MAKEFILES : makefile.mk Makefile makefile
X
X     ddmmaakkee will first look for makefile.mk and then the others.
X     If a prerequisite cannot be found ddmmaakkee will try to make it
X     before going on to the next prerequisite.  For example,
X     makefile.mk can be checked out of an RCS file if the proper
X     rules for doing so are defined in the startup file.
X
X
X
X
X
XVersion 3.50                    UW                              5
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
XSSYYNNTTAAXX
X     This section is a summary of the syntax of makefile state-
X     ments.  The description is given in a style similar to BNF,
X     where { } enclose items that may appear zero or more times,
X     and [ ] enclose items that are optional.  Alternative pro-
X     ductions for a left hand side are indicated by '->', and
X     newlines are significant.  All symbols in bboolldd type are text
X     or names representing text supplied by the user.
X
X
X
X          Makefile -> { Statement }
X
X          Statement -> Macro-Definition
X                    -> Conditional
X                    -> Rule-Definition
X                    -> Attribute-Definition
X
X          Macro-Definition -> MMAACCRROO == LLIINNEE
X                           -> MMAACCRROO **== LLIINNEE
X                           -> MMAACCRROO ::== LLIINNEE
X                           -> MMAACCRROO **::== LLIINNEE
X                           -> MMAACCRROO ++== LLIINNEE
X                           -> MMAACCRROO ++::== LLIINNEE
X
X          Conditional ->  ..IIFF expression
X                             Makefile
X                          [ ..EELLSSEE
X                             Makefile ]
X                          ..EENNDD
X
X          expression -> LLIINNEE
X                     -> SSTTRRIINNGG ==== LLIINNEE
X                     -> SSTTRRIINNGG !!== LLIINNEE
X
X
X          Rule-Definition ->  target-definition
X                                 [ recipe ]
X
X          target-definition -> targets [attrs] op { PPRREERREEQQUUIISSIITTEE } [;; rcp-line]
X
X          targets -> target { targets }
X                  -> ""target"" { targets }
X
X          target -> special-target
X                 -> TTAARRGGEETT
X
X          attrs -> attribute { attrs }
X                -> ""attribute"" { attrs }
X
X          op -> :: { modifier }
X
X
X
X
XVersion 3.50                    UW                              6
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X          modifier -> ::
X                   -> ^^
X                   -> !!
X                   -> --
X
X          recipe -> { TTAABB rcp-line }
X                 -> [@@][%%][--] [[
X                       { LLIINNEE }
X                    ]]
X
X          rcp-line -> [@@][%%][--][++] LLIINNEE
X
X
X          Attribute-Definition -> attrs :: targets
X
X
X          attribute -> ..EEPPIILLOOGG
X                    -> ..IIGGNNOORREE
X                    -> ..LLIIBBRRAARRYY
X                    -> ..MMKKSSAARRGGSS
X                    -> ..NNOOIINNFFEERR
X                    -> ..PPRREECCIIOOUUSS
X                    -> ..PPRROOLLOOGG
X                    -> ..SSEETTDDIIRR==_p_a_t_h
X                    -> ..SSIILLEENNTT
X                    -> ..SSEEQQUUEENNTTIIAALL
X                    -> ..SSWWAAPP
X                    -> ..UUSSEESSHHEELLLL
X                    -> ..SSYYMMBBOOLL
X                    -> ..UUPPDDAATTEEAALLLL
X
X          special-target -> ..EERRRROORR
X                         -> ..EEXXPPOORRTT
X                         -> ..GGRROOUUPPEEPPIILLOOGG
X                         -> ..GGRROOUUPPPPRROOLLOOGG
X                         -> ..IIMMPPOORRTT
X                         -> ..IINNCCLLUUDDEE
X                         -> ..IINNCCLLUUDDEEDDIIRRSS
X                         -> ..MMAAKKEEFFIILLEESS
X                         -> ..RREEMMOOVVEE
X                         -> ..SSOOUURRCCEE
X                         -> ..SSOOUURRCCEE.._s_u_f_f_i_x
X                         -> ._s_u_f_f_i_x_1._s_u_f_f_i_x_2
X
X
X     Where, TTAABB represents a <tab> character, SSTTRRIINNGG represents
X     an arbitrary sequence of characters, and LLIINNEE represents a
X     possibly empty sequence of characters terminated by a non-
X     escaped (not immediately preceded by a backslash '\') new-
X     line character.  MMAACCRROO, PPRREERREEQQUUIISSIITTEE, and TTAARRGGEETT each
X     represent a string of characters not including space or tab
X     which respectively form the name of a macro, prerequisite or
X
X
X
XVersion 3.50                    UW                              7
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     target.  The name may itself be a macro expansion expres-
X     sion.  A LLIINNEE can be continued over several physical lines
X     by terminating it with a single backslash character.  Com-
X     ments are initiated by the pound '##' character and extend to
X     the end of line.  All comment text is discarded, a '#' may
X     be placed into the makefile text by escaping it with '\'
X     (ie. \# translates to # when it is parsed).  A group of con-
X     tinued lines may be commented out by placing a single # at
X     the start of the first line of the group.  A continued line
X     may not span more than one makefile.
X
X     wwhhiittee ssppaaccee is defined to be any combination of <space>,
X     <tab>, and the sequence \<nl> when \<nl> is used to ter-
X     minate a LINE.  When processing mmaaccrroo definition lines, any
X     amount of white space is allowed on either side of the macro
X     operator (=, *=, :=, *:=, += or +:=), and white space is
X     stripped from both before and after the macro value string.
X     The sequence \<nl> is treated as white space during recipe
X     expansion and is deleted from the final recipe string.  You
X     must escape the \<nl> with a \ in order to get a \ at the
X     end of a recipe line.  The \<nl> sequence is deleted from
X     macro values when they are expanded.
X
X     When processing ttaarrggeett definition lines, the recipe for a
X     target must, in general, follow the first definition of the
X     target (See the RULES AND TARGETS section for an exception),
X     and the recipe may not span across multiple makefiles.  Any
X     targets and prerequisites found on a target definition line
X     are taken to be white space separated tokens.  The rule
X     operator (_o_p in SYNTAX section) is also considered to be a
X     token but does not require white space to precede or follow
X     it.  Since the rule operator begins with a `:', traditional
X     versions of make do not allow the `:' character to form a
X     valid target name.  ddmmaakkee allows `:' to be present in
X     target/prerequisite names as long as the entire
X     target/prerequisite name is quoted.  For example:
X
X          a:fred : test
X
X     would be parsed as TARGET = a, PREREQUISITES are fred, :,
X     and test, which is not what was intended.  To fix this you
X     must write:
X
X          "a:fred" : test
X
X     Which will be parsed as expected.  See the EXAMPLES section
X     for how to apply this to a list of targets.
X
XAATTTTRRIIBBUUTTEESS
X     ddmmaakkee defines several target attributes.  Attributes may be
X     assigned to a single target, a group of targets, or to all
X     targets in the makefile.  Attributes are used to modify
X
X
X
XVersion 3.50                    UW                              8
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     ddmmaakkee actions during target update.  The recognized attri-
X     butes are:
X
X
X     ..EEPPIILLOOGG     Insert shell epilog code when executing a group
X                 recipe associated with any target having this
X                 attribute set.
X
X     ..IIGGNNOORREE     Ignore an error when trying to make any target
X                 with this attribute set.
X
X     ..LLIIBBRRAARRYY    Target is a library.
X
X     ..MMKKSSAARRGGSS    If in an MSDOS environment then use MKS extended
X                 argument passing conventions to pass arguments
X                 to commands.  Non-MSDOS environments ignore this
X                 attribute.
X
X     ..NNOOIINNFFEERR    Any target with this attribute set will not be
X                 subjected to transitive closure if it is
X                 inferred as a prerequisite of a target whose
X                 recipe and prerequisites are being inferred.
X                 (i.e. the inference algorithm will not use any
X                 prerequisite with this attribute set, as a tar-
X                 get)
X
X     ..PPRREECCIIOOUUSS   Do not remove this target under any cir-
X                 cumstances.  Set by default for any targets
X                 whose corresponding files exist in the file sys-
X                 tem prior to the execution of ddmmaakkee.
X
X     ..PPRROOLLOOGG     Insert shell prolog code when executing a group
X                 recipe associated with any target having this
X                 attribute set.
X
X     ..SSEEQQUUEENNTTIIAALL Force a sequential make of the associated
X                 target's prerequisites.
X
X     ..SSEETTDDIIRR     Change current working directory to specified
X                 directory when making the associated target.
X                 You must specify the directory at the time the
X                 attribute is specified.  To do this simply give
X                 _._S_E_T_D_I_R_=_p_a_t_h as the attribute.  _p_a_t_h is expanded
X                 and the result is used as the value of the
X                 directory to change to.  If path is surrounded
X                 by single quotes then path is not expanded, and
X                 is used literally as the directory name.  If the
X                 _p_a_t_h contains any `:' characters then the entire
X                 attribute string must be quoted using ".  If a
X                 target having this attribute set also has the
X                 .IGNORE attribute set then if the change to the
X                 specified directory fails it will be ignored,
X
X
X
XVersion 3.50                    UW                              9
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X                 and no error message will be issued.
X
X     ..SSIILLEENNTT     Do not echo the recipe lines when making any
X                 target with this attribute set, and do not issue
X                 any warnings.
X
X     ..SSWWAAPP       Under MSDOS when making a target with this
X                 attribute set swap the ddmmaakkee executable to disk
X                 prior to executing the recipe line.
X
X     ..SSYYMMBBOOLL     Target is a library member and is an entry point
X                 into a module in the library.  This attribute is
X                 used only when searching a library for a target.
X                 Targets of the form lib((entry)) have this
X                 attribute set automatically.
X
X     ..UUSSEESSHHEELLLL   Force each recipe line of a target to be exe-
X                 cuted using a shell.  Specifying this attribute
X                 is equivalent to specifying the '+' character at
X                 the start of each line of a non-group recipe.
X
X     ..UUPPDDAATTEEAALLLL  Indicates that all the targets listed in this
X                 rule are updated by the execution of the accom-
X                 panying recipe.  A common example is the produc-
X                 tion of the _y_._t_a_b_._c and _y_._t_a_b_._h files by yyaacccc
X                 when it is run on a grammar.  Specifying
X                 .UPDATEALL in such a rule prevents the running
X                 of yacc twice, once for the y.tab.c file and
X                 once for the y.tab.h file.
X
X
X     All attributes are user setable and except for .UPDATEALL
X     and .MKSARGS may be used in one of two forms.  The .MKSARGS
X     attribute is restricted to use as a global attribute, and
X     the use of the .UPDATEALL attribute is restricted to rules
X     of the second form only.
X
X          ATTRIBUTE_LIST : _t_a_r_g_e_t_s
X
X     assigns the attributes specified by ATTRIBUTE_LIST to each
X     target in _t_a_r_g_e_t_s or
X
X          _t_a_r_g_e_t_s ATTRIBUTE_LIST : ...
X
X     assigns the attributes specified by ATTRIBUTE_LIST to each
X     target in _t_a_r_g_e_t_s_. In the first form if _t_a_r_g_e_t_s is empty
X     (ie. a NULL list), then the list of attributes will apply to
X     all targets in the makefile (this is equivalent to the com-
X     mon Make construct of _"_._I_G_N_O_R_E _:_" but has been modified to
X     the notion of an attribute instead of a special target).
X     Not all of the attributes have global meaning.  In particu-
X     lar, .LIBRARY, .SYMBOL, and .UPDATEALL have no assigned
X
X
X
XVersion 3.50                    UW                             10
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     global meaning.
X
X     Any attribute may be used with any target, even with the
X     special targets.  Some combinations are useless (e.g.
X     .INCLUDE .PRECIOUS: ... ), while others are useful (e.g.
X     .INCLUDE .IGNORE : "file.mk" will not complain if file.mk
X     cannot be found using the include file search rules, see the
X     section on SPECIAL TARGETS for a description of .INCLUDE).
X     If a specified attribute will not be used with the special
X     target a warning is issued and the attribute is ignored.
X
XMMAACCRROOSS
X     ddmmaakkee supports six types of macro assignment.
X
X
X     MMAACCRROO == LLIINNEE    This is the most common and familiar form of
X                     macro assignment.  It assigns LINE literally
X                     as the value of MACRO.  Future expansions of
X                     MACRO recursively expand it's value.
X
X     MMAACCRROO **== LLIINNEE   This form behaves exactly as the simple '='
X                     form with the exception that if MACRO
X                     already has a value then the assignment is
X                     not performed.
X
X     MMAACCRROO ::== LLIINNEE   This form differs from the simple '=' form
X                     in that it expands LINE prior to assigning
X                     it as the value of MACRO.  Future expansions
X                     of MACRO do not recursively expand it's
X                     value.
X
X     MMAACCRROO **::== LLIINNEE  This form behaves exactly as the ':=' form
X                     with the exception that if MACRO already has
X                     a value then the assignment and expansion
X                     are not performed.
X
X     MMAACCRROO ++== LLIINNEE   This form of macro assignment allows macro
X                     values to grow.  It takes the literal value
X                     of LINE and appends it to the previous value
X                     of MACRO separating the two by a single
X                     space.  Future expansions of MACRO recur-
X                     sively expand it's value.
X
X     MMAACCRROO ++::== LLIINNEE  This form is similar to the '+=' form except
X                     that the value of LINE is expanded prior to
X                     being added to the value of MACRO.
X
X     Macro expressions specified on the command line allow the
X     macro value to be redefined within the makefile only if the
X     macro is defined using the '+=' and '+:=' operators.  Other
X     operators will define a macro that cannot be further modi-
X     fied.
X
X
X
XVersion 3.50                    UW                             11
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     When ddmmaakkee defines a non-environment macro it strips leading
X     and trailing white space from the macro value.  Macros
X     imported from the environment via either the .IMPORT special
X     target (see the SPECIAL TARGETS section), or the --ee, or --EE
X     flags are an exception to this rule.  Their values are
X     always taken literally and white space is never stripped.
X     In addition, macros defined using the .IMPORT special target
X     do not have their values expanded when they are used within
X     a makefile.  In contrast, environment macros that are
X     imported due to the specification of the --ee or --EE flags are
X     subject to expansion when used.
X
X     To specify a macro expansion enclose the name in () or {}
X     and precede it with a dollar sign $.  Thus $(TEST)
X     represents an expansion of the macro variable named TEST.
X     If TEST is defined then $(TEST) is replaced by its expanded
X     value.  If TEST is not defined then $(TEST) expands to the
X     NULL string (this is equivalent to defining a macro as
X     'TEST=' ).  A short form may be used for single character
X     named macros.  In this case the parentheses are optional,
X     and $(I) is equivalent to $I.  Macro expansion is recursive,
X     hence, if the value string contains an expression represent-
X     ing a macro expansion, the expansion is performed.  Circular
X     macro expansions are detected and cause an error to be
X     issued.
X
X     When defining a macro the given macro name is first expanded
X     before being used to define the macro.  Thus it is possible
X     to define macros whose names depend on values of other mac-
X     ros.  For example, suppose
X
X          CWD = $(PWD:b)
X
X     is defined, then the value of $(CWD) is the name of the
X     current directory.  This can be used to define macros
X     specific to this directory, for example:
X
X          _$(CWD).prt = list of files to print...
X
X     The actual name of the defined macro is a function of the
X     current directory.  A construct such as this is useful when
X     processing a hierarchy of directories using .SETDIR attri-
X     buted targets and a collection of small distributed makefile
X     stubs.
X
X     Macro variables may be defined within the makefile, on the
X     command line, or imported from the environment.
X
X     ddmmaakkee supports several non-standard macro expansions: The
X     first is of the form:
X
X
X
X
X
XVersion 3.50                    UW                             12
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X          _$_(_m_a_c_r_o___n_a_m_e_:_m_o_d_i_f_i_e_r___l_i_s_t_:_m_o_d_i_f_i_e_r___l_i_s_t_:_._._._)
X
X     where _m_o_d_i_f_i_e_r___l_i_s_t is chosen from the set { D or d, F or f,
X     B or b, S or s, T or t } and
X
X          d - directory portion of all path names
X          f - file (including suffix) portion of path names
X          b - file (not including suffix) portion of path names
X          s - simple pattern substitution
X          t - tokenization.
X
X     Thus if we have the example:
X
X          test = d1/d2/d3/a.out f.out d1/k.out
X
X     The following macro expansions produce the values on the
X     right of '-->' after expansion.
X
X          $(test:d)            --> d1/d2/d3/ d1/
X          $(test:b)            --> a f k
X          $(test:f)            --> a.out f.out k.out
X          ${test:db}           --> d1/d2/d3/a f d1/k
X          ${test:s/out/in/:f}  --> a.in f.in k.in
X          $(test:f:t"+")       --> a.out+f.out+k.out
X
X     If a token ends in a string composed from the value of the
X     macro DIRBRKSTR (ie. ends in a directory separator string,
X     e.g. '/' in UNIX) and you use the ::dd modifier then the
X     expansion returns the directory name less the final direc-
X     tory separator string.  Thus successive pairs of :d modif-
X     iers each remove a level of directory in the token string.
X
X     The tokenization modifier takes all white space separated
X     tokens from the macro value and separates them by the quoted
X     separator string.  The separator string may contain the fol-
X     lowing escape codes \a => <bel>, \b => <backspace>, \f =>
X     <formfeed>, \n => <nl>, \r => <cr>, \t => <tab>, \v =>
X     <vertical tab>, \" => ", and \xxx => <xxx> where xxx is the
X     octal representation of a character.  Thus the expansion:
X
X          $(test:f:t"+\n")
X     produces:
X          a.out+
X          f.out+
X          k.out
X
X     The second non-standard form of macro expansion allows for
X     recursive macros.  It is possible to specify a $(_m_a_c_r_o___n_a_m_e)
X     or ${_m_a_c_r_o___n_a_m_e} expansion where _m_a_c_r_o___n_a_m_e contains more $(
X     ... ) or ${ ... } macro expansions itself.
X
X
X
X
X
XVersion 3.50                    UW                             13
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     For example $(CC$(_HOST)$(_COMPILER)) will first expand
X     CC$(_HOST)$(_COMPILER) to get a result and use that result
X     as the name of the macro to expand.  This is useful for
X     writing a makefile for more than one target environment.  As
X     an example consider the following hypothetical case. Suppose
X     that _HOST and _COMPILER are imported from the environment
X     and are set to represent the host machine type and the host
X     compiler respectively.
X
X          CFLAGS_VAX_CC = -c -O    # _HOST == "_VAX", _COMPILER == "_CC"
X          CFLAGS_PC_MSC = -c -ML   # _HOST == "_PC",  _COMPILER == "_MSC"
X
X          # redefine CFLAGS macro as:
X
X          CFLAGS := $(CFLAGS$(_HOST)$(_COMPILER))
X
X     This causes CFLAGS to take on a value that corresponds to
X     the environment in which the make is being invoked.
X
X     The final non-standard macro expansion is of the form:
X
X          string1{token_list}string2
X
X     where string1, string2 and token_list are expanded.  After
X     expansion, string1 is prepended to each token found in
X     token_list and string2 is appended to each resulting token
X     from the previous prepend.  string1 and string2 are not del-
X     imited by white space whereas the tokens in token_list are.
X     A null token in the token list is specified using "".  Thus
X     using another example we have:
X
X          test/{f1 f2}.o            --> test/f1.o test/f2.o
X          test/ {f1 f2}.o           --> test/ f1.o f2.o
X          test/{f1 f2} .o           --> test/f1 test/f2 .o
X          test/{ f1  "f2" "" }.o    --> test/f1.o test/f2.o
X                                    test/.o
X
X          and
X
X          test/{ d1 d2 }/{ f1 f2 }.o --> test/d1/f1.o
X                                         test/d1/f2.o
X                                         test/d2/f1.o
X                                         test/d2/f2.o
X
X     See the SPECIAL MACROS section for a description of the spe-
X     cial macros that ddmmaakkee defines and understands.
X
XRRUULLEESS AANNDD TTAARRGGEETTSS
X     A makefile contains a series of entries that specify depen-
X     dencies.  Such entries are called _t_a_r_g_e_t_/_p_r_e_r_e_q_u_i_s_i_t_e or
X     _r_u_l_e definitions.  Each rule definition is optionally fol-
X     lowed by a set of lines that provide a recipe for updating
X
X
X
XVersion 3.50                    UW                             14
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X     any targets defined by the rule.  Whenever ddmmaakkee attempts to
X     bring a target up to date and an explicit recipe is provided
X     with a rule defining the target, that recipe is used to
X     update the target.  A rule definition begins with a line
X     having the following syntax:
X
X          _<_t_a_r_g_e_t_s_> [_<_a_t_t_r_i_b_u_t_e_s_>] _<_r_u_l_e_o_p_> [_<_p_r_e_r_e_q_u_i_s_i_t_e_s_>] [;_<_r_e_c_i_p_e_>]
X
X     _t_a_r_g_e_t_s is a non-empty list of targets.  If the target is a
X     special target (see SPECIAL TARGETS section below) then it
X     must appear alone on the rule line.  For example:
X
X          .IMPORT .ERROR : ...
X
X     is not allowed since both .IMPORT and .ERROR are special
X     targets.  Special targets are not used in the construction
X     of the dependency graph and will not be made.
X
X     _a_t_t_r_i_b_u_t_e_s is a possibly empty list of attributes.  Any
X     attribute defined in the ATTRIBUTES section above may be
X     specified.  All attributes will be applied to the list of
X     named targets in the rule definition.  No other targets will
X     be affected.
X
X
X     NOTE:   As stated earlier, if both the target list and
X             prerequisite list are empty but the attributes list
X             is not, then the specified attributes affect all
X             targets in the makefile.
X
X
X     _r_u_l_e_o_p is a separator which is used to identify the targets
X     from the prerequisites.  Optionally it also provides a
X     facility for modifying the way in which ddmmaakkee handles the
X     making of the associated targets.  In its simplest form the
X     operator is a single ':', and need not be separated by white
X     space from its neighbouring tokens.  It may additionally be
X     followed by any of the modifiers { !, ^, -, : }, where:
X
X
X     !!    says execute the recipe for the associated targets once
X          for each out of date prerequisite.  Ordinarily the
X          recipe is executed once for all out of date prere-
X          quisites at the same time.
X
X     ^^    says to insert the specified prerequisites, if any,
X          before any other prerequisites already associated with
X          the specified targets.  In general, it is not useful to
X          specify ^ with an empty list of prerequisites.
X
X     --    says to clear the previous list of prerequisites before
X          adding the new prerequisites.  Thus,
X
X
X
XVersion 3.50                    UW                             15
X
X
X
X
XDMAKE(p)               Unsupported Software               DMAKE(p)
X
X
X
X               .SUFFIXES :
X               .SUFFIXES : .a .b
X
X          can be replaced by
X
X               .SUFFIXES :- .a .b
X
X          however the old form still works as expected.  NOTE:
X          .SUFFIXES is ignored by ddmmaakkee it is used here simply as
X          an example.
X
X     ::    When the rule operator is not modified by a second ':'
X          only one set of rules may be specified for making a
X          target.  Multiple definitions may be used to add to the
X          list of prerequisites that a target depends on.  How-
X          ever, if a target is multiply defined only one defini-
X          tion may specify a recipe for making the target.
X
X          When a target's rule operator is modified by a second
X          ':' (:: for example) then this definition may not be
X          the only definition with a recipe for the target.
X          There may be other :: target definition lines that
X          specify a different set of prerequisites with a dif-
X          ferent recipe for updating the target. Any such target
X          is made if any of the definitions find it to be out of
X          date with respect to the related prerequisites and the
X          corresponding recipe is used to update the target.
X
X          In the following simple example, each rule has a `::'
X          _r_u_l_e_o_p.  In such an operator we call the first `:' the
X          operator, and the second `:' the modifier.
X
X          a.o :: a.c b.h
X             first recipe for making a.o
X
X          a.o :: a.y b.h
X             second recipe for making a.o
X
X          If a.o is found to be out of date with respect to a.c
X          then the first recipe is used to make a.o.  If it is
X          found out of date with respect to a.y then the second
X          recipe is used.  If a.o is out of date with respect to
SHAR_EOF
echo "End of part 13"
echo "File man/dmake.p is continued in part 14"
echo "14" > s2_seq_.tmp
exit 0