build
build
bld
1998 12-06
NAME
build - build tool
SYNOPSIS
build -? {true|false} -V {true|false} -d {true|false}
-f filename -h {true|false} -k {true|false}
-n {true|false} -q {true|false} -s {true|false}
-u {true|false} -v {true|false} [target...]
OPTIONS
The following options are available for build:
-d
Enable debugging messages. This may be useful in attempting to analyze
problems.
-? {true|false}
Print help information and exit. The default is false.
-V {true|false}
Print verbose debugging information. The default is false.
-d {true|false}
Print debugging information. The default is false.
-f filename
Read the build description from filename. The default is
./.bld.
-h {true|false}
Print help information and exit. The default is false.
-k {true|false}
Continue building even in case of failures. The default is false.
-n {true|false}
Avoid execution of commands. The default is false.
-q {true|false}
Suppress the printing of commands prior to execution. The default is
false.
-s {true|false}
Suppress the printing of the output of commands. The default is false.
-u {true|false}
Rebuild all targets unconditionally (i.e., regardless of their
modification time). The default is false.
-v {true|false}
Print version information and exit. The default is false.
DESCRIPTION
build provides platform-independent building capability similar to
the UNIX utility make. build executes zero or more operations
to build a target according to a build description specified by the
user.
ENVIRONMENT
BLD_DEBUG
Enables printing of debugging information when its value is true.
BLD_FILE
Specifies the build description file. Relative path-names are evaluated
with respect to the current directory.
BLD_IGNORE_SYSTEM_FAILURES
Enables persistence in the face of failures of system commands when its
value is true. Normally, build stops all work when a command
fails.
BLD_IGNORE_TARGET_FAILURES
Enables persistence in the face of failures of build targets when its
value is true. Normally, build stops all work when a target
fails.
BLD_NO_EXECUTION
Disables execution of commands when its value is true
BLD_PERSIST
Enables persistence in the face of failures when its value is
true. Normally, build stops all work when anything fails.
BLD_PRINT_HELP
Enables printing of help information when its value is true. This
results in build exiting as soon as the help information is printed,
which lowers its usefulness as an environment variable.
BLD_PRINT_VERSION
Enables printing of version information when its value is true.
This results in build exiting as soon as the version information is
printed, which lowers its usefulness as an environment variable.
BLD_QUIET
Disables printing of the command prior to execution when its value is
true.
BLD_SILENT
Disables printing of the output from a command when its value is
true.
BLD_UNCONDITIONAL_REBUILD
Disables the use of file modification times in the build avoidance
algorithm when its value is true.
BLD_VERBOSE
Enables printing of debugging information when its value is true.
EXIT STATUS
The following exit values are returned by build:
- 0
Successful completion.
- -1
One or more targets failed.
FILES
./.bld
Contains the default build rules.
NOTES
While build is platform-independent, the commands used to build
targets are given to the local operating system to execute. Portable
build descriptions should include abstraction around platform-dependent
functionality. For example, the rule could refer to a variable whose
values contains the command appropriate for the platform (e.g.,
grep vs. findstr). Or, the rule could invoke a command
which is a platform-dependent script guaranteed to be present, with the
same name, on all platforms.
To support the common use of the character '.' as a separator
between file names and extensions, its use as a meta-character in
regular expressions has been disabled. In its place, the character
range [!-~] is functionally equivalent.
Since all built-in functions are treated equally and variable
evaluation is performed for all, the directory, file, and targets for
nested builds via build can be specified using variables. Thus,
all three can be determined at build time.
DIAGNOSTICS
Arguments are given to the underlying operating system exactly as
defined in the build description. Specifically, directory separators
are left intact, which may cause problems for some file systems.
Handling of variable expansion in naked strings is not graceful.
Particularly the string $(0).cc will not evaluate properly
because the parser is expected white-space after naked variables.
"$(0).cc" is required to build a string consisting of ".cc"
appended to the contents of the variable 0.
Unquoted arguments should not contain meta-characters, such as
':'. If the arguments do contain such meta-characters, the
arguments should be protected by single- or double-quotes.
The parser reports errors at the line where the parser failed, which
may not be the line which caused the error, and provides no explanation
about the cause of the error.
BUGS
String evaluation is quirky and does not handle nested sub-expressions
very well. Additionally, variable evaluations with concatenated string
literals require enclosing double-quotes.
Line continuation (e.g. '\\' at the end of the line) is not
implemented.
System commands are not currently parallelized.