summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-05 17:01:04 (GMT)
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-05 18:55:46 (GMT)
commit42d76bb3c765d9ba577ce170d2c70526b9242bd1 (patch)
tree221e7f081e8b4e574e09e2f19873572542eb943e
parent120e90e307ed8b9ddb51f21189286c28aa48f1ca (diff)
Drop usage of def prerequisite-specific include variable in buildfiles
-rw-r--r--libcrypto/libcrypto/buildfile18
-rw-r--r--libssl/libssl/buildfile22
-rw-r--r--openssl/openssl/buildfile4
3 files changed, 26 insertions, 18 deletions
diff --git a/libcrypto/libcrypto/buildfile b/libcrypto/libcrypto/buildfile
index b8503a1..eb9990b 100644
--- a/libcrypto/libcrypto/buildfile
+++ b/libcrypto/libcrypto/buildfile
@@ -17,6 +17,7 @@ lib{crypto}: {h }{** -buildinf-body} \
-mdc2/** \
-poly1305/poly1305_ieee754 \
-poly1305/poly1305_base2_44} \
+ { def}{libcrypto} \
crypto/{file}{LPdir_*.c des/ncbc_enc.c} \
{file}{libcrypto.map}
@@ -37,13 +38,8 @@ gcc = ($c.class == 'gcc')
msvc = ($c.class == 'msvc')
mingw = ($c.target.system == 'mingw32')
-lib{crypto}: def{libcrypto}: include = $windows
-
-# See bootstrap.build for details.
+# Build options.
#
-lib_version = ($version.pre_release ? "$version.project_id" : "$abi_version")
-lib{crypto}: bin.lib.version = @"-$lib_version"
-
# Drop -DOPENSSL_PIC and -D{L|B}_ENDIAN preprocessor options and define
# OPENSSL_PIC and {L|B}_ENDIAN macros in downstream/openssl/opensslconf.h.
# Pass -DLIBCRYPTO_BUILD to define the above macros only while building the
@@ -101,7 +97,7 @@ if $msvc
#
c.coptions += /wd4090 /wd4129 /wd4164 /wd4244 /wd4267 /wd4311
}
-else
+elif $gcc
{
# Disable warnings that pop up with -Wall -Wextra. Upstream doesn't seem to
# care about these and it is not easy to disable specific warnings in a way
@@ -129,6 +125,8 @@ else
# Overall, the thinking is that if any of these directories are actually
# needed, then one should probably be using the system-installed OpenSSL.
#
+lib_version = ($version.pre_release ? "$version.project_id" : "$abi_version")
+
if! $windows
{
root = ($install.root != [null] \
@@ -227,8 +225,14 @@ else
c.libs += advapi32.lib
}
+# Export options.
+#
lib{crypto}: cc.export.poptions = "-I$src_base/downstream" "-I$src_base"
+# See bootstrap.build for details.
+#
+lib{crypto}: bin.lib.version = @"-$lib_version"
+
# Install headers from the upstream and downstream openssl/ subdirectories
# only.
#
diff --git a/libssl/libssl/buildfile b/libssl/libssl/buildfile
index 7c7b249..d025ee3 100644
--- a/libssl/libssl/buildfile
+++ b/libssl/libssl/buildfile
@@ -4,7 +4,7 @@
import int_libs = libcrypto%lib{crypto}
-lib{ssl}: {h c}{**} file{libssl.map} $int_libs
+lib{ssl}: {h c}{**} def{libssl} file{libssl.map} $int_libs
tclass = $c.target.class
@@ -19,15 +19,8 @@ gcc = ($c.class == 'gcc')
msvc = ($c.class == 'msvc')
mingw = ($c.target.system == 'mingw32')
-lib{ssl}: def{libssl}: include = $windows
-
-# See bootstrap.build for details.
+# Build options.
#
-if $version.pre_release
- lib{ssl}: bin.lib.version = @"-$version.project_id"
-else
- lib{ssl}: bin.lib.version = @"-$abi_version"
-
# Drop -DOPENSSL_PIC, -D{L|B}_ENDIAN, -DOPENSSLDIR and -DENGINESDIR as they
# are not used in the libssl source code nor in the libcrypto public headers.
#
@@ -77,7 +70,7 @@ if $msvc
#
c.coptions += /wd4090 /wd4133 /wd4244 /wd4267
}
-else
+elif $gcc
{
# Disable warnings that pop up with -Wall -Wextra. Upstream doesn't seem to
# care about these and it is not easy to disable specific warnings in a way
@@ -123,12 +116,21 @@ else
c.libs += advapi32.lib
}
+# Export options.
+#
lib{ssl}:
{
cc.export.poptions = "-I$src_base"
cc.export.libs = $int_libs
}
+# See bootstrap.build for details.
+#
+if $version.pre_release
+ lib{ssl}: bin.lib.version = @"-$version.project_id"
+else
+ lib{ssl}: bin.lib.version = @"-$abi_version"
+
# Install headers from the upstream openssl/ subdirectory only.
#
h{*}: install = false
diff --git a/openssl/openssl/buildfile b/openssl/openssl/buildfile
index 10eefb6..4e7776a 100644
--- a/openssl/openssl/buildfile
+++ b/openssl/openssl/buildfile
@@ -22,6 +22,8 @@ mingw = ($c.target.system == 'mingw32')
exe{openssl}: apps/c{win32_init}: include = $windows
+# Build options.
+#
if! $windows
{
# Note that the upstream package uses -pthread compiler/linker option on
@@ -65,7 +67,7 @@ if $msvc
#
c.coptions += /wd4090 /wd4244 /wd4267
}
-else
+elif $gcc
{
# Disable warnings that pop up with -Wall -Wextra. Upstream doesn't seem to
# care about these and it is not easy to disable specific warnings in a way