diff options
| author | Brent Cook <bcook@openbsd.org> | 2014-12-06 10:21:23 -0600 |
|---|---|---|
| committer | Brent Cook <bcook@openbsd.org> | 2014-12-06 10:21:23 -0600 |
| commit | 33ff088a6065cfbafe2f7b870595dc392832cdcb (patch) | |
| tree | fb98b348d154d8e19a7979e71aa89228193d520f | |
| parent | d3ea95b9f56a0a19d77e693f5556527dee43aa24 (diff) | |
| download | portable-33ff088a6065cfbafe2f7b870595dc392832cdcb.tar.gz portable-33ff088a6065cfbafe2f7b870595dc392832cdcb.tar.bz2 portable-33ff088a6065cfbafe2f7b870595dc392832cdcb.zip | |
simplify packaging for libtls.
Derive the file list from the Makefile.am template itself (DRY), ensure
manpage is packaged with the final tarball.
| -rwxr-xr-x | dist.sh | 2 | ||||
| -rw-r--r-- | tls/Makefile.am.tpl | 11 | ||||
| -rwxr-xr-x | update.sh | 15 |
3 files changed, 12 insertions, 16 deletions
| @@ -3,5 +3,5 @@ set -e | |||
| 3 | 3 | ||
| 4 | rm -f man/*.1 man/*.3 | 4 | rm -f man/*.1 man/*.3 |
| 5 | ./autogen.sh | 5 | ./autogen.sh |
| 6 | ./configure | 6 | ./configure --enable-libtls |
| 7 | make dist | 7 | make dist |
diff --git a/tls/Makefile.am.tpl b/tls/Makefile.am.tpl index 7c4bf5c..55461c6 100644 --- a/tls/Makefile.am.tpl +++ b/tls/Makefile.am.tpl | |||
| @@ -1,10 +1,17 @@ | |||
| 1 | include $(top_srcdir)/Makefile.am.common | 1 | include $(top_srcdir)/Makefile.am.common |
| 2 | 2 | ||
| 3 | if ENABLE_LIBTLS | ||
| 3 | lib_LTLIBRARIES = libtls.la | 4 | lib_LTLIBRARIES = libtls.la |
| 4 | 5 | ||
| 5 | libtls_la_LDFLAGS = -version-info libtls-version | 6 | libtls_la_LDFLAGS = -version-info libtls-version |
| 6 | 7 | ||
| 7 | libtls_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) | 8 | libtls_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) |
| 8 | libtls_la_SOURCES = | ||
| 9 | noinst_HEADERS = | ||
| 10 | 9 | ||
| 10 | libtls_la_SOURCES = tls.c | ||
| 11 | libtls_la_SOURCES += tls_client.c | ||
| 12 | libtls_la_SOURCES += tls_config.c | ||
| 13 | libtls_la_SOURCES += tls_server.c | ||
| 14 | libtls_la_SOURCES += tls_util.c | ||
| 15 | libtls_la_SOURCES += tls_verify.c | ||
| 16 | noinst_HEADERS = tls_internal.h | ||
| 17 | endif | ||
| @@ -393,21 +393,10 @@ echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am | |||
| 393 | ) | 393 | ) |
| 394 | 394 | ||
| 395 | rm -f tls/*.c tls/*.h | 395 | rm -f tls/*.c tls/*.h |
| 396 | for i in tls_internal.h tls.c tls_server.c tls_client.c tls_util.c \ | 396 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am.tpl` ; do |
| 397 | tls_config.c tls_verify.c; do | ||
| 398 | cp $libtls_src/$i tls | 397 | cp $libtls_src/$i tls |
| 399 | done | 398 | done |
| 400 | (cd tls | 399 | sed -e "s/libtls-version/${libtls_version}/" tls/Makefile.am.tpl > tls/Makefile.am |
| 401 | sed -e "s/libtls-version/${libtls_version}/" Makefile.am.tpl > Makefile.am | ||
| 402 | echo "if ENABLE_LIBTLS" >> Makefile.am | ||
| 403 | for i in `ls -1 *.c|sort`; do | ||
| 404 | echo "libtls_la_SOURCES += $i" >> Makefile.am | ||
| 405 | done | ||
| 406 | for i in `ls -1 *.h|sort`; do | ||
| 407 | echo "noinst_HEADERS += $i" >> Makefile.am | ||
| 408 | done | ||
| 409 | echo "endif" >> Makefile.am | ||
| 410 | ) | ||
| 411 | 400 | ||
| 412 | # do not directly compile C files that are included in other C files | 401 | # do not directly compile C files that are included in other C files |
| 413 | crypto_excludes=( | 402 | crypto_excludes=( |
