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>
diff --git a/Configurations/README b/Configurations/README
index e1327e5..df55d71 100644
--- a/Configurations/README
+++ b/Configurations/README
@@ -97,8 +97,16 @@
shared_target => The shared library building method used.
This is a target found in Makefile.shared.
build_scheme => The scheme used to build up a Makefile.
- (NOTE: this is here for future use, it's
- not implemented yet)
+ In its simplest form, the value is a string
+ with the name of the build scheme.
+ The value may also take the form of a list
+ of strings, if the build_scheme is to have
+ some options. In this case, the first
+ string in the list is the name of the build
+ scheme.
+ Currently recognised build schemes are
+ "mk1mf" and "unixmake". Others may appear
+ in the future.
multilib => On systems that support having multiple
implementations of a library (typically a