MBLD(1)

NAME
mbld

SYNOPSIS
mbld [all | clean | install | uninstall | test] -[?csSfr] [-b bin] [-l lib] [-R src] [-I inc] [-B base] [-r runtime] [file... | targets...]

DESCRIPTION

The 'mbld' tool takes as input a list of Myrddin or assembly sources, and compiles them in the correct dependency order into either a library or an executable.

By default, it reads from an input file called 'bld.proj', but if given the option '-b' or '-l', it will build a binary or library, respectively, from the arguments specified on the command lines.

Myrbuild will default to building for the current architecture and operating system.

The myrbuild options are:

-[h|?]
    Print a summary of the available options.

-c  cleans the code before building. This applies to both

-b binname
    Compile source into a binary named 'name'. If neither this option nor the '-l' option are given, myrbuild will create a binary called 'a.out'.

-I path
    Add 'path' to the search path for unquoted use statments. This option does not affect the search path for local usefiles, which are always searched relative to the compiler's current working directory. Without any options, the search path defaults to /usr/include/myr.

-l  libname Compile source given into a library called 'libname.a' (or the equivalent for the target platform), and a matching usefile called 'name'. Only static libraries are currently supported. Ignores the contents of bld.proj and bld.sub if they exist.

-R  src Compile source given into a binary in temporary storage, and then execute it with the command line arguments passed in.

-S  Tell the toolchain to generate assembly for the code being compiled as well as the .o files, as though '-S' was passed to 6m.

-r runtime
    Compile a binary using the runtime 'rt'. If the runtime name given is 'none', then no runtime will be linked. If this option is not provided, then the default runtime in '$INSTALL_ROOT/myr/lib/_myrrt.o' will be used.

ENVIRONMENT VARIABLES

DESTDIR
    prepends $DESTDIR to the path to install to. For example, if the installgg prefix is /usr, the binary path is bin/, then binaries will get copied to $DESTDIR/usr/bin on mbld install

MYR_MC
    Compiles the binaries with '$MYR_MC' instead of the default value of 6m.

MYR_MUSE
    Merges usefiles with '$MYR_MUSE' instead of hte default value of muse.

MYR_RT
    Links with the runtime $MYR_RT instead of the default of prefix/lib/myr/_myrrt.o.

FILES

bld.proj
    The root project file. All paths in bldfiles are relative to the most recent one in the directory heirarchy.

bld.sub
    A sub build. This contains targets, and may specify dependencies on other targets within the same project.

EXAMPLE
        mbld

The command above will load bld.proj and all associated sub builds, and run the commands to incrementally rebuild the code.
        mbld -l foo bar.myr baz.myr

The command above will ignore bld.proj and produce a library named libfoo.a, consisting of the files bar.myr and baz.myr

FILES
The source for muse is available from git://git.eigenstate.org/git/ori/mc.git and lives in the myrbuild/ directory within the source tree.

SEE ALSO
6m(1) muse(1) ld(1) as(1)

BUGS

None known.