From dfad196789d8c109fa786ab8936133aab399ca6d Mon Sep 17 00:00:00 2001 From: mycroft Date: Thu, 8 Jun 2000 03:30:58 +0000 Subject: [PATCH] Rework to not use the `files' crap. It requires far too much klugery to actually get the semantics right. As a bonus, the info directory is not reordered when using UPDATE any more, if files are not actually reinstalled. --- share/mk/bsd.info.mk | 50 +++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk index ad0480de88d9..b2e4b05d72f4 100644 --- a/share/mk/bsd.info.mk +++ b/share/mk/bsd.info.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.info.mk,v 1.14 2000/06/08 03:05:17 mycroft Exp $ +# $NetBSD: bsd.info.mk,v 1.15 2000/06/08 03:30:58 mycroft Exp $ .if !target(__initialized__) __initialized__: @@ -15,40 +15,52 @@ MAKEINFO?= makeinfo INFOFLAGS?= INSTALL_INFO?= install-info +.PHONY: infoinstall cleaninfo +.if ${MKINFO} != "no" +realinstall: infoinstall +.endif +cleandir distclean: cleaninfo + .SUFFIXES: .txi .texi .texinfo .info .txi.info .texi.info .texinfo.info: @${MAKEINFO} ${INFOFLAGS} --no-split -o $@ $< -.if defined(TEXINFO) && !empty(TEXINFO) && ${MKINFO} != "no" +.if defined(TEXINFO) && !empty(TEXINFO) INFOFILES= ${TEXINFO:C/\.te?xi(nfo)?$/.info/} -FILES+= ${INFOFILES} .NOPATH: ${INFOFILES} -infoinstall: -.for F in ${INFOFILES} - @${INSTALL_INFO} --remove --info-dir=${DESTDIR}${INFODIR} ${DESTDIR}${INFODIR}/${F} - ${INSTALL_INFO} --info-dir=${DESTDIR}${INFODIR} ${DESTDIR}${INFODIR}/${F} -.endfor - +.if ${MKINFO} != "no" realall: ${INFOFILES} -.else -realall: .endif -.if ${MKINFO} != "no" cleaninfo: rm -f ${INFOFILES} -.else -cleaninfo infoinstall: + +infoinstall:: ${INFOFILES:@F@${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}@} +.PRECIOUS: ${INFOFILES:@F@${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}@} +.if !defined(UPDATE) +.PHONY: ${INFOFILES:@F@${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}@} .endif -.include +__infoinstall: .USE + @${INSTALL_INFO} --remove --info-dir=${DESTDIR}${INFODIR} ${DESTDIR}${INFODIR}/${.ALLSRC} + ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \ + -o ${INFOOWN_${.ALLSRC}:U${INFOOWN}} \ + -g ${INFOGRP_${.ALLSRC}:U${INFOGRP}} \ + -m ${INFOMODE_${.ALLSRC}:U${INFOMODE}} \ + ${.ALLSRC} ${.TARGET} + ${INSTALL_INFO} --info-dir=${DESTDIR}${INFODIR} ${DESTDIR}${INFODIR}/${.ALLSRC} -# These need to happen *after* filesinstall. -.PHONY: infoinstall cleaninfo -realinstall: infoinstall -cleandir distclean: cleaninfo +.for F in ${INFOFILES} +.if !defined(BUILD) && !make(all) && !make(${F}) +${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}: .MADE +.endif +${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}: ${F} __infoinstall +.endfor +.else +cleaninfo: +.endif # Make sure all of the standard targets are defined, even if they do nothing. clean depend includes lint regress tags: