freebsd-dev/contrib/ntp/scripts/build/mkver.in
Cy Schubert 2b15cb3d09 MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00

39 lines
578 B
Plaintext

#!@CONFIG_SHELL@
PROG=${1-UNKNOWN}
ConfStr="$PROG"
ConfStr="$ConfStr @VERSION@"
case "$CSET" in
'') ;;
*) ConfStr="$ConfStr@$CSET" ;;
esac
case "@VER_SUFFIX@" in
'') ;;
*) ConfStr="${ConfStr}-@VER_SUFFIX@" ;;
esac
ConfStr="$ConfStr `LC_TIME=C TZ=UTC 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-