diff options
author | Brent Cook <bcook@openbsd.org> | 2014-12-06 11:20:56 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-12-06 11:20:56 -0600 |
commit | 13035fa666c546330e9809691374e4fd0415eccc (patch) | |
tree | 922b4c94e13b0f6738131335995d67a7b5aeea3d /update.sh | |
parent | 33ff088a6065cfbafe2f7b870595dc392832cdcb (diff) | |
download | portable-13035fa666c546330e9809691374e4fd0415eccc.tar.gz portable-13035fa666c546330e9809691374e4fd0415eccc.tar.bz2 portable-13035fa666c546330e9809691374e4fd0415eccc.zip |
simplify building the apps Makefile
Remove extra machinery in favor of a plain-old Makefile.am.
Tighten up what files are copied on build, package a simple openssl.cnf.
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 45 |
1 files changed, 11 insertions, 34 deletions
@@ -289,6 +289,7 @@ copy_crypto x509v3 "v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_lib.c | |||
289 | pcy_cache.c pcy_node.c pcy_data.c pcy_map.c pcy_tree.c pcy_lib.c | 289 | pcy_cache.c pcy_node.c pcy_data.c pcy_map.c pcy_tree.c pcy_lib.c |
290 | pcy_int.h ext_dat.h" | 290 | pcy_int.h ext_dat.h" |
291 | 291 | ||
292 | |||
292 | for i in $openssl_cmd_src/*; do | 293 | for i in $openssl_cmd_src/*; do |
293 | cp $i apps | 294 | cp $i apps |
294 | done | 295 | done |
@@ -393,10 +394,18 @@ echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am | |||
393 | ) | 394 | ) |
394 | 395 | ||
395 | rm -f tls/*.c tls/*.h | 396 | rm -f tls/*.c tls/*.h |
396 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am.tpl` ; do | 397 | sed -e "s/libtls-version/${libtls_version}/" tls/Makefile.am.tpl > tls/Makefile.am |
398 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do | ||
397 | cp $libtls_src/$i tls | 399 | cp $libtls_src/$i tls |
398 | done | 400 | done |
399 | sed -e "s/libtls-version/${libtls_version}/" tls/Makefile.am.tpl > tls/Makefile.am | 401 | |
402 | # conditional compiles | ||
403 | $CP $libc_src/stdlib/strtonum.c apps | ||
404 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' apps/Makefile.am` ; do | ||
405 | if [ -e $openssl_app_src/$i ]; then | ||
406 | cp $openssl_app_src/$i apps | ||
407 | fi | ||
408 | done | ||
400 | 409 | ||
401 | # do not directly compile C files that are included in other C files | 410 | # do not directly compile C files that are included in other C files |
402 | crypto_excludes=( | 411 | crypto_excludes=( |
@@ -447,38 +456,6 @@ crypto_win32_only=( | |||
447 | done | 456 | done |
448 | ) | 457 | ) |
449 | 458 | ||
450 | # conditional compiles | ||
451 | $CP $libc_src/stdlib/strtonum.c apps/ | ||
452 | apps_excludes=( | ||
453 | poll.c | ||
454 | strtonum.c | ||
455 | ) | ||
456 | apps_posix_only=( | ||
457 | apps_posix.c | ||
458 | ) | ||
459 | apps_win32_only=( | ||
460 | apps_win.c | ||
461 | ) | ||
462 | (cd apps | ||
463 | $CP Makefile.am.tpl Makefile.am | ||
464 | for i in `ls -1 *.c|sort`; do | ||
465 | if [[ ${apps_posix_only[*]} =~ $i ]]; then | ||
466 | echo "if !HOST_WIN" >> Makefile.am | ||
467 | echo "openssl_SOURCES += ${i}" >> Makefile.am | ||
468 | echo "endif" >> Makefile.am | ||
469 | elif [[ ${apps_win32_only[*]} =~ $i ]]; then | ||
470 | echo "if HOST_WIN" >> Makefile.am | ||
471 | echo "openssl_SOURCES += ${i}" >> Makefile.am | ||
472 | echo "endif" >> Makefile.am | ||
473 | elif ! [[ ${apps_excludes[*]} =~ $i ]]; then | ||
474 | echo "openssl_SOURCES += $i" >> Makefile.am | ||
475 | fi | ||
476 | done | ||
477 | for i in `ls -1 *.h|sort`; do | ||
478 | echo "noinst_HEADERS += $i" >> Makefile.am | ||
479 | done | ||
480 | ) | ||
481 | |||
482 | (cd man | 459 | (cd man |
483 | $CP Makefile.am.tpl Makefile.am | 460 | $CP Makefile.am.tpl Makefile.am |
484 | 461 | ||