only do the keep last in update builds and explain why.

This commit is contained in:
christos 2013-02-18 00:00:55 +00:00
parent 656c32c03e
commit 33dedf2c47

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.85 2013/02/17 23:56:52 christos Exp $
# $NetBSD: Makefile,v 1.86 2013/02/18 00:00:55 christos Exp $
# Experimental RCS METALOG versioning
# (Needs host's rcs(1) commands)
@ -124,10 +124,17 @@ clean_METALOG: .PHONY
METALOG.unpriv= -M ${METALOG}.sanitised
sanitise_METALOG: .PHONY ${METALOG}.sanitised
${METALOG}.sanitised: ${METALOG}
# We keep only the last entry for update builds, but for clean builds we
# want to make sure we install files only once.
.if ${MKUPDATE} != "no"
${TOOL_AWK} \
'{ a[$$1] = $$0; } END { for (f in a) print a[f]; }' ${METALOG} | \
sort | ${TOOL_MTREE} -CSM -k all -N ${NETBSDSRCDIR}/etc \
>${METALOG}.new
.else
sort ${METALOG} | ${TOOL_MTREE} -CSM -k all -N ${NETBSDSRCDIR}/etc \
>${METALOG}.new
.endif
mv ${METALOG}.new ${METALOG}.sanitised
.if defined(RCSMETALOG)
. ./metalog.subr; \