xref: /netbsd-src/crypto/external/bsd/openssl.old/lib/libcrypto/man/Makefile (revision 4724848cf0da353df257f730694b7882798e5daf)
1*4724848cSchristos#	$NetBSD: Makefile,v 1.1.1.2 2023/04/18 14:19:13 christos Exp $
2c9496f6bSchristos
3c9496f6bSchristos# the makefile is not, and should not be visited during normal build process.
4c9496f6bSchristos# try to use latest pod2man, which comes with the latest perl.
5c9496f6bSchristos
6c9496f6bSchristos.include <bsd.own.mk>
7c9496f6bSchristosCRYPTODIST=	${NETBSDSRCDIR}/crypto
8c9496f6bSchristos.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
9c9496f6bSchristos
10c9496f6bSchristosVERSION!=	head -2 ${OPENSSLSRC}/README | tail -1 | awk '{ print $$2; }'
11c9496f6bSchristos
12c9496f6bSchristosmake-manpages:
13*4724848cSchristos	for sec in 1 3 5 7; do \
14*4724848cSchristos	for i in ${OPENSSLSRC}/doc/man$$sec/*.pod; do \
15c9496f6bSchristos		fn=`basename $$i .pod`; \
16c9496f6bSchristos		if [ "$$fn" = "config" ]; then \
17*4724848cSchristos		    fn=openssl_config; \
18c9496f6bSchristos		fi; \
19*4724848cSchristos		case $$sec in \
20*4724848cSchristos		1) if [ "$$fn" = "openssl" ]; then \
21*4724848cSchristos			dst=$$fn.$$sec; \
22*4724848cSchristos		   else \
23*4724848cSchristos			dst=openssl_$$fn.$$sec; \
24*4724848cSchristos		   fi;; \
25*4724848cSchristos		*) dst=$$fn.$$sec;; \
26*4724848cSchristos		esac; \
27c9496f6bSchristos		(cd `dirname $$i`; \
28c9496f6bSchristos		 pod2man --section=$$sec --center=OpenSSL --release=${VERSION} \
29c9496f6bSchristos			`basename $$i`) | \
30c9496f6bSchristos		sed -e 's/[[:space:]]*$$//' | \
31c9496f6bSchristos		perl libcrypto.pl > $$dst; \
32*4724848cSchristos	done \
33c9496f6bSchristos	done
34*4724848cSchristosfoo:
35c9496f6bSchristos
36c9496f6bSchristosclean:
37c9496f6bSchristos	-/bin/rm -f *.[0-9]
38c9496f6bSchristos
39