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 <levitte@openssl.org>
Tue, 30 Aug 2016 03:13:11 +0000 (05:13 +0200)
commit79822c3cd55b9241187123fd016cb3c9a3beffbb
tree55f0e316bb21acddc509f326c7d64c463ca0b905
parentacc63c7d6d4ea28497a6192a3445b40f2af88133
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>
Configure