Configurations/descrip.mms.tmpl: rework the inclusion hacks
authorRichard Levitte <levitte@openssl.org>
Wed, 19 May 2021 08:57:48 +0000 (10:57 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 22 May 2021 11:46:29 +0000 (13:46 +0200)
commit1b77f00a9b0469fe578c60710e760ebc2b908e21
treef6a072abb942aa2e7fa64e4ae2578fc789e8d3fa
parent84faea44e6ad9ff7f470b5958e7303f6c521bf2e
Configurations/descrip.mms.tmpl: rework the inclusion hacks

Because VMS C has some trouble with recursive inclusion of header
files, we have had to help it out for object files where there is such
an inclusion structure.

Previously, we did so with temporary logical names that were the same
as the first directory in an inclusion, so for example, to enable this
inclusion (found in ssl/ssl_local.h), we created the logical name
"record" when building any of the object files in the ssl/
subdirectories:

    #include "record/record.h"

However, there is another way with the VMS C compiler, to selectively
specify extra include directories in Unix form directly to the
compiler.  The logic is that from the directory where the source file
to compile is located, the specified inclusion directory merged with
the inclusion string should be able to access to specified header
file.

So for example, when a file in ssl/record/ is compiled, the following
inclusion is found:

    #include "../ssl_local.h"

So far so good, VMS C handles it properly.  However, the recursive
inclusion of "record/record.h" fails.  However, if the compiler is
helped out a little bit, with the following extra qualifier, then it
works:

    /INCLUDE="../"

The reason is that the compiler merges "../" and "record/record.h"
into "../record/record.h", which is the correct path to that header
file from the directory of the source file being compiled.

All that remained was to figure out all places where this trouble may
occur, and specify extra Unix formatted inclusion directories to
specify on per object file basis.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15369)
Configurations/descrip.mms.tmpl