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