Remove time= keywords from METALOG.sanitised.
The times add unnecessary differences to the DESTDIR trees for MKREPRO builds, and they are not needed by anything. (maketars, the chief consumer of METALOG.sanitised, explicitly ignores the time fields.) Also factor out some duplicated code and update comments.
This commit is contained in:
parent
72da815343
commit
9c0097bee2
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.91 2014/01/16 01:15:33 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.92 2014/01/23 21:45:27 apb Exp $
|
||||
|
||||
# Experimental RCS METALOG versioning
|
||||
# (Needs host's rcs(1) commands)
|
||||
|
@ -101,19 +101,25 @@ list_set_files_base list_set_files_x list_set_files_ext \
|
|||
# MKUNPRIVED flag.
|
||||
#
|
||||
# The sanitise_METALOG target creates METALOG.sanitised from METALOG,
|
||||
# without modifying METALOG itself. METALOG.sanitised is sorted, and
|
||||
# has duplicates merged. This is used near the end of a build, after
|
||||
# build products have been installed in DESTDIR and corresponding lines
|
||||
# have been added to METALOG, but before METALOG.sanitised is used in
|
||||
# the creation of sets in RELEASEDIR.
|
||||
# without modifying METALOG itself. This is used near the end of
|
||||
# a build, after build products have been installed in DESTDIR
|
||||
# and corresponding lines have been added to METALOG, but before
|
||||
# METALOG.sanitised is used in the creation of sets in RELEASEDIR.
|
||||
# For update builds, METALOG.sanitised has duplicates merged (keeping
|
||||
# only the last of multiple entries for the same item), but for clean
|
||||
# builds it's an error if a file or directory name appears twice.
|
||||
# METALOG.sanitised is always sorted and has timestamps removed.
|
||||
#
|
||||
# The clean_METALOG either deletes METALOG or replaces METALOG with
|
||||
# The clean_METALOG target either deletes METALOG, or replaces METALOG with
|
||||
# a sanitised version of itself, depending on the MKUPDATE flag, and
|
||||
# deletes old METALOG.* files. This is intended to be used at the start
|
||||
# of a build, to ensure that repeated MKUPDATE builds do not cause
|
||||
# unbounded growth of METALOG.
|
||||
#
|
||||
|
||||
METALOG_REMOVE_DUPLICATES= \
|
||||
${TOOL_AWK} '{ a[$$1] = $$0; } END { for (f in a) print a[f]; }'
|
||||
|
||||
.if ${MKUNPRIVED} == "no"
|
||||
METALOG.unpriv=
|
||||
sanitise_METALOG: .PHONY
|
||||
|
@ -124,17 +130,10 @@ 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} \
|
||||
${${MKUPDATE} != "no" :? ${METALOG_REMOVE_DUPLICATES} | :} \
|
||||
sort | ${TOOL_MTREE} -CSM -k all -R time -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; \
|
||||
|
|
Loading…
Reference in New Issue