Refactor config - @MK1MF_Builds out, general build scheme in
authorRichard Levitte <levitte@openssl.org>
Mon, 18 May 2015 12:31:49 +0000 (14:31 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 21 Jan 2016 23:58:56 +0000 (00:58 +0100)
commit88087414def54cd55dfebc172f17f79ed7d3034a
treef375deb9a16124f804d8b676abe51da727881c26
parent9e0724a1805fba20a897f6c7f95336f0da017ccf
Refactor config - @MK1MF_Builds out, general build scheme in

Time to get rid of @MK1MF_Builds and introduce a more flexible
'build_scheme' configuration key.  Its value may be a string or an
array of strings, meaning we need to teach resolve_config how to
handle ARRAY referenses.

The build scheme is a word that selects a function to create the
appropriate result files for a certain configuration.  Currently valid
build schemes aer "mk1mf" and "unixmake", the plan is however to add
at least one other for a more universal build scheme.

Incidently, this also adds the functions 'add' and 'add_before', which
can be used in a configuration, so instead of having to repeatedly
write a sub like this:

key1 => sub { join(" ", @_, "myvalues"); },
key2 => sub { join(" ", "myvalues", @_); },

one could write this:

key1 => add(" ", "myvalues"),
key2 => add_before(" ", "myvalues"),

The good point with 'add' and 'add_before' is that they handle
inheritances where the values are a misture of scalars and ARRAYs.  If
there are any ARRAY to be found, the resulting value will be an ARRAY,
otherwise it will be a scalar with all the incoming valued joined
together with the separator given as first argument to add/add_before.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/00-base-templates.conf
Configurations/10-main.conf
Configurations/README
Configure