diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-14 12:40:52 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-14 12:40:52 +0000 |
commit | 38ab79ce758a23d3003311009a9d0a13c619add0 (patch) | |
tree | 86ff599611cc6ee12e1adeeca660f5e7c08cde3f | |
parent | 06a40694d49e673457479acbd933091c84281732 (diff) |
Cygwin fixes (the dummytest method to make all tests work was copied
from 0.9.7-stable)
-rwxr-xr-x | Configure | 24 | ||||
-rw-r--r-- | Makefile.org | 4 | ||||
-rw-r--r-- | test/Makefile.ssl | 9 | ||||
-rw-r--r-- | test/dummytest.c | 2 | ||||
-rwxr-xr-x | util/cygwin.sh | 2 |
5 files changed, 33 insertions, 8 deletions
@@ -477,7 +477,7 @@ my %table=( # Cygwin "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", -"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll", +"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -march=486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll", # Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at> "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::", @@ -577,6 +577,7 @@ my $libs; my $target; my $options; my $symlink; +my $make_depend=0; my @argvcopy=@ARGV; my $argvstring=""; @@ -1188,11 +1189,13 @@ if($IsWindows) { EOF close(OUT); } else { - (system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $? - if $symlink; - ### (system 'make depend') == 0 or exit $? if $depflags ne ""; - # Run "make depend" manually if you want to be able to delete - # the source code files of ciphers you left out. + my $make_command = "make -f Makefile.ssl PERL=\'$perl\'"; + my $make_targets = ""; + $make_targets .= " links" if $symlink; + $make_targets .= " depend" if $depflags ne "" && $make_depend; + $make_targets .= " gentests" if $symlink; + (system $make_command.$make_targets) == 0 or exit $? + if $make_targets ne ""; if ( $perl =~ m@^/@) { &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";'); &dofile("apps/der_chop",$perl,'^#!/', '#!%s'); @@ -1202,6 +1205,15 @@ EOF &dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";'); &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s'); &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s'); + } + if ($depflags ne "" && !$make_depend) { + print <<EOF; + +Since you've disabled at least one algorithm, you need to do the following +before building: + + make depend +EOF } } diff --git a/Makefile.org b/Makefile.org index dd05ca8dcf..cdf2d1b690 100644 --- a/Makefile.org +++ b/Makefile.org @@ -527,6 +527,10 @@ links: fi; \ done; +gentests: + @(cd test && echo "generating dummy tests (if needed)..." && \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate ); + dclean: rm -f *.bak @for i in $(DIRS) ;\ diff --git a/test/Makefile.ssl b/test/Makefile.ssl index e5b36e0745..b67f154ae2 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -85,7 +85,7 @@ top: all: exe -exe: $(EXE) +exe: $(EXE) dummytest files: $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO @@ -93,6 +93,10 @@ files: links: @@$(TOP)/util/point.sh Makefile.ssl Makefile +generate: $(SRC) +$(SRC): + @$(TOP)/util/point.sh dummytest.c $@ + errors: install: @@ -317,6 +321,9 @@ $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) +dummytest: dummytest.o $(DLIBCRYPTO) + $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + # DO NOT DELETE THIS LINE -- make depend depends on it. bftest.o: ../include/openssl/blowfish.h diff --git a/test/dummytest.c b/test/dummytest.c index 5b4467e042..277d824e82 100644 --- a/test/dummytest.c +++ b/test/dummytest.c @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) p = strrchr(argv[0], '/'); if (!p) p = strrchr(argv[0], '\\'); -#ifdef OPENSSL_SYS_VMS +#ifdef VMS if (!p) p = strrchr(argv[0], ']'); if (p) q = strrchr(p, '>'); if (q) p = q; diff --git a/util/cygwin.sh b/util/cygwin.sh index b607399b02..930f766b4f 100755 --- a/util/cygwin.sh +++ b/util/cygwin.sh @@ -96,6 +96,8 @@ fi get_openssl_version +make depend || exit 1 + make || exit 1 base_install |