OpenSSL: Set the date for manual pages to the release date.
[dragonfly.git] / secure / lib / libcrypto / Makefile.inc
1 # $FreeBSD: src/secure/lib/libcrypto/Makefile.inc,v 1.7.2.11 2003/02/20 15:07:32 nectar Exp $
2 # $DragonFly: src/secure/lib/libcrypto/Makefile.inc,v 1.18 2008/09/27 21:04:45 pavalos Exp $
3
4 OSSLVERSION=    0.9.8m
5 OSSLDATE=       2010-02-25
6 LCRYPTO_SRC=    ${.CURDIR}/../../../crypto/openssl
7 LCRYPTO_DOC=    ${LCRYPTO_SRC}/doc
8
9 CFLAGS+=        -DTERMIOS -DANSI_SOURCE -DL_ENDIAN
10 CFLAGS+=        -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto \
11                 -I${LCRYPTO_SRC}/crypto/engine -I${.OBJDIR}
12
13 MANDIR= ${SHAREDIR}/openssl/man/man
14
15 .if defined(LIB)
16 _docs=  ${LIB}
17 _sec=   3
18 .else
19 _docs=  apps
20 _sec=   1
21 .endif
22
23 man-update:
24 .for manpage in ${MAN}
25         @(sec=${manpage:E}; \
26         pod=${manpage:R}.pod; \
27         cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
28         pod2man --section=$$sec --release="${OSSLVERSION}" \
29           --date="${OSSLDATE}" --center="OpenSSL" \
30           $$pod > ${.CURDIR}/man/${manpage}; \
31         rm $$pod; \
32         ${ECHO} ${manpage})
33 .endfor
34
35 man-makefile-update:
36         rm -f ${.CURDIR}/Makefile.man
37         echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
38             ${.CURDIR}/Makefile.man
39         for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
40                 fn=`basename $$i .pod`; \
41                 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
42                 sec=$${sec:-${_sec}}; \
43                 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
44                 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
45                   sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
46                     ${.CURDIR}/Makefile.man; \
47         done