other versions
- wheezy 20060615-6
| OZMAKE(1) | General Commands Manual | OZMAKE(1) |
NAME¶
Ozmake - Make for OzSYNOPSIS¶
ozmake --helpDESCRIPTION¶
ozmake OPTIONS TARGETSOPTIONS¶
In the following, we write meta variables between angle brackets, e.g. <PREFIX> or <URI as cache path>General Options¶
- -v --verbose
-
print out more tracing information that the default. By supplying this option twice, you will sometimes get even more information.
- -q --quiet
-
suppress all tracing and feedback information
- -n --just-print
-
perform a dry run, i.e. just print what would happen without actually performing the actions
- --local
-
do not recurse into subdirectories
- --(no)autodepend
-
default: trueautomatically determine build-time and install-time (run-time) dependencies. Currently, this is only supported for Oz sources by looking at import and require sections.
- --(no)requires
-
default: trueautomatically fetch and install other packages that the current one requires. This option is relevant both for building and for installing.
Directories and URLs¶
- --prefix=<PREFIX>
-
default: ~/.ozroot of private installation area
- --dir=<DIR>
-
default: current directorydefault directory for other options below
- --builddir=<BUILDDIR>
-
default: <DIR>directory in which to build
- --srcdir=<SRCDIR>
-
default: <DIR>directory where source files are located
- --bindir=<BINDIR>
-
default: <PREFIX>/bindirectory where bin targets are placed
- --libroot=<LIBROOT>
-
default: <PREFIX>/cacheroot directory of cache into which lib targets are installed
- --libdir=<LIBDIR>
-
default: <LIBROOT>/<URI as cache path>directory into which lib targets are installed
- --docroot=<DOCROOT>
-
default: <PREFIX>/docroot directory into which doc targets are installed
- --docdir=<DOCDIR>
-
default: <DOCROOT>/<MOGUL as filename>directory into which doc targets are installed
- --extractdir=<EXTRACTDIR>
-
default: <DIR>directory into which to extract a package
- --archive=<ARCHIVE>
-
default: http://www.mozart-oz.org/mogul/pkgURL of mogul archive from which packages can be downloaded
- --moguldir=<MOGULDIR>
-
directory in which are placed sub-directories for the user's contributions: a directory for packages, one for documentation, one for mogul database entries.
- --mogulurl=<MOGULURL>
-
url corresponding to the MOGULDIR directory
Files¶
- -m <FILE> --makefile=<FILE>
-
default: <SRCDIR>/makefile.ozlocation of makefile
- -p <PKG> --package=<PKG>
-
file or URL of package. when creating a package, it should be a local filename. when extracting or installing, it can also be a URL or a mogul id; in the latter case, the package is automatically downloaded from the mogul archive
- -V <VERSION> --packageversion=<VERSION>
-
this option is respected by --extract and --install .When --extract is given a MOGUL id and downloads the corresponding package from the MOGUL archive, it will look precisely for the given VERSION of the package. --install will simply check that the package to be installed really has this VERSION.
- --database=<DB>
-
default: <PREFIX>/DATABASEbase path of installed packages database. The database is saved in both pickled and textual format respectively in files DB.ozf and DB.txt
Help¶
ozmake --help- -h --help
-
print this information message
Build¶
ozmake [--build]build all targets
build these target
- -b --build
-
this is the default. builds targets of the package
- --optlevel=( none | debug | optimize )
-
default: optimizeselect optimization level for compilation
- -g --debug --optlevel=debug
-
compile with debugging
- -O --optimize --optlevel=optimize
-
compile with full optimization. this is the default
- --(no)gnu
-
is the C++ compiler the GNU compiler. this is determined automatically and allows a greater optimization level, namely passing -O3 rather than just -O to the compiler
- --(no)fullbuild
-
default: falsealso build the src targets
- --includedir DIR -I DIR
-
tell the C++ compiler to additionally search DIR for include files
- --(no)sysincludedirs
-
default: truetell the C++ compiler to additionally search (or not, if using --nosysincludedirs )the Mozart-specific include directories located in the global installation directory and in the user's private ~/.oz area.
- --librarydir DIR -L DIR
-
tell the C++ linker to additionally search DIR for libraries
- --(no)syslibrarydirs
-
default: truetell the C++ linker to additionally search (or not, if using --nosyslibrarydirs )the Mozart-specific library directories located in the global installation directory and in the user's private ~/.oz area.
Install¶
ozmake --installinstall using the makefile
install these targets using the makefile
install package PKG
- -i --install
-
install targets of the package and updates the package database
- --grade=( none | same | up | down | any | freshen )
-
default: nonewhat to do if this package is already installed? ozmake will compare version and dates, where the version is more significant. --grade=none signals an error --grade=same requires versions and dates to be the same --grade=up requires a package with newer version or same version and newer release date than the one installed --grade=down requires a package with older version or same version and older release date than the one installed --grade=any no conditions --grade=freshen install if the package is newer else do nothing
- -U --upgrade
-
equivalent to --install --grade=up
- --downgrade
-
equivalent to --install --grade=down
- -A --anygrade
-
equivalent to --install --grade=any
- -F --freshen
-
equivalent to --install --grade=freshen
- --(no)replacefiles
-
default: falseallow installation to overwrite files from other packages
- -R --replace
-
equivalent to --install --grade=any --replacefiles
- --(no)extendpackage
-
default: falsewhether to replace or extend the current installation of this package if any
- -X --extend
-
equivalent to --install --grade=any --extendpackage
- --(no)savedb
-
default: truesave the updated database after installation
- --includedocs --excludedocs
-
default: --includedocswhether to install the doc targets
- --includelibs --excludelibs
-
default: --includelibswhether to install the lib targets
- --includebins --excludebins
-
default: --includebinswhether to install the bin targets
- --(no)keepzombies
-
default: falsewhether to remove files left over from a previous installation of this package
- --exe=( default | yes | no | both | multi )
-
default: defaultthe convention on Windows is that executables have a .exe,while on Unix they have no extension. The --exe option allows you to control the conventions used by ozmake when installing executables. --exe=default use the platform's convention --exe=yes use a .exe extension --exe=no use no extension --exe=both install all executables with .exe extension and without --exe=multi install executable functors for both Unix and Windows. The Unix versions are installed without extension, and the Windows versions are installed with .exe extension
Uninstall¶
ozmake --uninstalluninstall package described by makefile
uninstall package named by mogul id
PKG
- -e --uninstall
-
uninstall a package
Clean¶
ozmake --cleanremove files as specified by the makefile's
clean and veryclean features. --veryclean implies --clean
.
Create¶
ozmake --create [--package=<FILE>]create a package and save it in FILE.the files
needed for the package are automatically computed from the makefile. If
--package= <FILE> is not supplied, a default is computed
using the mogul id (and possibly version number) found in the makefile.
- --include(bins|libs|docs) --exclude(bins|libs|docs)
-
control which target types are included in the package
Publish¶
ozmake --publishautomatically takes care of all the steps
necessary for creating/updating a package contributed by the user and making
all necessary data available to the MOGUL librarian. See documentation for
--mogul below.
Extract¶
ozmake --extract --package=<PKG>extract the files from file or URL PKG.if PKG
is a mogul id, then the package is automatically downloaded from the mogul
archive
List¶
ozmake --listlist info for all packages in the installed
package database
list info for the installed package identified
by mogul id MOGUL
- --linewidth=N
-
default: 70assume a line with of N characters
Config¶
ozmake --config=put <OPTIONS>record the given OPTIONS in ozmake's
configuration database, and use them as defaults in subsequent invocations of
ozmake unless explicitly overridden on the command line. For example:
ozmake --config=put --prefix=/usr/local/oz saves /usr/local/oz as the
default value for option --prefix
deletes some entries from the configuration
database. For example: ozmake --config=delete prefix removes the
default for --prefix from the configuration database
lists the contents of ozmake's configuration
database
Mogul¶
If you choose to contribute packages to the MOGUL archive, ozmake --mogul= <ACTION> simplifies your task. It makes it easy for you to maintain a database of your contributions and to export them so that the MOGUL librarian may automatically find them. In fact, the simplest way is to use ozmake --publish which will take take care of all details for you.update the user's database of own mogul
contributions with the data for this contribution (in local directory)
same as above, but using the package PKG
explicitly given
remove the entries with mogul ids MOG1 through
MOGn from the user's database of own contribution
remove entry for current contribution
show the recorded data for all entries in the
user's database of own mogul contributions
show the recorded data for entries MOG1
through MOGn in the user's database of own mogul contributions
write all necessary mogul entries for the
user's own mogul contributions. These are the entries which will be read by
the MOGUL librarian to automatically assemble the full MOGUL database.
- --moguldir=<MOGULDIR>
-
- --mogulurl=<MOGULURL>
-
MOGULDIR is a directory which is also available on the WEB through url MOGULURL. MOGULDIR is intended as a root directory in which sub-directories for packages, documentation, and mogul entries will be found.
- --mogulpkgdir=<MOGULPKGDIR>
-
default: <MOGULDIR>/pkg/<ID>/
- --mogulpkgurl=<MOGULPKGURL>
-
default: <MOGULURL>/pkg/<ID>/
- --moguldocdir=<MOGULDOCDIR>
-
default: <MOGULDIR>/doc/<ID>/
- --moguldocurl=<MOGULDOCURL>
-
default: <MOGULURL>/doc/<ID>/
- --moguldbdir=<MOGULDBDIR>
-
default: <MOGULDIR>/db/<ID>/
- --moguldburl=<MOGULDBURL>
-
default: <MOGULURL>/db/<ID>/
- --mogulrootid=<ROOTID>
-
MAKEFILE¶
The makefile contains a single Oz record which describes the project and should normally be placed in a file called makefile.oz.A makefile typically looks like this:makefile(
lib : ['Foo.ozf']
uri : 'x-ozlib://mylib'
mogul : 'mogul:/denys/lib-foo')
x-ozlib://mylib/Foo.ozf
makefile(
bin : [ FILES... ]
lib : [ FILES... ]
doc : [ FILES... ]
src : [ FILES... ]
depends :
o( FILE : [ FILES... ]
...
)
rules :
o( FILE : TOOL(FILE)
...
)
clean : [ GLOB... ]
veryclean : [ GLOB... ]
uri : URI
mogul : MOGUL
author : [ AUTHORS... ]
released : DATE
blurb : TEXT
info_text : TEXT
info_html : TEXT
subdirs : [ DIRS... ]
requires : [ MOGUL... ]
categories: [ CATEGORY... ]
version : VERSION
provides : [ FILES... ]
)
Extensions¶
ozmake knows how to build targets by looking at the target's extension:Foo.exe
- is an executable functor and is created from Foo.ozf
Foo.ozf
- is a compiled functor and is created from Foo.oz
Foo.o
- is a compiled C++ file and is created from Foo.cc
Foo.so
- is a native functor and is created from Foo.o
Foo.cc
- is a C++ source file
Foo.hh
- is a C++ header file
Rules¶
ozmake has built-in rules for building files. Occasionally, you may want to override the default rule for one or more targets. This is done with feature rule which contains a record mapping target to rule:TARGET_FILE : TOOL(SOURCE_FILE)
TARGET_FILE : TOOL(SOURCE_FILE OPTIONS)
'Foo.exe' : ozl('Foo.ozf' [executable])
'Foo.ozf' : ozc('Foo.oz')
'Foo.o' : cc('Foo.cc')
'Foo.so' : ld('Foo.o')
ozc
executable
- make the result executable
'define'(S)
- define macro S.Same as -DS on the command
line
ozl
executable
- make the result executable
cc
include(DIR)
- Similar to the usual C++ compiler option -IDIR. DIR is a virtual string
'define'(MAC)
- Similar to the usual C++ compiler option -DMAC.
MAC is a virtual string
ld
library(DIR)
- Similar to the usual C++ linker option -lDIR.
DIR is a virtual string
'Utils.ozf' : ozl('Foo.ozf')
'Foo.exe' : ozc('Foo.oz' [executable])
Dependencies¶
ozmake automatically determines whether targets needed to be rebuilt, e.g. because they are missing or if some source file needed to create them has been modified. The rules are used to determine dependencies between files. Sometimes this is insufficient e.g. because you use tool ozl (dependencies on imports), or insert in an Oz file, or #include in a C++ file. In this case you can specify additional dependencies using feature depends which is a record mapping targets to list of dependencies:TARGET : [ FILES... ]
'Foo.o' : [ 'Foo.hh' 'Baz.hh' ]
'Foo.exe' : [ 'Lib1.ozf' 'Lib2.ozf' ]
Cleaning¶
During development, it is often convenient to be able to easily remove all junk and compiled files to obtain again a clean project directory. This is supported by ozmake --clean and ozmake --veryclean;the latter also implies the former. Files to be removed are specified by glob patterns where ? matches any 1 character and * matches a sequence of 0 or more characters. All files in BUILDDIR matching one such pattern is removed. There are built-in patterns, but you can override them with features clean and veryclean which should be lists of glob patterns. For example the default clean glob patterns are:clean : [ "*~" "*.ozf" "*.o" "*.so-*" "*.exe" ]
Package Related Features¶
uri feature uri indicates the URI where to install lib targets. For example:uri : 'x-ozlib://mylib/XML'
import MyFoo at 'x-ozlib://mylib/XML/Foo.ozf'
author : 'mogul:/duchier'
author : 'Denys Duchier'
released : "YYYY-MM-DD-HH:MM:SS"
makefile(
lib : [ 'Foo.ozf' ]
src : [ 'Foo.ozf' ]
uri : 'x-ozlib://mylib'
mogul : 'mogul:/myname/foolib')
CONTACTS¶
Authors should really be referred to by mogul ids denoting mogul entries that describe them. In order to make this easier, a makefile.oz may also contain a contact feature which is either a record describing a person, or a list of such records.makefile(
contact :
o(
mogul : 'mogul:/duchier/denys'
name : 'Denys Duchier'
email : 'duchier@ps.uni-sb.de'
www : 'http://www.ps.uni-sb.de/~duchier/'))
AUTHOR¶
This man page has been automatically generated from the ozmake help file. The ozmake help file is maintained by Denys Duchier.SEE ALSO¶
Full documentation of the Mozart system and the Oz programming language is available through the the mozart-doc package, or from the mozart web page www.mozart-oz.org. See in particular the document The Oz Programming Interface.| June 3, 2005 |