freebsd-dev/usr.sbin/ntp/scripts/mkver
Ollivier Robert 271c3a9060 Update the various files to sync with vendor import of 4.2.4p5.
sntp includes a copy of libopts in itself in vendor code, rewrite the
Makefile to compile and use only one copy.  It is an internal library, not
installed.

MFC after:	2 weeks
2008-08-22 16:00:48 +00:00

47 lines
630 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
PROG=${1-UNKNOWN}
ConfStr="$PROG"
ConfStr="$ConfStr 4.2.4p5"
case "$CSET" in
'') ;;
*) ConfStr="$ConfStr@$CSET" ;;
esac
case "" in
'')
case "1" in
'') ;;
*) ConfStr="${ConfStr}-a" ;;
esac
;;
*) ConfStr="${ConfStr}-r" ;;
esac
ConfStr="$ConfStr `LC_ALL=C date`"
if [ ! -f .version ]; then
echo 0 > .version
fi
RUN="`cat .version`"
RUN="`expr $RUN + 1`"
echo $RUN > .version
ConfStr="$ConfStr (${RUN})"
echo "Version <${ConfStr}>";
rm -f version.c
cat > version.c << -EoF-
/*
* version file for $PROG
*/
#include <config.h>
const char * Version = "${ConfStr}";
-EoF-