diff options
author | Brent Cook <bcook@openbsd.org> | 2014-12-06 18:59:25 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-12-06 18:59:25 -0600 |
commit | 976f64d932bc5fac8d18dd95feddcfb4f3782551 (patch) | |
tree | 649dc41764f1fdf66e69f24dd53eb978f6181b67 | |
parent | 14f4175b67a8cd6c01955340b4e20d75e4e25708 (diff) | |
download | portable-976f64d932bc5fac8d18dd95feddcfb4f3782551.tar.gz portable-976f64d932bc5fac8d18dd95feddcfb4f3782551.tar.bz2 portable-976f64d932bc5fac8d18dd95feddcfb4f3782551.zip |
read all library versions directly from files
This makes building and testing easier because the library Makefile.am
files are use directly rather than as templates. Thanks to Wouter Clarie
for the idea.
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | crypto/Makefile.am (renamed from crypto/Makefile.am.tpl) | 4 | ||||
-rw-r--r-- | ssl/Makefile.am (renamed from ssl/Makefile.am.tpl) | 3 | ||||
-rw-r--r-- | tls/Makefile.am (renamed from tls/Makefile.am.tpl) | 3 | ||||
-rwxr-xr-x | update.sh | 7 |
6 files changed, 18 insertions, 10 deletions
@@ -84,12 +84,13 @@ INSTALL | |||
84 | /stamp-h1 | 84 | /stamp-h1 |
85 | /stamp-h2 | 85 | /stamp-h2 |
86 | 86 | ||
87 | crypto/Makefile.am | ||
88 | include/openssl/Makefile.am | 87 | include/openssl/Makefile.am |
89 | ssl/Makefile.am | ||
90 | tls/Makefile.am | ||
91 | tests/Makefile.am | 88 | tests/Makefile.am |
92 | 89 | ||
90 | crypto/VERSION | ||
91 | ssl/VERSION | ||
92 | tls/VERSION | ||
93 | |||
93 | ssl/*.c | 94 | ssl/*.c |
94 | ssl/*.h | 95 | ssl/*.h |
95 | tls/*.c | 96 | tls/*.c |
diff --git a/configure.ac b/configure.ac index 491e4b8..2cc7477 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,8 @@ | |||
1 | AC_INIT([libressl], m4_esyscmd([tr -d '\n' < VERSION])) | 1 | AC_INIT([libressl], m4_esyscmd([tr -d '\n' < VERSION])) |
2 | AC_SUBST([LIBCRYPTO_VERSION], m4_esyscmd([tr -d '\n' < crypto/VERSION])) | ||
3 | AC_SUBST([LIBSSL_VERSION], m4_esyscmd([tr -d '\n' < ssl/VERSION])) | ||
4 | AC_SUBST([LIBTLS_VERSION], m4_esyscmd([tr -d '\n' < tls/VERSION])) | ||
5 | |||
2 | AC_CANONICAL_HOST | 6 | AC_CANONICAL_HOST |
3 | AM_INIT_AUTOMAKE([subdir-objects]) | 7 | AM_INIT_AUTOMAKE([subdir-objects]) |
4 | AC_CONFIG_MACRO_DIR([m4]) | 8 | AC_CONFIG_MACRO_DIR([m4]) |
diff --git a/crypto/Makefile.am.tpl b/crypto/Makefile.am index 07a4fc6..39b143d 100644 --- a/crypto/Makefile.am.tpl +++ b/crypto/Makefile.am | |||
@@ -6,8 +6,10 @@ AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes | |||
6 | 6 | ||
7 | lib_LTLIBRARIES = libcrypto.la | 7 | lib_LTLIBRARIES = libcrypto.la |
8 | 8 | ||
9 | EXTRA_DIST = VERSION | ||
10 | |||
11 | libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ | ||
9 | libcrypto_la_LIBADD = libcompat.la libcompatnoopt.la | 12 | libcrypto_la_LIBADD = libcompat.la libcompatnoopt.la |
10 | libcrypto_la_LDFLAGS = -version-info libcrypto-version | ||
11 | libcrypto_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) -DOPENSSL_NO_HW_PADLOCK | 13 | libcrypto_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) -DOPENSSL_NO_HW_PADLOCK |
12 | 14 | ||
13 | noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la | 15 | noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la |
diff --git a/ssl/Makefile.am.tpl b/ssl/Makefile.am index c8f72d1..52a29b8 100644 --- a/ssl/Makefile.am.tpl +++ b/ssl/Makefile.am | |||
@@ -2,8 +2,9 @@ include $(top_srcdir)/Makefile.am.common | |||
2 | 2 | ||
3 | lib_LTLIBRARIES = libssl.la | 3 | lib_LTLIBRARIES = libssl.la |
4 | 4 | ||
5 | libssl_la_LDFLAGS = -version-info libssl-version | 5 | EXTRA_DIST = VERSION |
6 | 6 | ||
7 | libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ | ||
7 | libssl_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) | 8 | libssl_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) |
8 | 9 | ||
9 | libssl_la_SOURCES = bio_ssl.c | 10 | libssl_la_SOURCES = bio_ssl.c |
diff --git a/tls/Makefile.am.tpl b/tls/Makefile.am index 55461c6..7f65ea5 100644 --- a/tls/Makefile.am.tpl +++ b/tls/Makefile.am | |||
@@ -3,8 +3,9 @@ include $(top_srcdir)/Makefile.am.common | |||
3 | if ENABLE_LIBTLS | 3 | if ENABLE_LIBTLS |
4 | lib_LTLIBRARIES = libtls.la | 4 | lib_LTLIBRARIES = libtls.la |
5 | 5 | ||
6 | libtls_la_LDFLAGS = -version-info libtls-version | 6 | EXTRA_DIST = VERSION |
7 | 7 | ||
8 | libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ | ||
8 | libtls_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) | 9 | libtls_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) |
9 | 10 | ||
10 | libtls_la_SOURCES = tls.c | 11 | libtls_la_SOURCES = tls.c |
@@ -31,14 +31,17 @@ openssl_app_src=$dir/openbsd/src/usr.bin/openssl | |||
31 | source $libcrypto_src/crypto/shlib_version | 31 | source $libcrypto_src/crypto/shlib_version |
32 | libcrypto_version=$major:$minor:0 | 32 | libcrypto_version=$major:$minor:0 |
33 | echo "libcrypto version $libcrypto_version" | 33 | echo "libcrypto version $libcrypto_version" |
34 | echo $libcrypto_version > crypto/VERSION | ||
34 | 35 | ||
35 | source $libssl_src/ssl/shlib_version | 36 | source $libssl_src/ssl/shlib_version |
36 | libssl_version=$major:$minor:0 | 37 | libssl_version=$major:$minor:0 |
37 | echo "libssl version $libssl_version" | 38 | echo "libssl version $libssl_version" |
39 | echo $libssl_version > ssl/VERSION | ||
38 | 40 | ||
39 | source $libtls_src/shlib_version | 41 | source $libtls_src/shlib_version |
40 | libtls_version=$major:$minor:0 | 42 | libtls_version=$major:$minor:0 |
41 | echo "libtls version $libtls_version" | 43 | echo "libtls version $libtls_version" |
44 | echo $libtls_version > tls/VERSION | ||
42 | 45 | ||
43 | CP='cp -p' | 46 | CP='cp -p' |
44 | 47 | ||
@@ -91,8 +94,6 @@ copy_hdrs ssl "srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h" | |||
91 | 94 | ||
92 | # copy libcrypto source | 95 | # copy libcrypto source |
93 | rm -f crypto/*.c crypto/*.h | 96 | rm -f crypto/*.c crypto/*.h |
94 | sed -e "s/libcrypto-version/${libcrypto_version}/" \ | ||
95 | crypto/Makefile.am.tpl > crypto/Makefile.am | ||
96 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do | 97 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do |
97 | dir=`dirname $i` | 98 | dir=`dirname $i` |
98 | mkdir -p crypto/$dir | 99 | mkdir -p crypto/$dir |
@@ -107,7 +108,6 @@ $CP crypto/compat/ui_openssl_win.c crypto/ui | |||
107 | 108 | ||
108 | # copy libtls source | 109 | # copy libtls source |
109 | rm -f tls/*.c tls/*.h | 110 | rm -f tls/*.c tls/*.h |
110 | sed -e "s/libtls-version/${libtls_version}/" tls/Makefile.am.tpl > tls/Makefile.am | ||
111 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do | 111 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do |
112 | cp $libtls_src/$i tls | 112 | cp $libtls_src/$i tls |
113 | done | 113 | done |
@@ -123,7 +123,6 @@ done | |||
123 | 123 | ||
124 | # copy libssl source | 124 | # copy libssl source |
125 | rm -f ssl/*.c ssl/*.h | 125 | rm -f ssl/*.c ssl/*.h |
126 | sed -e "s/libssl-version/${libssl_version}/" ssl/Makefile.am.tpl > ssl/Makefile.am | ||
127 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do | 126 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do |
128 | cp $libssl_src/src/ssl/$i ssl | 127 | cp $libssl_src/src/ssl/$i ssl |
129 | done | 128 | done |