Home | History | Annotate | Line # | Download | only in groff
Makefile revision 1.23
      1 #	$NetBSD: Makefile,v 1.23 2003/07/18 08:26:13 lukem Exp $
      2 
      3 MODULE=		groff
      4 
      5 ALL_TARGET=	src/include all
      6 MAKE_ARGS=	bindir=${TOOLDIR}/lib/groff MAKEINFO=${TOOL_MAKEINFO:Q}
      7 
      8 TMACDIR=	${TOOLDIR}/share/groff/tmac
      9 SITETMACDIR=	${TOOLDIR}/share/groff/site-tmac
     10 
     11 # Add gnuwrap hack directly to the Makefile.
     12 _NOWRAPPER=1
     13 
     14 # Fixup build/Makefile.
     15 # XXX - the groff distribution Makefiles don't get their dependencies right.
     16 #	We use internal knowledge to specify additional target ordering.
     17 #	This can be removed once our own make(1) can be invoked in true
     18 #	sequential (i.e. compatible) mode again for subdir makes.
     19 #
     20 .configure_done: _post_conf
     21 _post_conf: .USE
     22 	@(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \
     23 	  echo '.ORDER: $$(ALLDIRS) dot';\
     24 	  echo '.ORDER: all install' ) >> build/Makefile
     25 
     26 
     27 .include "${.CURDIR}/../Makefile.gnuhost"
     28 
     29 .PATH:		${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac
     30 
     31 _installtmac: .USE
     32 .if ${MKUPDATE} != "no"
     33 	@if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
     34 		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
     35 		${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
     36 	fi
     37 .else
     38 	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
     39 .endif
     40 
     41 #
     42 # Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall'
     43 # sources below that depend on it must wait until `realinstall' is done.
     44 #
     45 #.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local
     46 .for F in doc2html
     47 afterinstall:	${TMACDIR}/${F}.tmac
     48 .PHONY:		${TMACDIR}/${F}.tmac
     49 ${TMACDIR}/${F}.tmac: ${F} _installtmac
     50 .ORDER: realinstall ${TMACDIR}/${F}.tmac
     51 .endfor
     52 .for F in man.local mdoc.local
     53 afterinstall:	${SITETMACDIR}/${F}
     54 .PHONY:		${SITETMACDIR}/${F}
     55 ${SITETMACDIR}/${F}: ${F} _installtmac
     56 .ORDER: realinstall ${SITETMACDIR}/${F}
     57 .endfor
     58 
     59 # The silly walk below is because sometimes the files begin with "g",
     60 # and sometimes not, depending on what the host tool has at build time.
     61 
     62 afterinstall: install.grofflinks
     63 .ORDER: realinstall install.grofflinks
     64 install.grofflinks:
     65 	@cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
     66 
     67 .for F in eqn groff indxbib nroff pic refer soelim tbl
     68 install.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}
     69 .if exists(${TOOLDIR}/lib/groff/g${F})
     70 ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F}
     71 .else
     72 ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F}
     73 .endif
     74 	ln -f ${.ALLSRC} ${.TARGET}
     75 .endfor
     76