aboutsummaryrefslogtreecommitdiff
path: root/Configurations
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-10-14 16:56:34 +0200
committerRichard Levitte <levitte@openssl.org>2018-11-05 08:13:04 +0100
commitb96ab5e6d0125c7e2a6804d568cb2a732cbf4504 (patch)
tree474adbf96faeb2b365487e21085e5424ab9036a9 /Configurations
parentc1da4b2afe62644f42f95a8788cd80b0a4925e0c (diff)
downloadopenssl-b96ab5e6d0125c7e2a6804d568cb2a732cbf4504.zip
openssl-b96ab5e6d0125c7e2a6804d568cb2a732cbf4504.tar.gz
openssl-b96ab5e6d0125c7e2a6804d568cb2a732cbf4504.tar.bz2
Build: make it possible to assign macro definitions for specific outputs
Sometimes, some specific program or object file might need an extra macro definition of its own. This allows that to be easily done. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7553)
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/README4
-rw-r--r--Configurations/README.design7
-rw-r--r--Configurations/common.tmpl2
3 files changed, 10 insertions, 3 deletions
diff --git a/Configurations/README b/Configurations/README
index 9fd4922..1c67f75 100644
--- a/Configurations/README
+++ b/Configurations/README
@@ -467,6 +467,10 @@ include paths the build of their source files should use:
INCLUDE[foo]=include
+It's also possible to specify C macros that should be defined:
+
+ DEFINE[foo]=FOO BAR=1
+
In some cases, one might want to generate some source files from
others, that's done as follows:
diff --git a/Configurations/README.design b/Configurations/README.design
index 8c50a92..c0b05bd 100644
--- a/Configurations/README.design
+++ b/Configurations/README.design
@@ -41,9 +41,10 @@ end products. There are variants for them with '_NO_INST' as suffix
(PROGRAM_NO_INST etc) to specify end products that shouldn't get
installed.
-The variables SOURCE, DEPEND and INCLUDE are indexed by a produced
-file, and their values are the source used to produce that particular
-produced file, extra dependencies, and include directories needed.
+The variables SOURCE, DEPEND, INCLUDE and DEFINE are indexed by a
+produced file, and their values are the source used to produce that
+particular produced file, extra dependencies, include directories
+needed, or C macros to be defined.
All their values in all the build.info throughout the source tree are
collected together and form a set of programs, libraries, engines and
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl
index 4a08655..b7d2a07 100644
--- a/Configurations/common.tmpl
+++ b/Configurations/common.tmpl
@@ -85,6 +85,7 @@
deps => $unified_info{depends}->{$src},
incs => [ @{$unified_info{includes}->{$obj}},
@{$unified_info{includes}->{$bin}} ],
+ defs => $unified_info{defines}->{$obj},
%opts);
foreach (@{$unified_info{depends}->{$src}}) {
dogenerate($_, $obj, $bin, %opts);
@@ -107,6 +108,7 @@
deps => $unified_info{depends}->{$obj},
incs => [ @{$unified_info{includes}->{$obj}},
@{$unified_info{includes}->{$bin}} ],
+ defs => $unified_info{defines}->{$obj},
%opts);
foreach ((@{$unified_info{sources}->{$obj}},
@{$unified_info{depends}->{$obj}})) {