Eigenstate: myrddin-dev mailing list

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

Announcing a new build system for Myrddin code.


Until recently, Myrddin was built using a buggy hack known as
myrbuild.  It was only usable when hosted in a makefile, and would
often miss dependencies that needed to be rebuilt, leading to
confusing errors:

   main.myr:55: can't unify <old-type-version> and <new-type-version>

or 

   main.myr:55: duplicate definition of type <type-name>

So, I rewrote it. Now you have a buggy hack known as 'mild'.

My goals with the rewrite:

   - Solves the "missed dependency" bugs.
   - Usable completely independently.
   - Self hosted (ie, written in Myrddin).
   - Automatically handles the usual make targets:
       - build
       - install
       - clean
       - subdirs
       - test
       - configure
   - Simple input files.
   - Easy to use.
   - myrbuild compatible.

For now, the rewrite is called 'mbld', although the plan is to rename
it to 'myrbuild' as soon as I am satisfied that it is stable. 

The rewrite doesn't replace myrbuild+makefiles yet, but it's close.
The main missing features are testing and configuration, since I
don't yet know how I want to handle them.

An example input file:

   bin hello = hello.myr goodbye.myr;
   lib fuckyou = fuck.myr you.myr;
   sub subdir list;

If you want build attributes, you pass them in short curlies
after the target name, as below:

   bin kernel {ldscript = kernel.ld
               runtime = none
               noinst}
       =
       kernel.myr
       loader.s
   ;;

Right now, only 3 attributes are supported:

   noinst:             don't install the binary
   runtime = rt:       use a custom runtime library
   ldscript = script:  use a custom linker script

Others can be added pretty easily, as needed.

-- 
Ori Bernstein <ori@xxxxxxxxxxxxxx>

Follow-Ups:
Re: Announcing a new build system for Myrddin code.Ori Bernstein <ori@xxxxxxxxxxxxxx>