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 | |
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.
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | apps/Makefile.am | 82 | ||||
-rw-r--r-- | apps/Makefile.am.tpl | 21 | ||||
-rw-r--r-- | apps/poll_win.c (renamed from apps/poll.c) | 0 | ||||
-rwxr-xr-x | update.sh | 45 |
5 files changed, 97 insertions, 58 deletions
@@ -88,7 +88,6 @@ crypto/Makefile.am | |||
88 | include/openssl/Makefile.am | 88 | include/openssl/Makefile.am |
89 | ssl/Makefile.am | 89 | ssl/Makefile.am |
90 | tls/Makefile.am | 90 | tls/Makefile.am |
91 | apps/Makefile.am | ||
92 | tests/Makefile.am | 91 | tests/Makefile.am |
93 | 92 | ||
94 | ssl/*.c | 93 | ssl/*.c |
@@ -99,10 +98,12 @@ include/pqueue.h | |||
99 | include/tls.h | 98 | include/tls.h |
100 | include/openssl/*.h | 99 | include/openssl/*.h |
101 | include/openssl/*.he | 100 | include/openssl/*.he |
102 | apps/*.c | ||
103 | apps/*.h | 101 | apps/*.h |
104 | apps/*.cnf | 102 | apps/*.c |
105 | apps/openssl | 103 | apps/openssl |
104 | apps/openssl.cnf | ||
105 | !apps/apps_win.c | ||
106 | !apps/poll_win.c | ||
106 | 107 | ||
107 | crypto/compat/arc4random.c | 108 | crypto/compat/arc4random.c |
108 | crypto/compat/chacha_private.h | 109 | crypto/compat/chacha_private.h |
diff --git a/apps/Makefile.am b/apps/Makefile.am new file mode 100644 index 0000000..769a033 --- /dev/null +++ b/apps/Makefile.am | |||
@@ -0,0 +1,82 @@ | |||
1 | include $(top_srcdir)/Makefile.am.common | ||
2 | |||
3 | bin_PROGRAMS = openssl | ||
4 | |||
5 | openssl_CFLAGS = $(USER_CFLAGS) | ||
6 | openssl_LDADD = $(PLATFORM_LDADD) $(PROG_LDADD) | ||
7 | openssl_LDADD += $(top_builddir)/ssl/libssl.la | ||
8 | openssl_LDADD += $(top_builddir)/crypto/libcrypto.la | ||
9 | |||
10 | openssl_SOURCES = apps.c | ||
11 | openssl_SOURCES += asn1pars.c | ||
12 | openssl_SOURCES += ca.c | ||
13 | openssl_SOURCES += ciphers.c | ||
14 | openssl_SOURCES += cms.c | ||
15 | openssl_SOURCES += crl.c | ||
16 | openssl_SOURCES += crl2p7.c | ||
17 | openssl_SOURCES += dgst.c | ||
18 | openssl_SOURCES += dh.c | ||
19 | openssl_SOURCES += dhparam.c | ||
20 | openssl_SOURCES += dsa.c | ||
21 | openssl_SOURCES += dsaparam.c | ||
22 | openssl_SOURCES += ec.c | ||
23 | openssl_SOURCES += ecparam.c | ||
24 | openssl_SOURCES += enc.c | ||
25 | openssl_SOURCES += engine.c | ||
26 | openssl_SOURCES += errstr.c | ||
27 | openssl_SOURCES += gendh.c | ||
28 | openssl_SOURCES += gendsa.c | ||
29 | openssl_SOURCES += genpkey.c | ||
30 | openssl_SOURCES += genrsa.c | ||
31 | openssl_SOURCES += nseq.c | ||
32 | openssl_SOURCES += ocsp.c | ||
33 | openssl_SOURCES += openssl.c | ||
34 | openssl_SOURCES += passwd.c | ||
35 | openssl_SOURCES += pkcs12.c | ||
36 | openssl_SOURCES += pkcs7.c | ||
37 | openssl_SOURCES += pkcs8.c | ||
38 | openssl_SOURCES += pkey.c | ||
39 | openssl_SOURCES += pkeyparam.c | ||
40 | openssl_SOURCES += pkeyutl.c | ||
41 | openssl_SOURCES += prime.c | ||
42 | openssl_SOURCES += rand.c | ||
43 | openssl_SOURCES += req.c | ||
44 | openssl_SOURCES += rsa.c | ||
45 | openssl_SOURCES += rsautl.c | ||
46 | openssl_SOURCES += s_cb.c | ||
47 | openssl_SOURCES += s_client.c | ||
48 | openssl_SOURCES += s_server.c | ||
49 | openssl_SOURCES += s_socket.c | ||
50 | openssl_SOURCES += s_time.c | ||
51 | openssl_SOURCES += sess_id.c | ||
52 | openssl_SOURCES += smime.c | ||
53 | openssl_SOURCES += speed.c | ||
54 | openssl_SOURCES += spkac.c | ||
55 | openssl_SOURCES += ts.c | ||
56 | openssl_SOURCES += verify.c | ||
57 | openssl_SOURCES += version.c | ||
58 | openssl_SOURCES += x509.c | ||
59 | |||
60 | if HOST_WIN | ||
61 | openssl_SOURCES += apps_win.c | ||
62 | else | ||
63 | openssl_SOURCES += apps_posix.c | ||
64 | endif | ||
65 | |||
66 | if !HAVE_POLL | ||
67 | if HOST_WIN | ||
68 | openssl_SOURCES += poll_win.c | ||
69 | endif | ||
70 | endif | ||
71 | |||
72 | if !HAVE_STRTONUM | ||
73 | openssl_SOURCES += strtonum.c | ||
74 | endif | ||
75 | |||
76 | noinst_HEADERS = apps.h | ||
77 | noinst_HEADERS += progs.h | ||
78 | noinst_HEADERS += s_apps.h | ||
79 | noinst_HEADERS += testdsa.h | ||
80 | noinst_HEADERS += testrsa.h | ||
81 | noinst_HEADERS += timeouts.h | ||
82 | noinst_HEADERS += openssl.cnf | ||
diff --git a/apps/Makefile.am.tpl b/apps/Makefile.am.tpl deleted file mode 100644 index 16b3d8b..0000000 --- a/apps/Makefile.am.tpl +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | include $(top_srcdir)/Makefile.am.common | ||
2 | |||
3 | bin_PROGRAMS = openssl | ||
4 | |||
5 | openssl_CFLAGS = $(USER_CFLAGS) | ||
6 | openssl_LDADD = $(PLATFORM_LDADD) $(PROG_LDADD) | ||
7 | openssl_LDADD += $(top_builddir)/ssl/libssl.la | ||
8 | openssl_LDADD += $(top_builddir)/crypto/libcrypto.la | ||
9 | |||
10 | openssl_SOURCES = | ||
11 | noinst_HEADERS = | ||
12 | |||
13 | if !HAVE_STRTONUM | ||
14 | openssl_SOURCES += strtonum.c | ||
15 | endif | ||
16 | |||
17 | if !HAVE_POLL | ||
18 | if HOST_WIN | ||
19 | openssl_SOURCES += poll.c | ||
20 | endif | ||
21 | endif | ||
diff --git a/apps/poll.c b/apps/poll_win.c index bf30ccf..bf30ccf 100644 --- a/apps/poll.c +++ b/apps/poll_win.c | |||
@@ -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 | ||