/desktop/unx/source/

llotropia/zeta-7-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-10-15 14:42:40 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-10-15 14:42:40 +0000
commit397297d34862b24064cd7f5b3ae682f69ad63d23 (patch)
tree92065f9dfae43ba97e989f614bcadc763097933a
parentaf44c4c7197e76050abc4330a0e0b816c724a380 (diff)
INTEGRATION: CWS dmake411 (1.9.2); FILE MERGED
2007/10/13 23:43:19 vq 1.9.2.12: #i79272# Release dmake 4.11. 2007/09/20 01:50:43 vq 1.9.2.11: #i81252# Restore alphabetical order. 2007/09/19 01:03:40 vq 1.9.2.10: #i81252# Add documentation for the SHELLCMDQUOTE macro. 2007/09/16 03:57:12 vq 1.9.2.9: #i74007# Revert the part of the previous patch that lets OOODMAKEMODE always be imported from the environment. Instead move the definition of targets from the command line after the evaluation of the startup makefile. 2007/09/16 03:06:24 vq 1.9.2.8: #i74007# Update text version of the man page. 2007/08/31 05:24:12 vq 1.9.2.7: #i64572# Issue a warning for virtual targets with corresponding files. Update testcases. 2007/08/30 09:13:09 vq 1.9.2.6: #i64572# Add documentation. 2007/08/28 18:28:23 vq 1.9.2.5: #i64234# Fix $(mktmp ..) handling of leading spaces. 2007/08/10 15:42:07 vq 1.9.2.4: #i66751# Accept .PHONY attribute in %-targets. 2007/08/07 01:54:12 vq 1.9.2.3: #i66448# Clarify prerequisites for %-targets. 2007/07/27 17:06:25 vq 1.9.2.2: #i78776# Document new normalizing function macro and macro extension. 2007/07/05 15:58:50 vq 1.9.2.1: #i79271# Bump version to 4.11-cvs.
Diffstat
-rw-r--r--dmake/man/dmake.nc1662
1 files changed, 872 insertions, 790 deletions
diff --git a/dmake/man/dmake.nc b/dmake/man/dmake.nc
index de42d193cf1a..05d350110b56 100644
--- a/dmake/man/dmake.nc
+++ b/dmake/man/dmake.nc
@@ -61,7 +61,7 @@ OPTIONS
-Dmake Version 4.9 2007-06-25 1
+Dmake Version 4.11 2007-10-13 1
@@ -127,7 +127,7 @@ DMAKE(1) DMAKE(1)
-Dmake Version 4.9 2007-06-25 2
+Dmake Version 4.11 2007-10-13 2
@@ -194,7 +194,7 @@ DMAKE(1) DMAKE(1)
-Dmake Version 4.9 2007-06-25 3
+Dmake Version 4.11 2007-10-13 3
@@ -261,7 +261,7 @@ INDEX
-Dmake Version 4.9 2007-06-25 4
+Dmake Version 4.11 2007-10-13 4
@@ -284,9 +284,12 @@ DMAKE(1) DMAKE(1)
TEXT DIVERSIONS How to use text diversions in recipes and macro
expansions.
+ VIRTUAL TARGETS Targets that only enforce dependencies, but which
+ can not create a target file.
+
SPECIAL TARGETS Some targets are special.
- SPECIAL MACROS Macros used by dmake to alter the processing of the
+ SPECIAL MACROS Macros used by dmake to alter the processing of the
makefile, and those defined by dmake for the user.
CONTROL MACROS Itemized list of special control macros.
@@ -294,8 +297,7 @@ DMAKE(1) DMAKE(1)
RUNTIME MACROS Discussion of special run-time macros such as $@ and
$<.
- FUNCTION MACROS GNU style function macros, only $(mktmp ...) for
- now.
+ FUNCTION MACROS Description of functional macros.
CONDITIONAL MACROS Target specific conditional macros.
@@ -327,8 +329,7 @@ DMAKE(1) DMAKE(1)
-
-Dmake Version 4.9 2007-06-25 5
+Dmake Version 4.11 2007-10-13 5
@@ -392,10 +393,11 @@ STARTUP
-r option was not specified. A user may substitute a custom startup
file by defining the MAKESTARTUP environment variable or by redefining
the MAKESTARTUP macro on the command line. To determine where dmake
+ looks for the default startup file, check your environment or issue the
-Dmake Version 4.9 2007-06-25 6
+Dmake Version 4.11 2007-10-13 6
@@ -404,7 +406,6 @@ Dmake Version 4.9 2007-06-25 6
DMAKE(1) DMAKE(1)
- looks for the default startup file, check your environment or issue the
command "dmake -V".
A similar search is performed to locate a default user makefile when no
@@ -459,10 +460,12 @@ DMAKE(1) DMAKE(1)
Please note that even though .INIT and .DONE are special exceptions,
see section SPECIAL TARGETS, the use of self defined targets starting
with `.' should be avoided as they would be handled as .<suffix> meta
+ targets. The target names _INIT and _DONE for example would work
+ equally well without the .<suffix> drawback.
-Dmake Version 4.9 2007-06-25 7
+Dmake Version 4.11 2007-10-13 7
@@ -471,9 +474,6 @@ Dmake Version 4.9 2007-06-25 7
DMAKE(1) DMAKE(1)
- targets. The target names _INIT and _DONE for example would work
- equally well without the .<suffix> drawback.
-
SYNTAX
This section is a summary of the syntax of makefile statements. The
description is given in a style similar to BNF, where { } enclose items
@@ -526,22 +526,20 @@ SYNTAX
-> expression && expression
+ Rule-Definition -> target-definition
+ [ recipe ]
-
-
-Dmake Version 4.9 2007-06-25 8
+ target-definition -> targets [attrs] op { PREREQUISITE } [; rcp-line]
+Dmake Version 4.11 2007-10-13 8
-DMAKE(1) DMAKE(1)
- Rule-Definition -> target-definition
- [ recipe ]
- target-definition -> targets [attrs] op { PREREQUISITE } [; rcp-line]
+DMAKE(1) DMAKE(1)
targets -> target { targets }
@@ -593,24 +591,23 @@ DMAKE(1) DMAKE(1)
-> .PROLOG
-> .SETDIR=path
-> .SILENT
+ -> .SEQUENTIAL
+ -> .SWAP
+ -> .USESHELL
+ -> .SYMBOL
+ -> .UPDATEALL
+ -> .WINPATH
-Dmake Version 4.9 2007-06-25 9
+Dmake Version 4.11 2007-10-13 9
-DMAKE(1) DMAKE(1)
-
- -> .SEQUENTIAL
- -> .SWAP
- -> .USESHELL
- -> .SYMBOL
- -> .UPDATEALL
- -> .WINPATH
+DMAKE(1) DMAKE(1)
special-target -> .ERROR
@@ -660,27 +657,27 @@ DMAKE(1) DMAKE(1)
either side of the macro operator and white space is stripped from both
before and after the macro value string. A \<nl> sequence in a macro
definition is deleted from the macro value before assigning this value.
+ During recipe expansion the sequence \<nl> is treated as white space
+ but is deleted from the final recipe string. You must escape the \<nl>
+ with another \ in order to get a \ at the end of a recipe or macro def-
+ inition line.
+ When processing target definition lines, the recipe for a target must,
+ in general, follow the first definition of the target (See the RULES
+ AND TARGETS section for an exception), and the recipe may not span
+ across multiple makefiles. Any targets and prerequisites found on a
-Dmake Version 4.9 2007-06-25 10
+Dmake Version 4.11 2007-10-13 10
-DMAKE(1) DMAKE(1)
+DMAKE(1) DMAKE(1)
- During recipe expansion the sequence \<nl> is treated as white space
- but is deleted from the final recipe string. You must escape the \<nl>
- with another \ in order to get a \ at the end of a recipe or macro def-
- inition line.
- When processing target definition lines, the recipe for a target must,
- in general, follow the first definition of the target (See the RULES
- AND TARGETS section for an exception), and the recipe may not span
- across multiple makefiles. Any targets and prerequisites found on a
target definition line are taken to be white space separated tokens.
The rule operator (op in SYNTAX section) is also considered to be a
token but does not require white space to precede or follow it. Since
@@ -730,25 +727,26 @@ ATTRIBUTES
Disable the special meaning of '[' to initiate a group
recipe.
+ .LIBRARY Target is a library.
+ .MKSARGS If running in an MSDOS environment then use MKS extended
+ argument passing conventions to pass arguments to commands.
+ Non-MSDOS environments ignore this attribute.
-Dmake Version 4.9 2007-06-25 11
+ .NOINFER Any target with this attribute set will not be subjected to
+ transitive closure if it is inferred as a prerequisite of a
+Dmake Version 4.11 2007-10-13 11
-DMAKE(1) DMAKE(1)
- .LIBRARY Target is a library.
- .MKSARGS If running in an MSDOS environment then use MKS extended
- argument passing conventions to pass arguments to commands.
- Non-MSDOS environments ignore this attribute.
+DMAKE(1) DMAKE(1)
+
- .NOINFER Any target with this attribute set will not be subjected to
- transitive closure if it is inferred as a prerequisite of a
target whose recipe and prerequisites are being inferred.
(i.e. the inference algorithm will not use any prerequisite
with this attribute set, as a target) If specified as
@@ -798,29 +796,29 @@ DMAKE(1) DMAKE(1)
.SWAP Under MSDOS when making a target with this attribute set
swap the dmake executable to disk prior to executing the
recipe line. Also see the '%' recipe line flag defined in
+ the RECIPES section.
+ .SYMBOL Target is a library member and is an entry point into a
+ module in the library. This attribute is used only when
+ searching a library for a target. Targets of the form
+ lib((entry)) have this attribute set automatically.
+ .USESHELL Force each recipe line of a target to be executed using a
+ shell. Specifying this attribute is equivalent to
-Dmake Version 4.9 2007-06-25 12
+Dmake Version 4.11 2007-10-13 12
-DMAKE(1) DMAKE(1)
- the RECIPES section.
+DMAKE(1) DMAKE(1)
- .SYMBOL Target is a library member and is an entry point into a
- module in the library. This attribute is used only when
- searching a library for a target. Targets of the form
- lib((entry)) have this attribute set automatically.
- .USESHELL Force each recipe line of a target to be executed using a
- shell. Specifying this attribute is equivalent to specify-
- ing the '+' character at the start of each line of a non-
- group recipe.
+ specifying the '+' character at the start of each line of a
+ non-group recipe.
.UPDATEALL Indicates that all the targets listed in this rule are
updated by the execution of the accompanying recipe. A
@@ -867,28 +865,28 @@ DMAKE(1) DMAKE(1)
All attributes are user setable and except for .UPDATEALL and .MKSARGS
may be used in one of two forms. The .MKSARGS attribute is restricted
to use as a global attribute, and the use of the .UPDATEALL attribute
+ is restricted to rules of the second form only.
+ ATTRIBUTE_LIST : targets
+ assigns the attributes specified by ATTRIBUTE_LIST to each target in
+ targets or
-Dmake Version 4.9 2007-06-25 13
+ targets ATTRIBUTE_LIST : ...
+ assigns the attributes specified by ATTRIBUTE_LIST to each target in
+Dmake Version 4.11 2007-10-13 13
-DMAKE(1) DMAKE(1)
- is restricted to rules of the second form only.
- ATTRIBUTE_LIST : targets
- assigns the attributes specified by ATTRIBUTE_LIST to each target in
- targets or
+DMAKE(1) DMAKE(1)
- targets ATTRIBUTE_LIST : ...
- assigns the attributes specified by ATTRIBUTE_LIST to each target in
targets. In the first form if targets is empty (ie. a NULL list), then
the list of attributes will apply to all targets in the makefile (this
is equivalent to the common Make construct of ".IGNORE :" but has been
@@ -937,26 +935,27 @@ MACROS
value of LINE is expanded prior to being added to the
value of MACRO.
+ Macro expressions specified on the command line allow the macro value
+ to be redefined within the makefile only if the macro is defined using
+ the '+=' and '+:=' operators. Other operators will define a macro that
+ cannot be further modified.
+
+ Each of the preceeding macro assignment operators may be prefixed by !
+ to indicate that the assignment should be forced and that no warnings
+ should be issued. Thus, specifying ! has the effect of silently forc-
+ ing the specified macro assignment.
-Dmake Version 4.9 2007-06-25 14
+Dmake Version 4.11 2007-10-13 14
-DMAKE(1) DMAKE(1)
- Macro expressions specified on the command line allow the macro value
- to be redefined within the makefile only if the macro is defined using
- the '+=' and '+:=' operators. Other operators will define a macro that
- cannot be further modified.
+DMAKE(1) DMAKE(1)
- Each of the preceeding macro assignment operators may be prefixed by !
- to indicate that the assignment should be forced and that no warnings
- should be issued. Thus, specifying ! has the effect of silently forc-
- ing the specified macro assignment.
When dmake defines a non-environment macro it strips leading and trail-
ing white space from the macro value. Macros imported from the envi-
@@ -1006,25 +1005,27 @@ DMAKE(1) DMAKE(1)
where modifier_list may be a combination of:
+ b or B - file (not including suffix) portion of path names
+ d or D - directory portion of all path names
+ e or E - suffix portion of path names
+ f or F - file (including suffix) portion of path names
+ i or I - inferred names of targets
+ n or N - normalized path names
+ l or L - macro value in lower case
+ u or U - macro value in upper case
+ 1 - return the first white space separated token from value
-Dmake Version 4.9 2007-06-25 15
+Dmake Version 4.11 2007-10-13 15
-DMAKE(1) DMAKE(1)
- b or B - file (not including suffix) portion of path names
- d or D - directory portion of all path names
- e or E - suffix portion of path names
- f or F - file (including suffix) portion of path names
- i or I - inferred names of targets
- l or L - macro value in lower case
- u or U - macro value in upper case
- 1 - return the first white space separated token from value
+DMAKE(1) DMAKE(1)
+
or a single one of:
@@ -1049,6 +1050,12 @@ DMAKE(1) DMAKE(1)
$(test:u) -> D1/D2/D3/A.OUT F.OUT D1/K.OUT
$(test:1) -> d1/d2/d3/a.out
+ For this macro
+ test = d1/d2/../a.out "d1/file name.ext"
+ the following results are returned:
+
+ $(test:n) -> d1/a.out "d1/file name.ext"
+
If a token ends in a string composed from the value of the macro
DIRBRKSTR (ie. ends in a directory separator string, e.g. '/' in UNIX)
and you use the :d modifier then the expansion returns the directory
@@ -1066,18 +1073,22 @@ DMAKE(1) DMAKE(1)
$(test:i) -> /tmp/aprog bprog
- The map escape codes modifier changes the following escape codes \a =>
- <bel>, \b => <backspace>, \f => <formfeed>, \n => <nl>, \r => <cr>, \t
+ The normalized path names :n modifier honors the setting of .WINPATH to
+ determine the output format of the result.
+
+ The map escape codes modifier changes the following escape codes \a =>
+ <bel>, \b => <backspace>, \f => <formfeed>, \n => <nl>, \r => <cr>, \t
=> <tab>, \v => <vertical tab>, \" => ", and \xxx => <xxx> where xxx is
- the octal representation of a character into the corresponding ASCII
+ the octal representation of a character into the corresponding ASCII
value.
- The tokenization, prepend and append modifier may use the same escape
+ The tokenization, prepend and append modifier may use the same escape
codes that are supported by the map escape codes modifier in the string
+ that is inserted, prepended or added by the respective macro modifier.
-Dmake Version 4.9 2007-06-25 16
+Dmake Version 4.11 2007-10-13 16
@@ -1086,12 +1097,11 @@ Dmake Version 4.9 2007-06-25 16
DMAKE(1) DMAKE(1)
- that is inserted, prepended or added by the respective macro modifier.
- These modifiers may quote this string to include otherwise problematic
+ These modifiers may quote this string to include otherwise problematic
characters. E.g. spaces, colons and parentheses.
- The tokenization modifier takes all white space separated tokens from
- the macro value and separates them by the separator string. Thus the
+ The tokenization modifier takes all white space separated tokens from
+ the macro value and separates them by the separator string. Thus the
expansion:
$(test:f:t"+\n")
@@ -1100,31 +1110,31 @@ DMAKE(1) DMAKE(1)
f.out+
k.out
- The prefix operator ^ takes all white space separated tokens from the
+ The prefix operator ^ takes all white space separated tokens from the
macro value and prepends string to each.
$(test:f:^mydir/)
produces:
mydir/a.out mydir/f.out mydir/k.out
- The suffix operator + takes all white space separated tokens from the
+ The suffix operator + takes all white space separated tokens from the
macro value and appends string to each.
$(test:b:+.c)
produces:
a.c f.c k.c
- The next non-standard form of macro expansion allows for recursive
- macros. It is possible to specify a $(macro_name) or ${macro_name}
- expansion where macro_name contains more $( ... ) or ${ ... } macro
+ The next non-standard form of macro expansion allows for recursive
+ macros. It is possible to specify a $(macro_name) or ${macro_name}
+ expansion where macro_name contains more $( ... ) or ${ ... } macro
expansions itself.
- For example $(CC$(_HOST)$(_COMPILER)) will first expand
- CC$(_HOST)$(_COMPILER) to get a result and use that result as the name
+ For example $(CC$(_HOST)$(_COMPILER)) will first expand
+ CC$(_HOST)$(_COMPILER) to get a result and use that result as the name
of the macro to expand. This is useful for writing a makefile for more
- than one target environment. As an example consider the following
- hypothetical case. Suppose that _HOST and _COMPILER are imported from
- the environment and are set to represent the host machine type and the
+ than one target environment. As an example consider the following
+ hypothetical case. Suppose that _HOST and _COMPILER are imported from
+ the environment and are set to represent the host machine type and the
host compiler respectively.
CFLAGS_VAX_CC = -c -O # _HOST == "_VAX", _COMPILER == "_CC"
@@ -1134,19 +1144,21 @@ DMAKE(1) DMAKE(1)
CFLAGS := $(CFLAGS$(_HOST)$(_COMPILER))
- This causes CFLAGS to take on a value that corresponds to the environ-
+ This causes CFLAGS to take on a value that corresponds to the environ-
ment in which the make is being invoked.
The final non-standard macro expansion is of the form:
string1{token_list}string2
- where string1, string2 and token_list are expanded. After expansion,
- string1 is prepended to each token found in token_list and string2 is
+ where string1, string2 and token_list are expanded. After expansion,
+ string1 is prepended to each token found in token_list and string2 is
+ appended to each resulting token from the previous prepend. string1
+ and string2 are not delimited by white space whereas the tokens in
-Dmake Version 4.9 2007-06-25 17
+Dmake Version 4.11 2007-10-13 17
@@ -1155,9 +1167,7 @@ Dmake Version 4.9 2007-06-25 17
DMAKE(1) DMAKE(1)
- appended to each resulting token from the previous prepend. string1
- and string2 are not delimited by white space whereas the tokens in
- token_list are. A null token in the token list is specified using "".
+ token_list are. A null token in the token list is specified using "".
Thus using another example we have:
test/{f1 f2}.o --> test/f1.o test/f2.o
@@ -1170,9 +1180,9 @@ DMAKE(1) DMAKE(1)
test/{d1 d2}/{f1 f2}.o --> test/d1/f1.o test/d1/f2.o
test/d2/f1.o test/d2/f2.o
- This last expansion is activated only when the first characters of
+ This last expansion is activated only when the first characters of
token_list appear immediately after the opening '{' with no intervening
- white space. The reason for this restriction is the following incom-
+ white space. The reason for this restriction is the following incom-
patibility with Bourne Shell recipes. The line
{ echo hello;}
@@ -1181,41 +1191,45 @@ DMAKE(1) DMAKE(1)
{echo hello;}
- is not. Hence the latter triggers the enhanced macro expansion while
- the former causes it to be suppressed. See the SPECIAL MACROS section
- for a description of the special macros that dmake defines and under-
+ is not. Hence the latter triggers the enhanced macro expansion while
+ the former causes it to be suppressed. See the SPECIAL MACROS section
+ for a description of the special macros that dmake defines and under-
stands.
RULES AND TARGETS
- A makefile contains a series of entries that specify dependencies.
- Such entries are called target/prerequisite or rule definitions. Each
+ A makefile contains a series of entries that specify dependencies.
+ Such entries are called target/prerequisite or rule definitions. Each
rule definition is optionally followed by a set of lines that provide a
- recipe for updating any targets defined by the rule. Whenever dmake
- attempts to bring a target up to date and an explicit recipe is pro-
- vided with a rule defining the target, that recipe is used to update
- the target. A rule definition begins with a line having the following
+ recipe for updating any targets defined by the rule. Whenever dmake
+ attempts to bring a target up to date and an explicit recipe is pro-
+ vided with a rule defining the target, that recipe is used to update
+ the target. A rule definition begins with a line having the following
syntax:
<targets> [<attributes>] <ruleop> [<prerequisites>] [;<recipe>]
- targets is a non-empty list of targets. If the target is a special
+ targets is a non-empty list of targets. If the target is a special
target (see SPECIAL TARGETS section below) then it must appear alone on
the rule line. For example:
.IMPORT .ERROR : ...
is not allowed since both .IMPORT and .ERROR are special targets. Spe-
- cial targets are not used in the construction of the dependency graph
+ cial targets are not used in the construction of the dependency graph
and will not be made.
- attributes is a possibly empty list of attributes. Any attribute
+ attributes is a possibly empty list of attributes. Any attribute
defined in the ATTRIBUTES section above may be specified. All
- attributes will be applied to the list of named targets in the rule
+ attributes will be applied to the list of named targets in the rule
definition. No other targets will be affected.
+ NOTE: As stated earlier, if both the target list and prerequisite
+ list are empty but the attributes list is not, then the
+
+
-Dmake Version 4.9 2007-06-25 18
+Dmake Version 4.11 2007-10-13 18
@@ -1224,31 +1238,29 @@ Dmake Version 4.9 2007-06-25 18
DMAKE(1) DMAKE(1)
- NOTE: As stated earlier, if both the target list and prerequisite
- list are empty but the attributes list is not, then the speci-
- fied attributes affect all targets in the makefile.
+ specified attributes affect all targets in the makefile.
- ruleop is a separator which is used to identify the targets from the
- prerequisites. Optionally it also provides a facility for modifying
- the way in which dmake handles the making of the associated targets.
+ ruleop is a separator which is used to identify the targets from the
+ prerequisites. Optionally it also provides a facility for modifying
+ the way in which dmake handles the making of the associated targets.
In its simplest form the operator is a single ':', and need not be sep-
arated by white space from its neighboring tokens. It may additionally
be followed by any of the modifiers { !, ^, -, :, | }, where:
! says execute the recipe for the associated targets once for each
- out of date prerequisite. (The meaning of the runtime macro $?
+ out of date prerequisite. (The meaning of the runtime macro $?
is changed, see below in the RUNTIME MACROS section.) Ordinarily
the recipe is executed once for all out of date prerequisites at
the same time.
- ^ says to insert the specified prerequisites, if any, before any
- other prerequisites already associated with the specified tar-
- gets. In general, it is not useful to specify ^ with an empty
+ ^ says to insert the specified prerequisites, if any, before any
+ other prerequisites already associated with the specified tar-
+ gets. In general, it is not useful to specify ^ with an empty
list of prerequisites.
- - says to clear the previous list of prerequisites before adding
+ - says to clear the previous list of prerequisites before adding
the new prerequisites. Thus,
foo :
@@ -1260,50 +1272,49 @@ DMAKE(1) DMAKE(1)
however the old form still works as expected.
- : When the rule operator is not modified by a second ':' only one
- set of rules may be specified for making a target. Multiple
+ : When the rule operator is not modified by a second ':' only one
+ set of rules may be specified for making a target. Multiple
definitions may be used to add to the list of prerequisites that
- a target depends on. However, if a target is multiply defined
- only one definition may specify a recipe for making the target.
+ a target depends on. However, if a target is multiply defined
+ only one definition may specify a recipe for making the target.
- When a target's rule operator is modified by a second ':' (::
+ When a target's rule operator is modified by a second ':' (::
for example) then this definition may not be the only definition
with a recipe for the target. There may be other :: target def-
inition lines that specify a different set of prerequisites with
- a different recipe for updating the target. Any such target is
- made if any of the definitions find it to be out of date with
- respect to the related prerequisites and the corresponding
- recipe is used to update the target. By definition all '::'
+ a different recipe for updating the target. Any such target is
+ made if any of the definitions find it to be out of date with
+ respect to the related prerequisites and the corresponding
+ recipe is used to update the target. By definition all '::'
recipes that are found to be out of date for are executed.
- In the following simple example, each rule has a `::' ruleop.
- In such an operator we call the first `:' the operator, and the
+ In the following simple example, each rule has a `::' ruleop.
+ In such an operator we call the first `:' the operator, and the
second `:' the modifier.
a.o :: a.c b.h
+ first recipe for making a.o
+ a.o :: a.y b.h
+ second recipe for making a.o
-Dmake Version 4.9 2007-06-25 19
+Dmake Version 4.11 2007-10-13 19
-DMAKE(1) DMAKE(1)
+DMAKE(1) DMAKE(1)
- first recipe for making a.o
-
- a.o :: a.y b.h
- second recipe for making a.o
- If a.o is found to be out of date with respect to a.c then the
- first recipe is used to make a.o. If it is found out of date
- with respect to a.y then the second recipe is used. If a.o is
+ If a.o is found to be out of date with respect to a.c then the
+ first recipe is used to make a.o. If it is found out of date
+ with respect to a.y then the second recipe is used. If a.o is
out of date with respect to b.h then both recipes are invoked to
- make a.o. In the last case the order of invocation corresponds
- to the order in which the rule definitions appear in the make-
+ make a.o. In the last case the order of invocation corresponds
+ to the order in which the rule definitions appear in the make-
file.
| Is defined only for PERCENT rule target definitions. When spec-
@@ -1318,13 +1329,13 @@ DMAKE(1) DMAKE(1)
%.o : %.r ; some rule
%.o : %.f ; some rule
- Targets defined using a single `:' operator with a recipe may be rede-
- fined again with a new recipe by using a `:' operator with a `:' modi-
- fier. This is equivalent to a target having been initially defined
+ Targets defined using a single `:' operator with a recipe may be rede-
+ fined again with a new recipe by using a `:' operator with a `:' modi-
+ fier. This is equivalent to a target having been initially defined
with a rule using a `:' modifier. Once a target is defined using a `:'
- modifier it may not be defined again with a recipe using only the `:'
+ modifier it may not be defined again with a recipe using only the `:'
operator with no `:' modifier. In both cases the use of a `:' modifier
- creates a new list of prerequisites and makes it the current prerequi-
+ creates a new list of prerequisites and makes it the current prerequi-
site list for the target. The `:' operator with no recipe always modi-
fies the current list of prerequisites. Thus assuming each of the fol-
lowing definitions has a recipe attached, then:
@@ -1337,8 +1348,8 @@ DMAKE(1) DMAKE(1)
joe :: fred ... (3)
joe :: more ... (4)
- are legal and mean: add the recipe associated with (2), or (4) to the
- set of recipes for joe, placing them after existing recipes for making
+ are legal and mean: add the recipe associated with (2), or (4) to the
+ set of recipes for joe, placing them after existing recipes for making
joe. The constructs:
joe :: fred ... (5)
@@ -1349,68 +1360,62 @@ DMAKE(1) DMAKE(1)
joe : fred ... (7)
joe : more ... (8)
- are errors since we have two sets of perfectly good recipes for making
+ are errors since we have two sets of perfectly good recipes for making
+ the target.
+ prerequisites is a possibly empty list of targets that must be brought
+ up to date before making the current target.
+ recipe is a short form and allows the user to specify short rule defi-
+ nitions on a single line. It is taken to be the first recipe line in a
-Dmake Version 4.9 2007-06-25 20
+Dmake Version 4.11 2007-10-13 20
-DMAKE(1) DMAKE(1)
- the target.
+DMAKE(1) DMAKE(1)
- prerequisites is a possibly empty list of targets that must be brought
- up to date before making the current target.
- recipe is a short form and allows the user to specify short rule defi-
- nitions on a single line. It is taken to be the first recipe line in a
- larger recipe if additional lines follow the rule definition. If the
- semi-colon is present but the recipe line is empty (ie. null string)
- then it is taken to be an empty rule. Any target so defined causes the
- Don't know how to make ... error message to be suppressed when dmake
- tries to make the target and fails. This silence is maintained for
- rules that are terminated by a semicolon and have no following recipe
- lines, for targets listed on the command line, for the first target
- found in the makefile, and for any target having no recipe but contain-
- ing a list of prerequisites (see the COMPATIBILITY section for an
- exception to this rule if the AUGMAKE (-A) flag was specified).
+ larger recipe if additional lines follow the rule definition. If the
+ semi-colon is present but the recipe line is empty (ie. null string)
+ then it is taken to be an empty rule. Any target so defined causes
+ target to be treated as a virtual target, see VIRTUAL TARGETS below.
RECIPES
The traditional format used by most versions of Make defines the recipe
- lines as arbitrary strings that may contain macro expansions. They
- follow a rule definition line and may be spaced apart by comment or
- blank lines. The list of recipe lines defining the recipe is termi-
- nated by a new target definition, a macro definition, or end-of-file.
- Each recipe line MUST begin with a <TAB> character (or spaces, see
+ lines as arbitrary strings that may contain macro expansions. They
+ follow a rule definition line and may be spaced apart by comment or
+ blank lines. The list of recipe lines defining the recipe is termi-
+ nated by a new target definition, a macro definition, or end-of-file.
+ Each recipe line MUST begin with a <TAB> character (or spaces, see
.NOTABS) which may optionally be followed with one or all the following
recipe property characters '@%+-' which affect the recipe execution:
- '-' indicates that non-zero exit values (ie. errors) are to be
+ '-' indicates that non-zero exit values (ie. errors) are to be
ignored when this recipe line is executed.
- '+' indicates that the current recipe line is to be executed using
+ '+' indicates that the current recipe line is to be executed using
the shell. Group recipes implicitely ignore this property.
'%' indicates that dmake should swap itself out to secondary storage
(MSDOS only) before running the recipe.
- '@' indicates that the recipe line should NOT be echoed to the ter-
+ '@' indicates that the recipe line should NOT be echoed to the ter-
minal prior to being executed.
- '@@' is a stronger version of the previous property. The recipe line
- and the output (stdout and stderr) of the executed recipe are
+ '@@' is a stronger version of the previous property. The recipe line
+ and the output (stdout and stderr) of the executed recipe are
NOT shown on the terminal.
- Each property is off by default (ie. by default, errors are signifi-
+ Each property is off by default (ie. by default, errors are signifi-
cant, commands are echoed, no swapping is done and a shell is used only
- if the recipe line contains a character found in the value of the
- SHELLMETAS macro). Global settings activated via command line options
- or special attribute or target names may also affect these settings.
+ if the recipe line contains a character found in the value of the
+ SHELLMETAS macro). Global settings activated via command line options
+ or special attribute or target names may also affect these settings.
An example recipe:
target :
@@ -1419,33 +1424,33 @@ RECIPES
@a recipe line that is not echoed
-and one that has errors ignored
%and one that causes dmake to swap out
+ +and one that is executed using a shell.
+ The second and new format of the recipe block begins the block with the
+ character '[' (the open group character) in the last non-white space
+ position of a line, and terminates the block with the character ']'
+ (the close group character) in the first non-white space position of a
+ line. In this form each recipe line need not have a leading TAB. This
+ is called a recipe group. Groups so defined are fed intact as a single
+ unit to a shell for execution whenever the corresponding target needs
+ to be updated. If the open group character '[' is preceded by one or
+ all of the recipe properties (-, %, @ and @@) then they apply to the
+ entire group in the same way that they apply to single recipe lines.
+ You may also specify '+' but it is redundant as a shell is already
+ being used to run the recipe. See the MAKING TARGETS section for a
+ description of how dmake invokes recipes. Here is an example of a
-Dmake Version 4.9 2007-06-25 21
+Dmake Version 4.11 2007-10-13 21
-DMAKE(1) DMAKE(1)
+DMAKE(1) DMAKE(1)
- +and one that is executed using a shell.
- The second and new format of the recipe block begins the block with the
- character '[' (the open group character) in the last non-white space
- position of a line, and terminates the block with the character ']'
- (the close group character) in the first non-white space position of a
- line. In this form each recipe line need not have a leading TAB. This
- is called a recipe group. Groups so defined are fed intact as a single
- unit to a shell for execution whenever the corresponding target needs
- to be updated. If the open group character '[' is preceded by one or
- all of the recipe properties (-, %, @ and @@) then they apply to the
- entire group in the same way that they apply to single recipe lines.
- You may also specify '+' but it is redundant as a shell is already
- being used to run the recipe. See the MAKING TARGETS section for a
- description of how dmake invokes recipes. Here is an example of a
group recipe:
target :
@@ -1460,8 +1465,8 @@ DMAKE(1) DMAKE(1)
BUILTIN COMMANDS
dmake supports some builtin commands. An optional leading '+' describes
that the builtin can be used also when being executed in a shell other-
- wise it is only implemented when used directly. Remember that if a
- character of the recipe is found in the SHELLMETAS macro the execution
+ wise it is only implemented when used directly. Remember that if a
+ character of the recipe is found in the SHELLMETAS macro the execution
of the recipe in a shell is forced.
[+]noop [something]
@@ -1471,48 +1476,51 @@ BUILTIN COMMANDS
the runtime of the recipe without starting a real commmand.
[+]<empty recipe>
- If an empty recipe line is encountered it is not executed. This
- sounds more trivial than it really is because the recipe could
- consist of macros that evaluated to empty or whitespace only
+ If an empty recipe line is encountered it is not executed. This
+ sounds more trivial than it really is because the recipe could
+ consist of macros that evaluated to empty or whitespace only
strings.
echo [-n] data
- This internal command prints data (with all leading whitespace
- removed, but otherwise literally) to stdout. If the '-n' switch
+ This internal command prints data (with all leading whitespace
+ removed, but otherwise literally) to stdout. If the '-n' switch
is given no trailing newline is printed. Note that no quoting is
removed nor that escape sequences are handled.
- No special treatment of buildin commands for group recipes is imple-
- mented even though the <empty recipe> will most propably also not be
- evaluated by most shells that can be used to handle the recipe groups.
+ No special treatment of buildin commands for group recipes is imple-
+ mented even though the <empty recipe> will most propably also not be
+ evaluated by most shells that can be used to handle the recipe groups.
TEXT DIVERSIONS
- dmake supports the notion of text diversions. If a recipe line con-
+ dmake supports the notion of text diversions. If a recipe line con-
tains the macro expression
+ $(mktmp[,[file][,text]] data)
+ then all text contained in the data expression is expanded and is writ-
+ ten to a temporary file. The data in the file will always be termi-
+ nated from a new line character. The file parameter can be used to
+ override the name of the temporary file. If its expanded value is not
+ empty it will be used instead of the unique and thread safe file name
+ that otherwise would be generated internally. The return value of the
+ macro is the name of the temporary file unless the text parameter is
+ defined. In this case the return value is the expanded value of text.
-Dmake Version 4.9 2007-06-25 22
+ data can be any text and must be separated from the 'mktmp' portion of
+ the macro name by white-space. The only restriction on the data text
+ is that it must contain a balanced number of parentheses of the same
+ kind as are used to initiate the $(mktmp ...) expression. For example:
+Dmake Version 4.11 2007-10-13 22
-DMAKE(1) DMAKE(1)
- $(mktmp[,[file][,text]] data)
- then all text contained in the data expression is expanded and is writ-
- ten to a temporary file. The data in the file will always be termi-
- nated from a new line character. The return value of the macro is the
- name of the temporary file unless the text parameter is defined. In
- this case the return value is the expanded value of text.
+DMAKE(1) DMAKE(1)
- data can be any text and must be separated from the 'mktmp' portion of
- the macro name by white-space. The only restriction on the data text
- is that it must contain a balanced number of parentheses of the same
- kind as are used to initiate the $(mktmp ...) expression. For example:
$(mktmp $(XXX))
@@ -1559,32 +1567,32 @@ DMAKE(1) DMAKE(1)
joe.obj
The last line of the file is terminated by a new-line which is always
+ inserted at the end of the data string.
+ If the optional file specifier is present it can be used to specify the
+ name of the temporary file to create. An example that would be useful
+ for MSDOS users with a Turbo-C compiler
+ $(mktmp,turboc.cfg $(CFLAGS))
-Dmake Version 4.9 2007-06-25 23
+ will place the contents of CFLAGS into a local turboc.cfg file. The
+ second optional argument, text, if present alters the name of the value
+ returned by the $(mktmp ...) macro.
+ Under MS-DOS text diversions may be a problem. Many DOS tools require
+ that path names which contain directories use the \ character to
+Dmake Version 4.11 2007-10-13 23
-DMAKE(1) DMAKE(1)
- inserted at the end of the data string.
- If the optional file specifier is present then its expanded value is
- the name of the temporary file to create. An example that would be
- useful for MSDOS users with a Turbo-C compiler
- $(mktmp,turboc.cfg $(CFLAGS))
+DMAKE(1) DMAKE(1)
- will place the contents of CFLAGS into a local turboc.cfg file. The
- second optional argument, text, if present alters the name of the value
- returned by the $(mktmp ...) macro.
- Under MS-DOS text diversions may be a problem. Many DOS tools require
- that path names which contain directories use the \ character to
delimit the directories. Some users however wish to use the '/' to
delimit pathnames and use environments that allow them to do so. The
macro USESHELL is set to "yes" if the current recipe is forced to use a
@@ -1615,6 +1623,27 @@ DMAKE(1) DMAKE(1)
can modify the location of temporary files by defining a macro named
TMPDIR and exporting it using the .EXPORT special target.
+VIRTUAL TARGETS
+ Dmake allows to define targets with the sole purpose to enforce a
+ dependency chain that are unable to create the target, hence virtual
+ targets. When dmake tries to make a target, but only finds a target
+ definition without recipe lines, it would normally issues a "Don't know
+ how to make ..." error message, but if a target rule is terminated by a
+ semicolon and has no following recipe lines, or if it has no recipe
+ lines, but defines prerequisites, or if the AUGMAKE mode is enabled
+ (see the COMPATIBILITY section for details), the target is treated as a
+ virtual target and the error is suppressed. In addition to this, if the
+ default target does not have recipe lines it is also treated as a vir-
+ tual target.
+
+ Virtual targets should not have a corresponding file therefore they
+ inherit the time of their newest prerequisite if they have prerequi-
+ sites, otherwise they get the current time assigned when being made.
+ If the virtual target has a corresponding file a warning is issued, but
+ the time stamp of that file is taken into account. The virtual target
+ uses the time stamp of the corresponding file if it is newer than the
+ one determined by the previous rule.
+
SPECIAL TARGETS
This section describes the special targets that are recognized by
dmake. Some are affected by attributes and others are not.
@@ -1623,16 +1652,10 @@ SPECIAL TARGETS
executed whenever an error condition is detected by
dmake. All attributes that can be used with any other
target may be used with this target. Any prerequisites
- of this target will be brought up to date during its pro-
- cessing. NOTE: errors will be ignored while making this
- target, in extreme cases this may cause some problems.
- .EXIT If this target is encountered while parsing a makefile
- then the parsing of the makefile is immediately
-
-Dmake Version 4.9 2007-06-25 24
+Dmake Version 4.11 2007-10-13 24
@@ -1641,7 +1664,13 @@ Dmake Version 4.9 2007-06-25 24
DMAKE(1) DMAKE(1)
- terminated at that point.