mbuild

NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
BUGS
AUTHOR

NAME

mbuild - build system of WagnerTech UG

SYNOPSIS

mbuild

DESCRIPTION

mbuild provides a simple build system based on make, git, subversion. The build process consists of 3 phases: configuration - compile - pack
configuration

is done by the mconfigure script. The configuration step has the following tasks:

Determination of version and build number. The version number can be set in a PAKET.changelog file, can be set by the -v option of mconfigure or be set by the project itself in the PAKET.prepare script. The build number is always taken from the CM system: With SVN it is the global version number, with GIT the build number is taken from the tag. On build a tag in the form project_version-build is expected. If not present a tag in the form v_version-build is searched. Verion may be 0.0 if set elsewhere.

If a PAKET.prepare file is present in the debian directory, it is called.

If a PAKET.build file is present in the debian directory, it is called with a -prepare parameter (deprecated). The current tree is rsync_ed to ~/build.

If a PAKET.prebuild file is present in the debian directory, it is called in the ~/build directory.

compile

To perform the compile step a PAKET.build script or a PAKET.cmake file is needed in the debian directory.

pack

To perform the pack step a PAKET.cp script and a PAKET.control file are needed in the debian directory. If pre/post installation scripts are needed, these files must be also placed in the debian directory.

A standard copyright file is included. An user defined file can be used by copying it to debian/copyright in the PAKET.prepare script.

If files are present to be placed unter /etc a conffiles is creates to avoid changes made by the administrator.

FILES

PAKET.changelog

Example:
projects (0.2-%BUILD%) unstable; urgency=medium
* Build in svn-Umgebung
-- Michael Wagner <michael@wagnertech.de> Fr 10. Aug 22:54:48 CEST 2018

PAKET.prepare

Any executable script file executed in configure step

PAKET.prebuild

Any executable script file executed in configure step in the ../build directory

PAKET.build

Any executable script file executing the build in the ../build directory

PAKET.cmake

cmake file (CMakeLists.txt) for building C/C++ code. If a cross compile option is set in the mconfigure script, according definitions are included.

PAKET.cp

An executable script file copying the artefacts to target paths preposed by $1:
cp ../build/my_artefact $1/usr/bin/

PAKET.preinst PAKET.postint PAKET.prerm PAKET.postrm

Optional pre/post installation scripts

PAKET.control

Debian control file

These files are expected in a debian directory, placed below the projects main directory.

SEE ALSO

make(1), mconfigure(1)

BUGS

No known bugs.

AUTHOR

Michael Wagner (michael@wagnertech.de)