Makefile revision 1.13
1#	$NetBSD: Makefile,v 1.13 2002/02/01 13:51:38 tv Exp $
2
3MODULE=		groff
4
5ALL_TARGET=	src/include all
6MAKE_ARGS=	bindir=${TOOLDIR}/lib/groff
7
8TMACDIR=	${TOOLDIR}/share/groff/tmac
9
10# Add gnuwrap hack directly to the Makefile.
11_NOWRAPPER=1
12.build_done: build/Makefile
13build/Makefile: .configure_done
14	@printf '.include "${.CURDIR}/../Makefile.gnuwrap"\n' >>$@
15
16.include "${.CURDIR}/../Makefile.gnuhost"
17
18.PATH:		${.CURDIR}/../../share/tmac
19
20_installtmac: .USE
21.if defined(UPDATE)
22	@if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
23		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
24		${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
25	fi
26.else
27	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
28.endif
29
30.for F in andoc doc doc-ditroff doc-common doc-nroff doc-syms doc2html
31afterinstall:	${TMACDIR}/tmac.${F}
32.PHONY:		${TMACDIR}/tmac.${F}
33${TMACDIR}/tmac.${F}: ${F} _installtmac
34.endfor
35
36afterinstall: ${TMACDIR}/tmac.an.old
37${TMACDIR}/tmac.an.old: ${DIST}/tmac/tmac.an _installtmac
38
39afterinstall: ${TMACDIR}/tmac.an
40${TMACDIR}/tmac.an: ${TMACDIR}/tmac.andoc _installtmac
41
42# The silly walk below is because sometimes the files begin with "g",
43# and sometimes not, depending on what the host tool has at build time.
44
45afterinstall: install.grofflinks
46install.grofflinks:
47	@cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
48
49.for F in eqn groff indxbib pic refer soelim tbl
50install.grofflinks.recurse: ${TOOLDIR}/bin/nb${F}
51.if exists(${TOOLDIR}/lib/groff/g${F})
52${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/g${F}
53.else
54${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/${F}
55.endif
56	ln -f ${.ALLSRC} ${.TARGET}
57.endfor
58
59