X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fpod2mantest;h=384e683df4cc7636fbf98251d421e62654cca08f;hp=79aefafac0aab918ae148ef10345d8a6472e5b41;hb=4b64e0cbdb563e13a6f7cd8631b31532c04f1234;hpb=2962243d19ec76c66fee5a551a6d26946716c364 diff --git a/util/pod2mantest b/util/pod2mantest index 79aefafac0..384e683df4 100755 --- a/util/pod2mantest +++ b/util/pod2mantest @@ -1,6 +1,6 @@ #!/bin/sh -# This script is used by test/Makefile.ssl to check whether a sane 'pod2man' +# This script is used by test/Makefile to check whether a sane 'pod2man' # is installed. # ('make install' should not try to run 'pod2man' if it does not exist or if # it is a broken 'pod2man' version that is known to cause trouble. if we find @@ -11,9 +11,11 @@ IFS=: +if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi + try_without_dir=true # 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 @@ -29,9 +31,16 @@ for dir in dummy:$PATH; do if [ ! "$pod2man" = '' ]; then failure=none + if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | fgrep OpenSSL >/dev/null; then + : + else + failure=BasicTest + fi - if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | grep '^MARKER - ' >/dev/null 2>&1; then - failure=MultilineTest + if [ "$failure" = none ]; then + if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | grep '^MARKER - ' >/dev/null; then + failure=MultilineTest + fi fi @@ -45,9 +54,5 @@ for dir in dummy:$PATH; do done echo "No working pod2man found. Consider installing a new version." >&2 -if [ "$1" = ignore ]; then - echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 - echo "util/pod2man.pl" - exit 0 -fi -exit 1 +echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 +echo "$1 ../../util/pod2man.pl"