From 0b7162ffcc268618d347956003cea6c6ea0c43aa Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 2 Aug 1998 13:50:23 +0000 Subject: [PATCH] Use a different hack in the ${DFILE} rule to keep indirect dependencies (mostly for includes) separate from direct dependencies (so that ${.ALLSRC} can be used to find full paths to the sources for the direct dependencies only). The `::' hack just forgot the indirect dependendencies. This broke building doc/usd/13.viref with `make -jN' - the index got corrupted by being built twice concurrently. Cleaned up the ${DFILE} rule. There was a .else clause with dead code in it following a .else clause (make accepts this bad syntax). ${.ALLSRC} now works in the USE_SOELIMPP case. Some client Makefiles no longer need the SRCDIR=${.OBJDIR} hack. --- share/mk/bsd.doc.mk | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk index 22383e0319a..b4603e9bf3d 100644 --- a/share/mk/bsd.doc.mk +++ b/share/mk/bsd.doc.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91 -# $Id: bsd.doc.mk,v 1.43 1998/03/12 20:02:07 eivind Exp $ +# $Id: bsd.doc.mk,v 1.44 1998/05/06 18:44:00 bde Exp $ # # The include file handles installing BSD troff documents. # @@ -143,26 +143,19 @@ BINMODE= 444 SRCDIR?= ${.CURDIR} .if !target(${DFILE}) +_stamp.extraobjs: ${EXTRA} ${OBJS} + touch ${.TARGET} +CLEANFILES+= _stamp.extraobjs +${DFILE}: ${SRCS} _stamp.extraobjs .if ${PRINTERDEVICE} == "html" -${DFILE}: ${SRCS} ${EXTRA} ${OBJS} cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \ - document=${DOC} ${SRCS} + document=${DOC} ${SRCS} +.elif defined(USE_SOELIMPP) + ${SOELIMPP} ${.ALLSRC:N_stamp.extraobjs} | ${ROFF} | \ + ${DCOMPRESS_CMD} > ${.TARGET} .else - -${DFILE}:: ${SRCS} ${EXTRA} ${OBJS} -# XXX ${.ALLSRC} doesn't work unless there are a lot of .PATH.foo statements. -ALLSRCS= ${SRCS:S;^;${SRCDIR}/;} -${DFILE}:: ${SRCS} -.if defined(USE_SOELIMPP) - ${SOELIMPP} ${ALLSRCS} | ${ROFF} | ${DCOMPRESS_CMD} > ${.TARGET} -.else - (cd ${SRCDIR}; ${ROFF} ${.ALLSRC}) | ${DCOMPRESS_CMD} > ${.TARGET} -.endif -.else -.if !defined(NODOCCOMPRESS) -${DFILE}: ${DOC}.${PRINTERDEVICE} - ${DCOMPRESS_CMD} ${DOC}.${PRINTERDEVICE} > ${.TARGET} -.endif + (cd ${SRCDIR}; ${ROFF} ${.ALLSRC:N_stamp.extraobjs}) | \ + ${DCOMPRESS_CMD} > ${.TARGET} .endif .endif