![]() | :: | Software | :: | build |
build-dist opts proj [ version tmpdir ]where opts is a set of options as listed below, proj is a subdirectory of /package, version is a version number, and tmpdir is a temporary directory name. The temporary directory must not already exist.
-m: make (default): Copy to the archive all files required to compile the project with make.
-b: build: Include do files and control files in the output.
Files in the archive have leading path prog-version/ if version is present, and prog/ otherwise. All path components but the last are sticky, to conform with /package conventions.
The file package/dist lists files and directories to include in the output. Files are listed one per line, and the first empty line terminates the list. Anything after the first empty line is ignored. If package/dist does not exist, then build-dist uses BUILD/conf/dist, where BUILD is the package directory for build, e.g. /package/host/superscript.com/prog/build-0.60.
The file package/exclude lists files and directories to exclude from the output. Files are listed one per line, and the first empty line terminates the list. Anything after the first empty line is ignored. If package/exclude does not exist, then build-dist uses BUILD/conf/exclude. This exclusion mechanism makes it easy to apply external version control to project source code.
If version is nonempty, then build-dist substitutes the version for the string VERSION and the package name (e.g. build) for the string PACKAGE. So, for example, if the project file package/version consists of the single line:
VERSIONthen build-dist will substitute version into the file in the archive.
build-dist host/superscript.com/prog/build 0.60 /package/tmp.$$ \
> /package/build-0.60.tar.gz
Create a distribution archive for /package/host/superscript.com/prog/djblib-0.30:
build-dist -b host/superscript.com/prog/djblib 0.30 /package/tmp.$$ \
> /package/djblib-0.30.tar.gz
Create a nonversion archive of the build package:
build-dist -b build > build.tar.gz