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.
This commit is contained in:
mycroft 2000-06-08 03:30:58 +00:00
parent f9b0e0c4eb
commit dfad196789

View File

@ -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 <bsd.files.mk>
__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: