From 38ab79ce758a23d3003311009a9d0a13c619add0 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 14 Nov 2002 12:40:52 +0000 Subject: [PATCH] Cygwin fixes (the dummytest method to make all tests work was copied from 0.9.7-stable) --- Configure | 24 ++++++++++++++++++------ Makefile.org | 4 ++++ test/Makefile.ssl | 9 ++++++++- test/dummytest.c | 2 +- util/cygwin.sh | 2 ++ 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/Configure b/Configure index 31da772d10..cc073e43dc 100755 --- a/Configure +++ b/Configure @@ -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 "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 <> $(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 -- 2.25.1