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