Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Announcing mbld.


Hi all.

So, the long awaited (by who?) refresh of the Myrddin build system is finally
in a stage where I can release it on the unsuspecting drone... I mean, beta
testers. The goal is that it will eventually be a complete replacement for
myrbuild, with a binary that is 100% compatible, but also is extended to the
point where make isn't needed.

So, first, a summary of what exists: http://git.eigenstate.org/ori/mbld.git

This code should, theoretically, already reach the first goal: Any place that
you seee 'myrbuild' in a script, running 'mbld' will work. In addition, if
you don't specify the output library/binary, it will parse a file called
'bldfile', and use that to direct its build.

The syntax of the build files is simple:

    target-type target-name {options} = input list ;

So, for example:

    lib meh = meh.myr moo.myr blorp.myr;
    bin frobber {ldscript=customscript.ld} =
        frobber.myr util.myr
    ;

The full syntax is below:

    file:       target*
    target:     type name optattrs '=' word* ';'
    name:       word
    type:       'bin' | 'lib' | 'sub' | 'man'
    optattrs:   /* nothing */ | '{' keyval* '}'
    keyval:     word | word = word

The target type meanings are as follows:

    bin:        A binary executable.
    lib:        A static library. (dynamic libs are not supported by Myrddin)
    sub:        A subdirectory list. The semantics are the same as 'cd subdir;
                mbld'
    man:        Manpages.

The currently supported attributes:

    ldscript=s: Link using custom linker script 's'. 
    runtime=r:  Link with a custom runtime 'r'.
    noinst:     Don't install the binary.

With a working example here:

    http://git.eigenstate.org/ori/mbld.git/tree/bldfile

So, build on it, beat on it, crash it, and complain!

-- 
    Ori Bernstein