mkver revision 1.14
1#!/bin/sh 2PROG=${1-UNKNOWN} 3 4ConfStr="$PROG" 5 6ConfStr="$ConfStr 4.2.8p11" 7 8case "$CSET" in 9 '') ;; 10 *) ConfStr="$ConfStr@$CSET" ;; 11esac 12 13case "o" in 14 '') ;; 15 *) ConfStr="${ConfStr}-o" ;; 16esac 17 18ifile="`dirname $0`/../importdate" 19 20if [ -f "$ifile" ]; then 21 # NetBSD MKREPRO: Don't embed current date/time/run number 22 ConfStr="$ConfStr "`cat "$ifile"` 23else 24 ConfStr="$ConfStr `LC_TIME=C TZ= date`" 25 26 if [ ! -f .version ]; then 27 echo 0 > .version 28 fi 29 RUN="`cat .version`" 30 RUN="`expr $RUN + 1`" 31 echo $RUN > .version 32 33 ConfStr="$ConfStr (${RUN})" 34fi 35 36echo "Version <${ConfStr}>"; 37 38rm -f version.c 39cat > version.c << -EoF- 40/* 41 * version file for $PROG 42 */ 43#include <config.h> 44const char * Version = "${ConfStr}"; 45-EoF- 46