Make RELDATE be on a single line.

All variable assignments that start in column 1 have to be on a single
line for amd to build due to as weird dependency there (most likely it
can be fixed to use the new VARS_ONLY feature, but it isn't
today). usr.sbin/amd/include/Makefile calls
usr.sbin/amd/include/newvers.sh which does:
	eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT`
which is where that requirement comes from. It handles COPYRIGHT since
that's an exception. Rather than add additional exceptions, cope with
the long line in newvers.sh instead. Note: it no longer needs to
filter COPYRIGHT because the assignment doesn't start in column 1
anymore.

I had done a universe when I had an earlier version of r346018 that
had it as one line. When I changed it to multi-line as suggested in
the review, I only built kernels on a couple of architectures to make
sure it didn't break anything.

Add comment to newvers.sh noting this.

Obviously, this unbreaks the amd build.
This commit is contained in:
imp 2019-04-07 21:01:02 +00:00
parent 6de23af4cf
commit f7689276a8

View File

@ -44,6 +44,9 @@
# checkout from a version control system. Metadata is
# included if the tree is modified.
# Note: usr.sbin/amd/include/newvers.sh assumes all variable assignments of
# upper case variables starting in column 1 are on one line w/o continuation.
TYPE="FreeBSD"
REVISION="13.0"
BRANCH=${BRANCH_OVERRIDE:-CURRENT}
@ -105,8 +108,7 @@ if [ -z "${SYSDIR}" ]; then
SYSDIR=$(dirname $0)/..
fi
RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
${PARAMFILE:-${SYSDIR}/sys/param.h})
RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h})
if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)