Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / ntp / scripts / mkver
blob9e282e00bde1488d982e40e33976a24e078427d1
1 #!/bin/sh
2 PROG=${1-UNKNOWN}
4 ConfStr="$PROG"
6 ConfStr="$ConfStr 4.2.4p8"
8 case "$CSET" in
9 '') ;;
10 *) ConfStr="$ConfStr@$CSET" ;;
11 esac
13 case "-lcrypto" in
14 '') ;;
15 -lcrypto)
16 ConfStr="${ConfStr}-o" ;;
17 *) ConfStr="${ConfStr}-?" ;;
18 esac
20 ifile="`dirname $0`/../importdate"
22 if [ -f "$ifile" ]; then
23 ConfStr="$ConfStr "`cat "$ifile"`
24 else
25 ConfStr="$ConfStr `LC_TIME=C TZ= date`"
27 if [ ! -f .version ]; then
28 echo 0 > .version
30 RUN="`cat .version`"
31 RUN="`expr $RUN + 1`"
32 echo $RUN > .version
34 ConfStr="$ConfStr (${RUN})"
37 echo "Version <${ConfStr}>";
39 rm -f version.c
40 cat > version.c << -EoF-
42 * version file for $PROG
44 #include <config.h>
45 const char * Version = "${ConfStr}";
46 -EoF-