With the parser changes now working and stable, work has been progressing to get the changes backported into the butter code. I’ve also realised that I really needed an additional object that can be used to store deails of the output’s required so have started adding it. This is needed as butter targets can be built using multiple templates at the same time, which means a lot of work when you have to iterate over a number of objects. The new object will keep everything concerning a template together and should allow for easier and faster builds. The changes required are quite large though so it’ll take a few days to get it stable I suspect.

I’ve also started thinking about how I add in the Report functionality I want. The main butter object can now be assigned a callback for reports and the command line app has a function that gets called correctly. The issues revolve around how the Report function gets called from the various places where it’s required. With all output from the library funnelled through Report it should be possible to allow the library to be used in more places (eg directly by IDE’s).

The following is a sample of the new Recipe file format for a simple template.

Template { Name SharedLibrary; Append CFLAGS, -fPIC -DPIC; Append LDFLAGS, -nostart; Command $CC $LDFLAGS $LIBS $OBJS -o $OUTPUT; }