blob: 452add822680acc6b4e04b20be3951dc9658ae78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# $OpenBSD: Makefile.inc,v 1.1 2009/10/28 03:20:42 schwarze Exp $
DIFF=diff -au
MANDOC?=mandoc
MANDOCOPTS=-fstrict -Wall
NROFF=nroff -mandoc
SED=sed
SH=/bin/sh
all: clean
groff: ${GROFF_TARGETS:C/$/.out_ascii/}
.SUFFIXES: .in .out_ascii .sh
.in:
@echo " -> ${*}"
@${MANDOC} ${MANDOCOPTS} ${.CURDIR}/${*}.in | ${SED} '$$d' \
> ${*}.mandoc_ascii
@${DIFF} ${*}.out_ascii ${*}.mandoc_ascii
.in.out_ascii:
@echo " -> ${*}"
@${NROFF} ${.CURDIR}/${<} | ${SED} '$$d' > ${@}
.sh:
@echo " -> ${*}"
@MANDOC="${MANDOC}" MANDOCOPTS="${MANDOCOPTS}" \
${SH} ${.CURDIR}/${*}.sh
clean:
rm -f *.mandoc_ascii
groff-clean:
.if defined(GROFF_TARGETS)
rm -f ${GROFF_TARGETS:C/$/.out_ascii/}
.endif
|