Configure: Redo the logic for finding build file templates
authorRichard Levitte <levitte@openssl.org>
Mon, 29 Aug 2016 19:48:12 +0000 (21:48 +0200)
committerRichard Levitte <richard@levitte.org>
Tue, 30 Aug 2016 04:07:06 +0000 (06:07 +0200)
commitb9b364488169e2f6b9508003a7eb2907cc2598be
treefb0583277f3b1850735a200ccea0582a4fd1d847
parenteac33e1cd3a45ab0d66be20a01ee9a5c0634781b
Configure: Redo the logic for finding build file templates

Build file templates would be looked up like this if the user gave us
an additional directory to look for configuration files and build file
templates:

    $OPENSSL_LOCAL_CONFIG_DIR/$OSTYPE-Makefile.tmpl
    $SOURCEDIR/Configurations/$OSTYPE-Makefile.tmpl
    $OPENSSL_LOCAL_CONFIG_DIR/Makefile.tmpl
    $SOURCEDIR/Configurations/Makefile.tmpl

So for example, if the user created his own Makefile.tmpl and tried to
use it with a unixly config, it would never be user because we have a
unix-Makefile.tmpl in our Configurations directory.  This is clearly
wrong, and this change makes it look in this order instead:

    $OPENSSL_LOCAL_CONFIG_DIR/$OSTYPE-Makefile.tmpl
    $OPENSSL_LOCAL_CONFIG_DIR/Makefile.tmpl
    $SOURCEDIR/Configurations/$OSTYPE-Makefile.tmpl
    $SOURCEDIR/Configurations/Makefile.tmpl

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 79822c3cd55b9241187123fd016cb3c9a3beffbb)
Configure