Refactor config - consolidate handling of disabled stuff
authorRichard Levitte <levitte@openssl.org>
Mon, 18 May 2015 09:03:47 +0000 (11:03 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 21 Jan 2016 06:04:47 +0000 (07:04 +0100)
commitc569e206d2abd186db400240a5746fa52b7f5198
tree44f6ab6022fed112002ddb0fa48e1dd39f9f43a0
parentfe05264e32327e33f0b0c091479affeecbf55e89
Refactor config - consolidate handling of disabled stuff

It's time to refactor the handling of %disabled so that all
information of value is in the same place.  We have so far had a few
cascading disable rules in form of code, far away from %disabled.
Instead, bring that information to the array @disable_cascade, which
is a list of pairs of the form 'test => descendents'.  The test part
can be a string, and it's simply checked if that string is a key in
%disabled, or it can be a CODEref to do a more complex test.  If the
test comes true, then all descendents are disabled.  This check is
performed until there are no more things that need to be disabled.

Also, $default_depflags is constructed from the information in
%disabled instead of being a separate string.  While a string of its
own is visually appealing, it's much too easy to forget to update it
when something is changed in %disabled.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Configure