From 5bff36fe81291488a7f019dd26dd4d3591cdfd22 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 12 Dec 2019 01:33:45 +0000 Subject: usr.sbin/ntp: don't emit versions w/ make -s defines ECHO=echo when not using make -s, and ECHO=true when using make -s. export ECHO for ntp products and use it in the mkver script to echo the version. This suppresses the output as appropriate. ECHO is given a default value to make sure things still work as expected for anyone that isn't redefining ECHO. Reviewed by: cy MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22101 --- usr.sbin/ntp/Makefile.inc | 2 ++ usr.sbin/ntp/scripts/mkver | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc index 7f81ec3909541..2ab26179d1445 100644 --- a/usr.sbin/ntp/Makefile.inc +++ b/usr.sbin/ntp/Makefile.inc @@ -16,4 +16,6 @@ CFLAGS+= -DOPENSSL -DUSE_OPENSSL_CRYPTO_RAND -DAUTOKEY WARNS?= 0 +.export ECHO + .include "../Makefile.inc" diff --git a/usr.sbin/ntp/scripts/mkver b/usr.sbin/ntp/scripts/mkver index 4e81652f81359..2d3e39dbd0349 100755 --- a/usr.sbin/ntp/scripts/mkver +++ b/usr.sbin/ntp/scripts/mkver @@ -4,6 +4,8 @@ # PROG=${1-UNKNOWN} +: ${ECHO:=echo} + ConfStr="$PROG" ConfStr="$ConfStr 4.2.8p12" @@ -32,7 +34,7 @@ echo $RUN > .version ConfStr="$ConfStr (${RUN})" -echo "Version <${ConfStr}>"; +${ECHO} "Version <${ConfStr}>"; rm -f version.c cat > version.c << -EoF- -- cgit v1.2.3