Author: kevans
Date: Thu Dec 12 01:33:45 2019
New Revision: 355639
URL: https://svnweb.freebsd.org/changeset/base/355639

Log:
  usr.sbin/ntp: don't emit versions w/ make -s
  
  <sys.mk> 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

Modified:
  head/usr.sbin/ntp/Makefile.inc
  head/usr.sbin/ntp/scripts/mkver

Modified: head/usr.sbin/ntp/Makefile.inc
==============================================================================
--- head/usr.sbin/ntp/Makefile.inc      Thu Dec 12 00:51:08 2019        
(r355638)
+++ head/usr.sbin/ntp/Makefile.inc      Thu Dec 12 01:33:45 2019        
(r355639)
@@ -16,4 +16,6 @@ CFLAGS+= -DOPENSSL -DUSE_OPENSSL_CRYPTO_RAND -DAUTOKEY
 
 WARNS?=        0
 
+.export ECHO
+
 .include "../Makefile.inc"

Modified: head/usr.sbin/ntp/scripts/mkver
==============================================================================
--- head/usr.sbin/ntp/scripts/mkver     Thu Dec 12 00:51:08 2019        
(r355638)
+++ head/usr.sbin/ntp/scripts/mkver     Thu Dec 12 01:33:45 2019        
(r355639)
@@ -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-
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to