v19i034: dmake - dmake version 3.7, Part13/37

Dennis Vadura dvadura at watdragon.waterloo.edu
Sat May 11 04:59:59 AEST 1991


Submitted-by: Dennis Vadura <dvadura at watdragon.waterloo.edu>
Posting-number: Volume 19, Issue 34
Archive-name: dmake/part13
Supersedes: dmake-3.6: Volume 15, Issue 52-77

---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is dmake.shar.13 (part 13 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file dmake/man/dmake.nc continued
#
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 13; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
if test -f _shar_wnt_.tmp; then
sed 's/^X//' << 'SHAR_EOF' >> 'dmake/man/dmake.nc' &&
X                 once for the y.tab.h file.
X
X
X     All attributes are user setable and except for .UPDATEALL,
X     .SETDIR and .MKSARGS may be used in one of two forms.  The
X     .MKSARGS attribute is restricted to use as a global attri-
X     bute, and the use of the .UPDATEALL and .SETDIR attributes
X     is restricted to rules of the second form only.
X
X          ATTRIBUTE_LIST : targets
X
X     assigns the attributes specified by ATTRIBUTE_LIST to each
X     target in targets or
X
X          targets ATTRIBUTE_LIST : ...
X
X
X
Version 3.70                    UW                             11
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     assigns the attributes specified by ATTRIBUTE_LIST to each
X     target in targets. In the first form if targets 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 ".IGNORE :" 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 glo-
X     bal 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
MACROS
X     dmake supports six types of macro assignment.
X
X
X     MACRO = LINE    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 its value.
X
X     MACRO *= LINE   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     MACRO := LINE   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 its
X                     value.
X
X     MACRO *:= LINE  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     MACRO += LINE   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 its value.
X
X
X
X
X
Version 3.70                    UW                             12
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     MACRO +:= LINE  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     When dmake 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 -e, or -E
X     flags are an exception to this rule.  Their values are
X     always taken literally and white space is never stripped.
X     In addition, named macros defined using the .IMPORT special
X     target do not have their values expanded when they are used
X     within a makefile.  In contrast, environment macros that are
X     imported due to the specification of the -e or -E 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 CWD is defined as
X
X          CWD = $(PWD:b)
X
X     then the value of $(CWD) is the name of the current direc-
X     tory.  This can be used to define macros specific to this
X     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
X
X
X
Version 3.70                    UW                             13
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     attributed targets and a collection of small distributed
X     makefile stubs.
X
X     Macro variables may be defined within the makefile, on the
X     command line, or imported from the environment.
X
X     dmake supports several non-standard macro expansions: The
X     first is of the form:
X
X          $(macro_name:modifier_list:modifier_list:...)
X
X     where modifier_list 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 :d 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
X
X
Version 3.70                    UW                             14
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
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 $(macro_name)
X     or ${macro_name} expansion where macro_name contains more $(
X     ... ) or ${ ... } macro expansions itself.
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"  ""}.o  --> test/f1.o test/.o
X
X          and
X
X          test/{d1 d2}/{f1 f2}.o --> test/d1/f1.o test/d1/f2.o
X                                     test/d2/f1.o test/d2/f2.o
X
X     This last expansion is activated only when the first charac-
X     ters of token_list appear immediately after the opening '{'
X     with no intervening white space.  The reason for this
X
X
X
Version 3.70                    UW                             15
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     restriction is the following incompatibility with Bourne
X     Shell recipes.  The line
X
X          { echo hello;}
X
X     is valid /bin/sh syntax; while
X
X          {echo hello;}
X
X     is not.  Hence the latter triggers the enhanced macro expan-
X     sion while the former causes it to be suppressed.  See the
X     SPECIAL MACROS section for a description of the special mac-
X     ros that dmake defines and understands.
X
RULES AND TARGETS
X     A makefile contains a series of entries that specify depen-
X     dencies.  Such entries are called target/prerequisite or
X     rule definitions.  Each rule definition is optionally fol-
X     lowed by a set of lines that provide a recipe for updating
X     any targets defined by the rule.  Whenever dmake 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          <targets> [<attributes>] <ruleop> [<prerequisites>] [;<recipe>]
X
X     targets 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     attributes 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     ruleop is a separator which is used to identify the targets
X     from the prerequisites.  Optionally it also provides a
X
X
X
Version 3.70                    UW                             16
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     facility for modifying the way in which dmake 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 neighboring 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               .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 dmake 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          ruleop.  In such an operator we call the first `:' the
X          operator, and the second `:' the modifier.
X
X
X
X
Version 3.70                    UW                             17
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
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
X          b.h then both recipes are invoked to make a.o.  In the
X          last case the order of invocation corresponds to the
X          order in which the rule definitions appear in the
X          makefile.
X
X     Targets defined using a single `:' operator with a recipe
X     may be redefined again with a new recipe by using a `:'
X     operator with a `:' modifier.  This is equivalent to a tar-
X     get having been initially defined with a rule using a `:'
X     modifier.  Once a target is defined using a `:' modifier it
X     may not be defined again with a recipe using only the `:'
X     operator with no `:' modifier.  In both cases the use of a
X     `:' modifier creates a new list of prerequisites and makes
X     it the current prerequisite list for the target.  The `:'
X     operator with no recipe always modifies the current list of
X     prerequisites.  Thus assuming each of the following defini-
X     tions has a recipe attached, then:
X
X          joe :  fred ...     (1)
X          joe :: more ...     (2)
X
X          and
X
X          joe :: fred ...     (3)
X          joe :: more ...     (4)
X
X     are legal and mean:  add the recipe associated with (2), or
X     (4) to the set of recipes for joe, placing them after exist-
X     ing recipes for making joe.  The constructs:
X
X          joe :: fred ...     (5)
X          joe : more ... (6)
X
X          and
X
X          joe : fred ... (7)
X          joe : more ... (8)
X
X     are errors since we have two sets of perfectly good recipes
X     for making the target.
X
X
X
X
X
Version 3.70                    UW                             18
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     prerequisites is a possibly empty list of targets that must
X     be brought up to date before making the current target.
X
X     recipe is a short form and allows the user to specify short
X     rule definitions on a single line.  It is taken to be the
X     first recipe line in a larger recipe if additional lines
X     follow the rule definition.  If the semi-colon is present
X     but the recipe line is empty (ie. null string) then it is
X     taken to be an empty rule.  Any target so defined causes the
X     Don't know how to make ... error message to be suppressed
X     when dmake tries to make the target and fails.  This silence
X     is maintained for rules that are terminated by a semicolon
X     and have no following recipe lines, for targets listed on
X     the command line, for the first target found in the
X     makefile, and for any target having no recipe but containing
X     a list of prerequisites (see the COMPATIBILITY section for
X     an exception to this rule if the AUGMAKE (-A) flag was
X     specified.
X
RECIPES
X     The traditional format used by most versions of Make defines
X     the recipe lines as arbitrary strings that may contain macro
X     expansions.  They follow a rule definition line and may be
X     spaced apart by comment or blank lines.  The list of recipe
X     lines defining the recipe is terminated by a new target
X     definition, a macro definition, or end-of-file.  Each recipe
X     line MUST begin with a <TAB> character which may optionally
X     be followed with one or all of the characters '@%+-'.  The
X     '-' indicates that non-zero exit values (ie. errors) are to
X     be ignored when this recipe line is executed, the '+' indi-
X     cates that the current recipe line is to be executed using
X     the shell, the '%' indicates that dmake should swap itself
X     out to secondary storage (MSDOS only) before running the
X     recipe and the '@' indicates that the recipe line should NOT
X     be echoed to the terminal prior to being executed.  Each
X     switch is off by default (ie. by default, errors are signi-
X     ficant, commands are echoed, no swapping is done and a shell
X     is used only if the recipe line contains a character found
X     in the value of the SHELLMETAS macro).  Global settings
X     activated via command line options or special attribute or
X     target names may also affect these settings.  An example
X     recipe:
X
X          target :
X               first recipe line
X               second recipe line, executed independently of the first.
X               @a recipe line that is not echoed
X               -and one that has errors ignored
X               %and one that causes dmake to swap out
X               +and one that is executed using a shell.
X
X
X
X
X
Version 3.70                    UW                             19
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     The second and new format of the recipe block begins the
X     block with the character '[' (the open group character) in
X     the last non-white space position of a line, and terminates
X     the block with the character ']' (the close group character)
X     in the first non-white space position of a line.  In this
X     form each recipe line need not have a leading TAB.  This is
X     called a recipe group.  Groups so defined are fed intact as
X     a single unit to a shell for execution whenever the
X     corresponding target needs to be updated.  If the open group
X     character '[' is preceded by one or all of -, @ or % then
X     they apply to the entire group in the same way that they
X     apply to single recipe lines.  You may also specify '+' but
X     it is redundant as a shell is already being used to run the
X     recipe.  See the MAKING TARGETS section for a description of
X     how dmake invokes recipes.  Here is an example of a group
X     recipe:
X
X          target :
X          [
X               first recipe line
X               second recipe line
X               all of these recipe lines are fed to a
X               single copy of a shell for execution.
X          ]
X
X
TEXT DIVERSIONS
X     dmake supports the notion of text diversions.  If a recipe
X     line contains the macro expression
X
X          $(mktmp[,[file][,text]] data)
X
X     then all text contained in the data expression is expanded
X     and is written to a temporary file.  The return value of the
X     macro is the name of the temporary file.
X
X     data can be any text and must be separated from the 'mktmp'
X     portion of the macro name by white-space.  The only restric-
X     tion on the data text is that it must contain a balanced
X     number of parentheses of the same kind as are used to ini-
X     tiate the $(mktmp ...) expression.  For example:
X
X          $(mktmp $(XXX))
X
X     is legal and works as expected, but:
X
X          $(mktmp text (to dump to file)
X
X     is not legal.  You can achieve what you wish by either
X     defining a macro that expands to '(' or by using {} in the
X     macro expression; like this:
X
X
X
X
Version 3.70                    UW                             20
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X          ${mktmp text (to dump to file}
X
X     Since the temporary file is opened when the macro containing
X     the text diversion expression is expanded, diversions may
X     now be nested and any diversions that are created as part of
X     ':=' macro expansions persist for the duration of the dmake
X     run.  The diversion text may contain the same escape codes
X     as those described in the MACROS section.  Thus if the data
X     text is to contain new lines they must be inserted using the
X     \n escape sequence.  For example the expression:
X
X          all:
X               cat $(mktmp this is a\n\
X               test of the text diversion\n)
X
X     is replaced by:
X
X          cat /tmp/mk12294AA
X
X     where the temporary file contains two lines both of which
X     are terminated by a new-line.  If the data text spans multi-
X     ple lines in the makefile then each line must be continued
X     via the use of a \.  A second more illustrative example gen-
X     erates a response file to an MSDOS link command:
X
X          OBJ = fred.obj mary.obj joe.obj
X          all : $(OBJ)
X               link @$(mktmp $(^:t"+\n")\n)
X
X     The result of making `all' in the second example is the com-
X     mand:
X
X          link @/tmp/mk02394AA
X
X     where the temporary file contains:
X
X          fred.obj+
X          mary.obj+
X          joe.obj
X
X     The last line of the file is terminated by a new-line which
X     is inserted due to the \n found at the end of the data
X     string.
X
X     If the optional file specifier is present then its expanded
X     value is the name of the temporary file to create.  Whenever
X     a $(mktmp ...) macro is expanded the macro $(TMPFILE) is set
X     to a new temporary file name.  Thus the construct:
X
X          $(mktmp,$(TMPFILE) data)
X
X     is completely equivalent to not specifying the $(TMPFILE)
X
X
X
Version 3.70                    UW                             21
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     optional argument.  Another example that would be useful for
X     MSDOS users with a Turbo-C compiler
X
X          $(mktmp,turboc.cfg $(CFLAGS))
X
X     will place the contents of CFLAGS into a local turboc.cfg
X     file.  The second optional argument, text, if present alters
X     the name of the value returned by the $(mktmp ...) macro.
X
X     Under MS-DOS text diversions may be a problem.  Many DOS
X     tools require that path names which contain directories use
X     the \ character to delimit the directories.  Some users how-
X     ever wish to use the '/' to delimit pathnames and use
X     environments that allow them to do so.  The macro USESHELL
X     is set to "yes" if the current recipe is forced to use a
X     shell via the .USESHELL or '+' directives, otherwise its
X     value is "no".  The dmake startup files define the macro
X     DIVFILE whose value is either the value of TMPFILE or the
X     value of TMPFILE edited to replace any '/' characters to the
X     appropriate value based on the current shell and whether it
X     will be used to execute the recipe.
X
X     Previous versions of dmake defined text diversions using <+,
X     +> strings, where <+ started a text diversion and +> ter-
X     minated one.  dmake is backward compatible with this con-
X     struct if the <+ and +> appear literally on the same recipe
X     line or in the same macro value string.  In such instances
X     the expression:
X
X          <+data+>
X
X     is mapped to:
X
X          $(mktmp data)
X
X     which is fully output compatible with the earlier construct.
X     <+, +> constructs whose text spans multiple lines must be
X     converted by hand to use $(mktmp ...).
X
X     If the environment variable TMPDIR is defined then the tem-
X     porary file is placed into the directory specified by that
X     variable.  A makefile can modify the location of temporary
X     files by defining a macro named TMPDIR and exporting it
X     using the .EXPORT special target.
X
SPECIAL TARGETS
X     This section describes the special targets that are recog-
X     nized by dmake.  Some are affected by attributes and others
X     are not.
X
X     .ERROR        If defined then the recipe associated with
X                   this target is executed whenever an error
X
X
X
Version 3.70                    UW                             22
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X                   condition is detected by dmake.  All attri-
X                   butes that can be used with any other target
X                   may be used with this target.  Any prere-
X                   quisites of this target will be brought up to
X                   date during its processing.  NOTE:  errors
X                   will be ignored while making this target, in
X                   extreme cases this may cause some problems.
X
X     .EXPORT       All prerequisites associated with this target
X                   are assumed to correspond to macro names and
X                   they and their values are exported to the
X                   environment as environment strings at the
X                   point in the makefile at which this target
X                   appears.  Any attributes specified with this
X                   target are ignored.  Only macros which have
X                   been assigned a value in the makefile prior to
X                   the export directive are exported, macros as
X                   yet undefined are not exported.
X
X     .IMPORT       Prerequisite names specified for this target
X                   are searched for in the environment and
X                   defined as macros with their value taken from
X                   the environment.  If the special name .EVERY-
X                   THING is used as a prerequisite name then all
X                   environment variables defined in the environ-
X                   ment are imported.  The functionality of the
X                   -e flag can be forced by placing the construct
X                   .IMPORT : .EVERYTHING at the start of a
X                   makefile.  Similarly, by placing the construct
X                   at the end, one can emulate the effect of the
X                   -E command line flag.  If a prerequisite name
X                   cannot be found in the environment an error
X                   message is issued.  .IMPORT accepts the
X                   .IGNORE attribute.  When given, it causes
X                   dmake to ignore the above error.  See the MAC-
X                   ROS section for a description of the process-
X                   ing of imported macro values.
X
X     .INCLUDE      Parse another makefile just as if it had been
X                   located at the point of the .INCLUDE in the
X                   current makefile.  The list of prerequisites
X                   gives the list of makefiles to try to read.
X                   If the list contains multiple makefiles then
X                   they are read in order from left to right.
X                   The following search rules are used when try-
X                   ing to locate the file.  If the filename is
X                   surrounded by " or just by itself then it is
X                   searched for in the current directory.  If it
X                   is not found it is then searched for in each
X                   of the directories specified for the .INCLU-
X                   DEDIRS special target.  If the file name is
X                   surrounded by < and >, (ie.
X
X
X
Version 3.70                    UW                             23
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X                   <my_spiffy_new_makefile>) then it is searched
X                   for only in the directories given by the
X                   .INCLUDEDIRS special target.  In both cases if
X                   the file name is a fully qualified name start-
X                   ing at the root of the file system then it is
X                   only searched for once, and the .INCLUDEDIRS
X                   list is ignored.  .INCLUDE accepts the .IGNORE
X                   and .SETDIR attributes.  If .IGNORE attribute
X                   is given and the file cannot be found then
X                   dmake continues processing, otherwise an error
X                   message is generated.  The .SETDIR attribute
X                   causes dmake to change directories to the
X                   specified directory prior to attempting the
X                   include operation.
X
X     .INCLUDEDIRS  The list of prerequisites specified for this
X                   target defines the set of directories to
X                   search when trying to include a makefile.
X
X     .KEEP_STATE   This special target is a synonym for the macro
X                   definition
X
X                        .KEEP_STATE := _state.mk
X
X                   It's effect is to turn on STATE keeping and to
X                   define _state.mk as the state file.
X
X     .MAKEFILES    The list of prerequisites is the set of files
X                   to try to read as the default makefile.  By
X                   default this target is defined as:
X
X                        .MAKEFILES : makefile.mk Makefile
X                   makefile
X
X
X     .SOURCE       The prerequisite list of this target defines a
X                   set of directories to check when trying to
X                   locate a target file name.  See the section on
X                   BINDING of targets for more information.
X
X     .SOURCE.suff  The same as .SOURCE, except that the
X                   .SOURCE.suff list is searched first when try-
X                   ing to locate a file matching the a target
X                   whose name ends in the suffix .suff.
X
X     .REMOVE       The recipe of this target is used whenever
X                   dmake needs to remove intermediate targets
X                   that were made but do not need to be kept
X                   around.  Such targets result from the applica-
X                   tion of transitive closure on the dependency
X                   graph.
X
X
X
X
Version 3.70                    UW                             24
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     In addition to the special targets above, several other
X     forms of targets are recognized and are considered special,
X     their exact form and use is defined in the sections that
X     follow.
X
SPECIAL MACROS
X     dmake defines a number of special macros.  They are divided
X     into three classes: control macros, run-time macros, and
X     function macros.  The control macros are used by dmake to
X     configure its actions, and are the preferred method of doing
X     so.  In the case when a control macro has the same function
X     as a special target or attribute they share the same name as
X     the special target or attribute.  The run-time macros are
X     defined when dmake makes targets and may be used by the user
X     inside recipes.  The function macros provide higher level
X     functions dealing with macro expansion and diversion file
X     processing.
X
CONTROL MACROS
X     To use the control macros simply assign them a value just
X     like any other macro.  The control macros are divided into
X     three groups: string valued macros, character valued macros,
X     and boolean valued macros.
X
X     The following are all of the string valued macros.  This
X     list is divided into two groups.  The first group gives the
X     string valued macros that are defined internally and cannot
X     be directly set by the user.
X
X     DIRBRKSTR     Contains the string of chars used to terminate
X                   the name of a directory in a pathname.  Under
X                   UNIX its value is "/", under MSDOS its value
X                   is "/\:".
X
X     INCDEPTH      This macro's value is a string of digits
X                   representing the current depth of makefile
X                   inclusion.  In the first makefile level this
X                   value is zero.
X
X     MFLAGS        Is the list of flags that were given on the
X                   command line including a leading switch char-
X                   acter.  The -f flag is not included in this
X                   list.
X
X     MAKECMD       Is the name with which dmake was invoked.
X
X     MAKEDIR       Is the full path to the initial directory in
X                   which dmake was invoked.
X
X     MAKEFILE      Contains the string "-f makefile" where,
X                   makefile is the name of initial user makefile
X                   that was first read.
X
X
X
Version 3.70                    UW                             25
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X     MAKEFLAGS     Is the same as $(MFLAGS) but has no leading
X                   switch character. (ie. MFLAGS = -$(MAKEFLAGS))
X
X     MAKEMACROS    Contains the complete list of macro expres-
X                   sions that were specified on the command line.
X
X     MAKETARGETS   Contains the name(s) of the target(s), if any,
X                   that were specified on the command line.
X
X     MAXPROCESSLIMIT
X                   Is a numeric string representing the maximum
X                   number of processes that dmake can use when
X                   making targets using parallel mode.
X
X     NULL          Is permanently defined to be the NULL string.
X                   This is useful when comparing a conditional
X                   expression to an NULL value.
X
X     PWD           Is the full path to the current directory in
X                   which make is executing.
X
X     TMPFILE       Is set to the name of the most recent tem-
X                   porary file opened by dmake.  Temporary files
X                   are used for text diversions and for group
X                   recipe processing.
X
X     TMD           Stands for "To Make Dir", and is the path from
X                   the present directory (value of $(PWD)) to the
X                   directory that dmake was started up in (value
X                   of $(MAKEDIR)).  This macro is modified when
X                   .SETDIR attributes are processed.
X
X     USESHELL      The value of this macro is set to "yes" if the
X                   current recipe is forced to use a shell for
X                   its execution via the .USESHELL or '+' direc-
X                   tives, its value is "no" otherwise.
X
X
X     The second group of string valued macros control dmake
X     behavior and may be set by the user.
X
X     .SETDIR         If this macro is assigned a value then dmake
X                     will change to the directory given by that
X                     value before making any targets.
X
X     AUGMAKE         If set to a non NULL value will enable the
X                     transformation of special meta targets to
X                     support special AUGMAKE inferences (See the
X                     COMPATIBILITY section).
X
X     DIRSEPSTR       Contains the string that is used to separate
X                     directory components when path names are
X
X
X
Version 3.70                    UW                             26
X
X
X
X
DMAKE(p)             Unsupported Free Software            DMAKE(p)
X
X
X
X                     constructed.  It is defined with a default
X                     value at startup.
X
X     DIVFILE         Is defined in the startup file and gives the
X                     name that should be returned for the diver-
X                     sion file name when used in $(mktmp ...)
X                     expansions, see the TEXT DIVERSION section
X                     for details.
X
X     .KEEP_STATE     Assigning this macro a value tells dmake the
X                     name of the state file to use and turns on
X                     the keeping of state information for any
X                     targets that are brought up to date by the
X                     make.
X
X     GROUPFLAGS      This macro gives the set of flags to pass to
X                     the shell when invoking it to execute a
X                     group recipe.  The value of the macro is the
X                     list of flags with a leading switch indica-
X                     tor.  (ie. `-' under UNIX)
X
X     GROUPSHELL      This macro defines the full path to the exe-
X                     cutable image to be used as the shell when
X                     processing group recipes.  This macro must
X                     be defined if group recipes are used.  It is
X                     assigned a default value in the startup
X                     makefile.  Under UNIX this value is /bin/sh.
X
X     GROUPSUFFIX     If defined, this macro gives the string to
X                     use as a suffix when creating group recipe
SHAR_EOF
true || echo 'restore of dmake/man/dmake.nc failed'
fi
echo 'End of part 13, continue with part 14'
echo 14 > _shar_seq_.tmp
exit 0

exit 0 # Just in case...
-- 
Kent Landfield                   INTERNET: kent at sparky.IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent at uunet.uu.net.



More information about the Comp.sources.misc mailing list