diff --git a/Configure b/Configure index c14ecac16a72a10cd2b88828a6b4652376653083..4459429cc5b61bde5e5e52ad24edffc84f151991 100755 --- a/Configure +++ b/Configure @@ -1457,6 +1457,7 @@ EOF 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@^/@) { diff --git a/Makefile.org b/Makefile.org index de902c705332521e265a3876e01608f0ae5d9c2d..eb3f5370d038259bdd12986386a057ab06d5dcfe 100644 --- a/Makefile.org +++ b/Makefile.org @@ -564,6 +564,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 048063576e39409d6f46eb116289390ebca16f91..6adc6b8c6dfff207b6e367c2eb6360b0c133156a 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -98,7 +98,7 @@ top: all: exe -exe: $(EXE) +exe: $(EXE) dummytest files: $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO @@ -106,6 +106,10 @@ files: links: @@$(TOP)/util/point.sh Makefile.ssl Makefile +generate: $(SRC) +$(SRC): + @$(TOP)/util/point.sh dummytest.c $@ + errors: install: @@ -374,6 +378,9 @@ $(ECDSATEST): $(ECDSATEST).o $(DLIBCRYPTO) #$(RDTEST): $(RDTEST).o $(DLIBCRYPTO) # $(CC) -o $(RDTEST) $(CFLAGS) $(RDTEST).o $(PEX_LIBS) $(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 ../include/openssl/e_os2.h diff --git a/test/dummytest.c b/test/dummytest.c new file mode 100644 index 0000000000000000000000000000000000000000..f98f003ef98e0c57e190b13294bc6198c41beb24 --- /dev/null +++ b/test/dummytest.c @@ -0,0 +1,47 @@ +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) + { + char *p, *q, *program; + + p = strrchr(argv[0], '/'); + if (!p) p = strrchr(argv[0], '\\'); +#ifdef OPENSSL_SYS_VMS + if (!p) p = strrchr(argv[0], ']'); + if (p) q = strrchr(p, '>'); + if (q) p = q; + if (!p) p = strrchr(argv[0], ':'); + q = 0; +#endif + if (p) p++; + if (!p) p = argv[0]; + if (p) q = strchr(p, '.'); + if (p && !q) q = p + strlen(p); + + if (!p) + program = BUF_strdup("(unknown)"); + else + { + program = OPENSSL_malloc((q - p) + 1); + strncpy(program, p, q - p); + program[q - p] = '\0'; + } + + for(p = program; *p; p++) + if (islower(*p)) *p = toupper(*p); + + q = strstr(program, "TEST"); + if (q > p && q[-1] == '_') q--; + *q = '\0'; + + printf("No %s support\n", program); + + OPENSSL_free(program); + return(0); + } diff --git a/util/pod2mantest b/util/pod2mantest index 8e913180c54f868a22ae63c3e1d29691c5e005f0..e01c6192a73054ab02663a6a42fba0f9c882c3bc 100755 --- a/util/pod2mantest +++ b/util/pod2mantest @@ -14,7 +14,7 @@ IFS=: if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi try_without_dir=false # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. -for dir in dummy:$PATH; do +for dir in dummy${IFS}$PATH; do if [ "$try_without_dir" = true ]; then # first iteration pod2man=pod2man