diff options
| author | markus <> | 2002-09-05 12:51:52 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:52 +0000 |
| commit | b200d1ec45aafc7c92b197a4b605e34834d74f1d (patch) | |
| tree | 2ac47a569cf091151154089c2da1ba18b3701fd6 /src/lib/libcrypto/util | |
| parent | fc21fc70b816bb7340331c8ce53fd71211879700 (diff) | |
| parent | 5514995a9d5ed91db089875adb509c7781357c0e (diff) | |
| download | openbsd-b200d1ec45aafc7c92b197a4b605e34834d74f1d.tar.gz openbsd-b200d1ec45aafc7c92b197a4b605e34834d74f1d.tar.bz2 openbsd-b200d1ec45aafc7c92b197a4b605e34834d74f1d.zip | |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/util')
| -rw-r--r-- | src/lib/libcrypto/util/pod2mantest | 53 | ||||
| -rw-r--r-- | src/lib/libcrypto/util/pod2mantest.pod | 15 |
2 files changed, 68 insertions, 0 deletions
diff --git a/src/lib/libcrypto/util/pod2mantest b/src/lib/libcrypto/util/pod2mantest new file mode 100644 index 0000000000..79aefafac0 --- /dev/null +++ b/src/lib/libcrypto/util/pod2mantest | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # This script is used by test/Makefile.ssl to check whether a sane 'pod2man' | ||
| 4 | # is installed. | ||
| 5 | # ('make install' should not try to run 'pod2man' if it does not exist or if | ||
| 6 | # it is a broken 'pod2man' version that is known to cause trouble. if we find | ||
| 7 | # the system 'pod2man' to be broken, we use our own copy instead) | ||
| 8 | # | ||
| 9 | # In any case, output an appropriate command line for running (or not | ||
| 10 | # running) pod2man. | ||
| 11 | |||
| 12 | |||
| 13 | IFS=: | ||
| 14 | try_without_dir=true | ||
| 15 | # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. | ||
| 16 | for dir in dummy:$PATH; do | ||
| 17 | if [ "$try_without_dir" = true ]; then | ||
| 18 | # first iteration | ||
| 19 | pod2man=pod2man | ||
| 20 | try_without_dir=false | ||
| 21 | else | ||
| 22 | # second and later iterations | ||
| 23 | pod2man="$dir/pod2man" | ||
| 24 | if [ ! -f "$pod2man" ]; then # '-x' is not available on Ultrix | ||
| 25 | pod2man='' | ||
| 26 | fi | ||
| 27 | fi | ||
| 28 | |||
| 29 | if [ ! "$pod2man" = '' ]; then | ||
| 30 | failure=none | ||
| 31 | |||
| 32 | |||
| 33 | if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | grep '^MARKER - ' >/dev/null 2>&1; then | ||
| 34 | failure=MultilineTest | ||
| 35 | fi | ||
| 36 | |||
| 37 | |||
| 38 | if [ "$failure" = none ]; then | ||
| 39 | echo "$pod2man" | ||
| 40 | exit 0 | ||
| 41 | fi | ||
| 42 | |||
| 43 | echo "$pod2man does not work properly ('$failure' failed). Looking for another pod2man ..." >&2 | ||
| 44 | fi | ||
| 45 | done | ||
| 46 | |||
| 47 | echo "No working pod2man found. Consider installing a new version." >&2 | ||
| 48 | if [ "$1" = ignore ]; then | ||
| 49 | echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 | ||
| 50 | echo "util/pod2man.pl" | ||
| 51 | exit 0 | ||
| 52 | fi | ||
| 53 | exit 1 | ||
diff --git a/src/lib/libcrypto/util/pod2mantest.pod b/src/lib/libcrypto/util/pod2mantest.pod new file mode 100644 index 0000000000..5d2539a17f --- /dev/null +++ b/src/lib/libcrypto/util/pod2mantest.pod | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | foo, bar, | ||
| 6 | MARKER - test of multiline name section | ||
| 7 | |||
| 8 | =head1 DESCRIPTION | ||
| 9 | |||
| 10 | This is a test .pod file to see if we have a buggy pod2man or not. | ||
| 11 | If we have a buggy implementation, we will get a line matching the | ||
| 12 | regular expression "^ +MARKER - test of multiline name section *$" | ||
| 13 | at the end of the resulting document. | ||
| 14 | |||
| 15 | =cut | ||
